Mailing List
Home
Forum Home
MySQL General - General MySQL discussion
MySQL++ - Programming with the C++ API to MySQL
MaxDB - Everything about MaxDB, formerly known as SAP DB
ODBC - ODBC with the MySQL Connector/ODBC driver
MySQL on Win32 - Runing MySQL on Windows 9x/Me/NT/2000/XP
Java Help - Mostly related to the MySQL Connector/J driver
Perl - Perl support for MySQL with DBI and DBD::mysql
GUI - MySQL GUI Tools
Announcement
Subjects
mysql openssl Question
mysql:it 's a db not a dbms how it 's possible?!
Does the binary log enabling affect the MySQL performances?
Strange behavior, Table Level Permission
FULLTEXT query format question
Preventing Duplicate Entries
Comparing and writing out BLOBS
Executing MySQL Commands From Within C Program
Can 't access mysql after kernel upgrade
Mysql 4 0 Oracle Stored Procedure Trigger Conversion
Downgrade Mysql from 4 to 3 23
MySQL Cluster Software
mysql test 4 1 fails with the gis test
ERROR 2002: Can 't connect to local MySQL server through socket
Getting Identity after INSERT
Update one field with more fields from another table
ERROR 1045: Access denied for user: 'root@localhost ' (Using
password: NO)
mysql have same function mthod as Oracle decode()
 
error C2065: 'ulong ' : undeclared identifier during build

error C2065: 'ulong ' : undeclared identifier during build

2006-12-28       - By Ian Miller

 Back
Reply:     1     2     3  

I rediscovered a problem when building mysql++ from source using Visual C++
2005 express on Windows XP. The original problem is described here:

http://www.dbtalk.net/mailing-database-mysql-plusplus/error-c2065-ulong
-undeclared-identifier-350240 (See http://ier-350240.ora-code.com).html

My coding skills are modest at best, but I think I might have a contribution to
the issue. It appears to arise from a "ulong" variable type being declared in
mysql_com.h , and can be resolved by using a comparable data type recognized by
the MS compiler.

To convince yourself of this, right-click on CLIENT_MULTI_STATEMENTS in
connection.cpp and select "Go To Definition". It will take you to the place
where the constant is declared as (((ulong) 1) << 16)

I searched for the MS-centric equivalent, and ended up finding this page:
http://www.codeproject.com/dotnet/Win32APICPlusPlustoDotNET.asp
that seemed to suggest that DWORDLONG might be better tolerated. When I tried
to build the code again it compiled.

Bottom line: you can work around this problem easily by changing the two
declarations of constants with "ulong" in mysql_com.h to use "DWORDLONG"
instead. Can anyone with more expertise could confirm the equivalence of the
two variable types?

Anybody with an account on dbtalk.net willing to paste this tip into the
original thread? Just make sure not to include my email address.

Thanks,
Ian