Compile error with Visual Studio .net 2003.
Posted by: J.F. Gratton
Date: June 26, 2005 09:42AM

I might be unfamiliar with Visual Studion .NET 2003 (Visual C++) as I'm more familiar with Unix than Windows, so if someone can help me ...


I'm trying a very simple MySQL client that connects to a remote db on the LAN.

To make things simple I've put #include <mysql.h> into stdafx.h

The MySQL include and lib dirs have been added to VC++ environment (Tools Menu, Options, Projects, VC++ Directories, etc etc).

In the project properties I've added libmysqlclient.lib in the linker inputs.

As soon as I try to build the project (right now it only does mysql_init and mysql_close, to validate everything so far), I get multiple compile errors such as:

C2146: syntax error: missing ';' before identifier "fd" in file c:\program files\mysql\mysql server 4.1\include\mysql_com.h line 155 ...

It seems that I'm missing some header files, or that I have to put them in a specific order. The files are not corrupted (I've reinstalled everything from scratch, to make sure).


Any ideas, anyone ? Looks more like a VC++ problem than the code itself, but.. oh well :)


Regards,

Jeff

Options: ReplyQuote


Subject
Views
Written By
Posted
Compile error with Visual Studio .net 2003.
983
June 26, 2005 09:42AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.