I have a question about Active Template Library (ATL) using in
C++BuilderX. ATL headers are included and bcbatl.lib is included too.
So, why when I try to compile, I think simplest atl appclication (source
code below), I got an error:
Error: Unresolved external '__fastcall
System::AnsiString::~AnsiString()' referenced from
C:\PROGRAMY\CBUILDERX\LIB\BCBATL.LIB|bcbatllib
Error: Unresolved external '__fastcall
System::AnsiString::AnsiString(const char *)' referenced from
C:\PROGRAMY\CBUILDERX\LIB\BCBATL.LIB|bcbatllib
Error: Unresolved external '__fastcall Sysutils::FindCmdLineSwitch(const
System::AnsiString, const System::Set<char, 0, 255>&, bool)' referenced
from C:\PROGRAMY\CBUILDERX\LIB\BCBATL.LIB|bcbatllib
The same error is in more complex applications (e.x. with CwindowImpl
class).
source code:
#include <atl\atlbase.h>
CComModule _Module;
int APIENTRY WinMain( HINSTANCE hInstance, HINSTANCE, LPSTR, int )
{
_Module.Init( NULL, hInstance );
_Module.Term();
return 0;
}
Michal Strug
#include <atl\atlbase.h>
CComModule _Module;
extern "C" GUID GUID_ATLVer30 = { 0xb62f5910, 0x6528, 0x11d1, { 0x96,
0x11, 0x0, 0x0, 0xf8, 0x1e, 0xd, 0xd } };
namespace ATL {
CComModule* _pModule = NULL;
GUID CComModule::m_libid = {0x0,0x0,0x0,{0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0}};
};
int APIENTRY WinMain( HINSTANCE hInstance, HINSTANCE, LPSTR, int )
{
_Module.Init( NULL, hInstance );
_Module.Term();
return 0;
}
The question is: Why this code work well, if I add thes lines (lines
from bcbatllib.cpp)??
It looks like borland include to C++BuilderX atl library from C++Builder
6, which uses VCL, and C++BuilderX haven't got VCL libraries.
----------------------------------------------
| So, why borland didn't change atl libraries in C++BuilderX??? |
----------------------------------------------
I've tried this in version Personal and Enterprise Trial, and both
behave in the same way.
Any question on compiling atl under cbx: mb...@poczta.onet.pl.
Michal Strug