вот это прекрасно компилится из среды (с опцией Use MFC in a Shared DLL.)
| Код | // test.cpp : Defines the entry point for the console application. // #define UNICODE #define _UNICODE
//#include "stdafx.h" #include "CString"
#include <iostream> #include <tchar.h> #include "afxdb.h" #include "odbcinst.h" #include "comutil.h" #include "conio.h"
int _tmain(int argc, _TCHAR* argv[]) {
CString s; CDatabase database;
return 0; }
|
В командной строке это не компилится (cl /MD test.cpp >> test). Если же удалить строки с | Код | CString s; CDatabase database;
|
то всё отлично компилится из коммандной строки.
сообщение об ошибке в командной строке
| Код | /out:test.exe test.obj uafxcw.lib(thrdcore.obj) : error LNK2019: unresolved external symbol __endthreadex referenced in function "void __stdcall AfxEndThread(unsigned int,int)" (?AfxEndThread@@YGXIH@Z) uafxcw.lib(thrdcore.obj) : error LNK2019: unresolved external symbol __beginthreadex referenced in function "public: int __thiscall CWinThread::CreateThread(unsigned long,unsigned int,struct _SECURITY_ATTRIBUTES *)" (?CreateThread@CWinThread@@QAEHKIPAU_SECURITY_ATTRIBUTES@@@Z) test.exe : fatal error LNK1120: 2 unresolved externals
|
В чём проблемы? |