List:MySQL++« Previous MessageNext Message »
From:Ian Miller Date:December 29 2006 4:28am
Subject:error C2065: 'ulong' : undeclared identifier during build
View as plain text  
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.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

Thread
error C2065: 'ulong' : undeclared identifier during buildIan Miller29 Dec
  • Re: error C2065: 'ulong' : undeclared identifier during buildWarren Young29 Dec
    • using the 'use' query.gary clark29 Dec
    • Re: error C2065: 'ulong' : undeclared identifier during buildIan Miller30 Dec
Re: using the 'use' query.gary clark30 Dec
Re: using the 'use' query.gary clark31 Dec
  • Re: using the 'use' query.gary clark2 Jan
    • Re: using the 'use' query.Matt Dargavel3 Jan
      • Re: using the 'use' query.gary clark3 Jan
      • Re: using the 'use' query.gary clark3 Jan
      • Re: using the 'use' query.gary clark3 Jan
        • Re: using the 'use' query.Warren Young3 Jan
          • Re: using the 'use' query.gary clark3 Jan
            • Re: using the 'use' query.Warren Young5 Jan
              • Re: using the 'use' query.gary clark5 Jan
                • Conversion Errorgary clark6 Jan
                  • Re: Conversion ErrorWarren Young6 Jan