dbTalk Databases Forums  

Will MySQL++ will build under MFC?

mailing.database.mysql-plusplus mailing.database.mysql-plusplus


Discuss Will MySQL++ will build under MFC? in the mailing.database.mysql-plusplus forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Li, Eileen
 
Posts: n/a

Default Will MySQL++ will build under MFC? - 02-13-2006 , 04:36 PM






------_=_NextPart_001_01C630ED.D9330977
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

Hi,
Thank you for your help in advance.
I am using VC++7.1 (.from .net under XP sp2.) to build console
application for resetDB, it runs well. I create a MFC project with
simple dialog, when click OK it try to call resetDB ( I rename original
main() to callRestDB() and use con.connect(MY_DATABASE, MY_HOST,
MY_USER, MY_PASSWORD) instead of argc, argv[], however I have the
following errors:
Linking...
nafxcwd.lib(appcore.obj) : error LNK2001: unresolved external symbol
___argv
nafxcwd.lib(appcore.obj) : error LNK2001: unresolved external symbol
___argc
nafxcwd.lib(olelink.obj) : error LNK2001: unresolved external symbol
__mbctype
nafxcwd.lib(dcmeta.obj) : error LNK2001: unresolved external symbol
__mbctype
nafxcwd.lib(filelist.obj) : error LNK2001: unresolved external symbol
__mbctype
nafxcwd.lib(apphelp.obj) : error LNK2019: unresolved external symbol
__mbctype referenced in function "void __stdcall AfxFormatStrings(class
ATL::CStringT > > &,unsigned int,char const * const *,int)"
(?AfxFormatStrings@@YGXAAV?$CStringT@DV?$StrTraitM FC@DV?$ChTraitsCRT@D@A
TL@@@@@ATL@@IPBQBDH@Z
<mailto:?AfxFormatStrings@@YGXAAV?$CStringT@DV?$St rTraitMFC@DV?$ChTraits
CRT@D@ATL@@@@@ATL@@IPBQBDH@Z> )
nafxcwd.lib(viewedit.obj) : error LNK2019: unresolved external symbol
__mbctype referenced in function "public: void __thiscall
CEditView::ReadFromArchive(class CArchive &,unsigned int)"
(?ReadFromArchive@CEditView@@QAEXAAVCArchive@@I@Z
<mailto:?ReadFromArchive@CEditView@@QAEXAAVCArchiv e@@I@Z> )
nafxcwd.lib(oledlgs1.obj) : error LNK2019: unresolved external symbol
__mbctype referenced in function "public: int __thiscall
COleInsertDialog::CreateItem(class COleClientItem *)"
(?CreateItem@COleInsertDialog@@QAEHPAVCOleClientIt em@@@Z
<mailto:?CreateItem@COleInsertDialog@@QAEHPAVCOleC lientItem@@@Z> )
Debug/MFC_resetDB.exe : fatal error LNK1120: 3 unresolved externals
=20
Can some one explain why is this? Will MYSQL++ work with MFC?
Thank you very much.

------_=_NextPart_001_01C630ED.D9330977--

Reply With Quote
  #2  
Old   
Warren Young
 
Posts: n/a

Default Re: Will MySQL++ will build under MFC? - 02-13-2006 , 09:57 PM






Li, Eileen wrote:
Quote:
nafxcwd.lib(appcore.obj) : error LNK2001: unresolved external symbol
___argv
This is almost certainly due to a mismatch in build and/or linker
settings. VC++ requires that all libraries linked into a project have
the same build and linker settings. This is explained in README.vc.

--
MySQL++ Mailing List
For list archives: http://lists.mysql.com/plusplus
To unsubscribe: http://lists.mysql.com/plusplus?unsu...ie.nctu.edu.tw



Reply With Quote
  #3  
Old   
Li, Eileen
 
Posts: n/a

Default RE: Will MySQL++ will build under MFC? - 02-14-2006 , 09:55 AM



Thanks for the help.
I found if I does not include the following in resetDB example files in
VC++ console application, it will runs great, but if I include in the
project, it will has the same link errors with MFC project:
___________________________
#include <afxext.h> // MFC extensions
#include <afxdisp.h> // MFC Automation classes
#include <afxdtctl.h> // MFC support for Internet Explorer 4
Common Controls
#ifndef _AFX_NO_AFXCMN_SUPPORT
#include <afxcmn.h> // MFC support for Windows
Common Controls
#endif // _AFX_NO_AFXCMN_SUPPORT
______________________________________=20

Does any one has successfully build MySQL under MFC?

Thanks!


-----Original Message-----
From: Warren Young [mailto:mysqlpp (AT) etr-usa (DOT) com]=20
Sent: Monday, February 13, 2006 9:58 PM
To: MySQL++ Mailing List
Subject: Re: Will MySQL++ will build under MFC?

Li, Eileen wrote:
Quote:
nafxcwd.lib(appcore.obj) : error LNK2001: unresolved external symbol=20
___argv
This is almost certainly due to a mismatch in build and/or linker
settings. VC++ requires that all libraries linked into a project have
the same build and linker settings. This is explained in README.vc.

--=20
MySQL++ Mailing List
For list archives: http://lists.mysql.com/plusplus
To unsubscribe:
http://lists.mysql.com/plusplus?unsu...ouri (DOT) edu


--
MySQL++ Mailing List
For list archives: http://lists.mysql.com/plusplus
To unsubscribe: http://lists.mysql.com/plusplus?unsu...ie.nctu.edu.tw



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.