Help in compiling
am 18.04.2005 17:00:01 von yeo augustine
Hi,
I am using MSSQL4.1.
This is my first time compiling a mysql client
program. Below is my very simple source file:
#include
#include
int main(int argc, char *argv[])
{
printf("Hello, world and Goodbye\n");
return 0;
}
The below is the error when I compile:
C:\Program Files\Microsoft Visual C++ Toolkit 2003>cd
C:\project\code
C:\project\code>cl /I "C:\Program Files\MySQL\MySQL
Server 4.1\include" hello.c
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version
13.10.3077 for 80x86
Copyright (C) Microsoft Corporation 1984-2002. All
rights reserved.
hello.c
c:\Program Files\MySQL\MySQL Server
4.1\include\mysql_com.h(154) : error C2061:
syntax error : identifier 'SOCKET'
c:\Program Files\MySQL\MySQL Server
4.1\include\mysql_com.h(181) : error C2059:
syntax error : '}'
c:\Program Files\MySQL\MySQL Server
4.1\include\mysql_com.h(280) : error C2143:
syntax error : missing ')' before '*'
c:\Program Files\MySQL\MySQL Server
4.1\include\mysql_com.h(280) : error C2143:
syntax error : missing '{' before '*'
c:\Program Files\MySQL\MySQL Server
4.1\include\mysql_com.h(280) : error C2371:
'Vio' : redefinition; different basic types
c:\Program Files\MySQL\MySQL Server
4.1\include\mysql_com.h(140) : see
eclaration of 'Vio'
c:\Program Files\MySQL\MySQL Server
4.1\include\mysql_com.h(280) : error C2143:
syntax error : missing ';' before '*'
c:\Program Files\MySQL\MySQL Server
4.1\include\mysql_com.h(280) : error C2059:
syntax error : ')'
c:\Program Files\MySQL\MySQL Server
4.1\include\mysql_com.h(281) : error C2143:
syntax error : missing ')' before '*'
c:\Program Files\MySQL\MySQL Server
4.1\include\mysql_com.h(281) : error C2143:
syntax error : missing '{' before '*'
c:\Program Files\MySQL\MySQL Server
4.1\include\mysql_com.h(281) : error C2059:
syntax error : ')'
c:\Program Files\MySQL\MySQL Server
4.1\include\mysql_com.h(282) : error C2143:
syntax error : missing ')' before '*'
c:\Program Files\MySQL\MySQL Server
4.1\include\mysql_com.h(282) : error C2143:
syntax error : missing '{' before '*'
c:\Program Files\MySQL\MySQL Server
4.1\include\mysql_com.h(282) : error C2059:
syntax error : ')'
c:\Program Files\MySQL\MySQL Server
4.1\include\mysql_com.h(283) : error C2143:
syntax error : missing ')' before '*'
c:\Program Files\MySQL\MySQL Server
4.1\include\mysql_com.h(283) : error C2143:
syntax error : missing '{' before '*'
c:\Program Files\MySQL\MySQL Server
4.1\include\mysql_com.h(283) : error C2059:
syntax error : ')'
c:\Program Files\MySQL\MySQL Server
4.1\include\mysql_com.h(284) : error C2143:
syntax error : missing ')' before '*'
c:\Program Files\MySQL\MySQL Server
4.1\include\mysql_com.h(284) : error C2143:
syntax error : missing '{' before '*'
c:\Program Files\MySQL\MySQL Server
4.1\include\mysql_com.h(284) : error C2059:
syntax error : 'type'
Thanks.
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=gcdmw-win32@m.gmane.org
Re: Help in compiling
am 19.04.2005 08:24:43 von erman olca
hi augustine it is not enough to use mysql.h there
must be mysqllib.dll in your project directory or
somewhere else that your project can find it. have a
good mysql days:-)
--- yeo augustine wrote:
> Hi,
>
> I am using MSSQL4.1.
>
> This is my first time compiling a mysql client
> program. Below is my very simple source file:
>
> #include
> #include
>
>
> int main(int argc, char *argv[])
> {
> printf("Hello, world and Goodbye\n");
>
> return 0;
> }
>
>
>
> The below is the error when I compile:
>
> C:\Program Files\Microsoft Visual C++ Toolkit
> 2003>cd
> C:\project\code
>
> C:\project\code>cl /I "C:\Program Files\MySQL\MySQL
> Server 4.1\include" hello.c
> Microsoft (R) 32-bit C/C++ Optimizing Compiler
> Version
> 13.10.3077 for 80x86
> Copyright (C) Microsoft Corporation 1984-2002. All
> rights reserved.
>
> hello.c
> c:\Program Files\MySQL\MySQL Server
> 4.1\include\mysql_com.h(154) : error C2061:
> syntax error : identifier 'SOCKET'
> c:\Program Files\MySQL\MySQL Server
> 4.1\include\mysql_com.h(181) : error C2059:
> syntax error : '}'
> c:\Program Files\MySQL\MySQL Server
> 4.1\include\mysql_com.h(280) : error C2143:
> syntax error : missing ')' before '*'
> c:\Program Files\MySQL\MySQL Server
> 4.1\include\mysql_com.h(280) : error C2143:
> syntax error : missing '{' before '*'
> c:\Program Files\MySQL\MySQL Server
> 4.1\include\mysql_com.h(280) : error C2371:
> 'Vio' : redefinition; different basic types
> c:\Program Files\MySQL\MySQL Server
> 4.1\include\mysql_com.h(140) : see
> eclaration of 'Vio'
> c:\Program Files\MySQL\MySQL Server
> 4.1\include\mysql_com.h(280) : error C2143:
> syntax error : missing ';' before '*'
> c:\Program Files\MySQL\MySQL Server
> 4.1\include\mysql_com.h(280) : error C2059:
> syntax error : ')'
> c:\Program Files\MySQL\MySQL Server
> 4.1\include\mysql_com.h(281) : error C2143:
> syntax error : missing ')' before '*'
> c:\Program Files\MySQL\MySQL Server
> 4.1\include\mysql_com.h(281) : error C2143:
> syntax error : missing '{' before '*'
> c:\Program Files\MySQL\MySQL Server
> 4.1\include\mysql_com.h(281) : error C2059:
> syntax error : ')'
> c:\Program Files\MySQL\MySQL Server
> 4.1\include\mysql_com.h(282) : error C2143:
> syntax error : missing ')' before '*'
> c:\Program Files\MySQL\MySQL Server
> 4.1\include\mysql_com.h(282) : error C2143:
> syntax error : missing '{' before '*'
> c:\Program Files\MySQL\MySQL Server
> 4.1\include\mysql_com.h(282) : error C2059:
> syntax error : ')'
> c:\Program Files\MySQL\MySQL Server
> 4.1\include\mysql_com.h(283) : error C2143:
> syntax error : missing ')' before '*'
> c:\Program Files\MySQL\MySQL Server
> 4.1\include\mysql_com.h(283) : error C2143:
> syntax error : missing '{' before '*'
> c:\Program Files\MySQL\MySQL Server
> 4.1\include\mysql_com.h(283) : error C2059:
> syntax error : ')'
> c:\Program Files\MySQL\MySQL Server
> 4.1\include\mysql_com.h(284) : error C2143:
> syntax error : missing ')' before '*'
> c:\Program Files\MySQL\MySQL Server
> 4.1\include\mysql_com.h(284) : error C2143:
> syntax error : missing '{' before '*'
> c:\Program Files\MySQL\MySQL Server
> 4.1\include\mysql_com.h(284) : error C2059:
> syntax error : 'type'
>
>
> Thanks.
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam
> protection around
> http://mail.yahoo.com
>
> --
> MySQL Windows Mailing List
> For list archives: http://lists.mysql.com/win32
> To unsubscribe:
>
http://lists.mysql.com/win32?unsub=ermanolca@yahoo.com
>
>
ERMAN OLCA
__________________________________
Do you Yahoo!?
Plan great trips with Yahoo! Travel: Now over 17,000 guides!
http://travel.yahoo.com/p-travelguide
--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=gcdmw-win32@m.gmane.org
Re: Help in compiling
am 19.04.2005 13:25:46 von Elliot Murphy
Hi Augustine,
When compiling on Windows, you must include my_global.h before
mysql.h. This will fix the compiler errors that you see. This is
described in the manual here:
http://dev.mysql.com/doc/mysql/en/windows-client-compiling.h tml
regards,
Elliot Murphy
--- yeo augustine wrote:
> Hi,
>
> I am using MSSQL4.1.
>
> This is my first time compiling a mysql client
> program. Below is my very simple source file:
>
> #include
> #include
>
>
> int main(int argc, char *argv[])
> {
> printf("Hello, world and Goodbye\n");
>
> return 0;
> }
--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=3Dgcdmw-win32@m.gmane.org