-
August 28th, 2007, 05:21 AM
#1
BerkeleyDB and Visual C++ .NET 2005 problem
Hi
I've just downloaded and installed the most new version of Oracle BerkeleyDB (msi packet). No I'm trying to include <db_cxx.h> header file in my project (after set correct folders for includes and libs in VC++ options). I'm still getting error:
1>c:\program files (x86)\oracle\berkeley db 4.6.19\include\db.h(1402) : error C2143: syntax error : missing '}' before '('
1>c:\program files (x86)\oracle\berkeley db 4.6.19\include\db.h(1402) : fatal error C1903: unable to recover from previous error(s); stopping compilation
I think it's becouse of DBTYPE enum type - the same name as the one from oledb.h. But I don't see (after "find in project" ) that i'm including oledb.h to my project.
Maybe some of you are using BerkeleyDB with VisualC++ - I'll be very happy to see some solution of my problem.
Best regards...
AragornX
PS
Solution given in FAQ on Oracle site (one with #define) doesn't work 'cuz I don't have any "oledb.h" included...
Last edited by aragornx; August 28th, 2007 at 05:31 AM.
-
August 28th, 2007, 06:12 AM
#2
Re: BerkeleyDB and Visual C++ .NET 2005 problem
I found solution:
#define DBTYPE BDBTYPE
#undef DB_UNKNOWN
#include <db_cxx.h>
#undef DBTYPE
but I don't if it is correct ??
-
August 28th, 2007, 06:45 AM
#3
Re: BerkeleyDB and Visual C++ .NET 2005 problem
In fact, after my changes it works until db.open. Now I have linker error:
error LNK2019: unresolved external symbol "public: virtual int __thiscall Db:pen(class DbTxn *,char const *,char const *,enum BDBTYPE,unsigned int,int) [...]
I also triad to compile BerkeleyDB by myself - and there was no errors (while compiling code from Oracle). But it was the same story with DBTYPE ...
still not working ...
PS
Of course I have libdb46.lib included in my project ...
Last edited by aragornx; August 28th, 2007 at 07:08 AM.
-
August 28th, 2007, 02:12 PM
#4
Re: BerkeleyDB and Visual C++ .NET 2005 problem
What type of Visual C++ project is this? Have you tried doing using the lib from a simple console app?
-
August 29th, 2007, 01:26 AM
#5
Re: BerkeleyDB and Visual C++ .NET 2005 problem
It is Visual C++ 2005 Windows Application MFC Project...
-
August 31st, 2007, 09:08 AM
#6
Re: BerkeleyDB and Visual C++ .NET 2005 problem
Take a look at the stdafx.h files that's created for you in the MFC project and comment out some of the default #include statements. I would try creating a console app and try the db there. If it works in the console, you can then track down the include conflicts in the MFC projects. If it doesn't work, you'll know it's in the Berkeley end.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|