Click here to Skip to main content
15,886,519 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Getting linking errors when iam using dao.Please give me some idea.

Error 3 error LNK2001: unresolved external symbol "public: __thiscall
CdbBSTR::CdbBSTR(wchar_t *)" (??0CdbBSTR@@QAE@PA_W@Z) C:\Planit-Solid\Solid\XDAL\XDAL_Jet.obj XDAL

Error 31 error LNK2001: unresolved external symbol "public: __thiscall CdbDBEngine::CdbDBEngine(int,int,wchar_t const *,wchar_t const *,wchar_t const *,long)" (??0CdbDBEngine@@QAE@HHPB_W00J@Z) C:\Planit-Solid\Solid\XDAL\XDAL_Jet.obj XDAL

Thanks in advance
Posted

The missing functions are part of very old DAO SDKs which has been shipped with Visual Studio versions 4 to 6 and must be installed manually (from MSDN Installing MFC Database Support[^]):
Quote:
If you want to install other DAO SDK components, such as the DAO SDK C++ classes, example files, or the Windows Help version of the DAO Help file, install the DAO SDK from the Visual C++ 6.0 CD-ROM.

My tip: Use the MFC CDaoDatabase[^] and CDaoRecordset classes instead.
 
Share this answer
 
Comments
Maciej Los 8-Apr-15 14:58pm    
Good suggestion ;)
Basically the error LNK2001: unresolved external symbol "..." is caused via linker. It means that the definition of function cannot be found.

How to resolve it?
Check references. Make sure you're using proper library version.
This error can often mean that some function has a declaration, but not a definition. Add a definition.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900