Board index » cppbuilder » ATL linking problem

ATL linking problem


2003-08-20 04:41:11 PM
cppbuilder79
(Using BCB5 Pro, Update Pack1 @ XP)
After reorganizing lots of packages, I rebuild a project. The project
compiles fine, but does not link properly. BCB comes up with;
[Linker Error] Unresolved external '__Module' referenced from
${BCB}\LIB\BCBATL.LIB|bcbatllib
Static or dynamic package linking makes no difference. Other projects
(which depend on the same packages) do link fine. I've recreated the
project, but that had no effect. I've 'cleaned' and rebuild all the
packages and the project, no effect. I have even installed BCB5 on a
refresh PC and build the project, but the linker error remains.
I read somewhere that the order of headers being included may have something
to do with this error. Can somebody verify that?
In the makefile there are no references to BCBATL.LIB. Does anybody have an
idea why BCBATL.LIB is linked in the first place?
Ralph
 
 

Re:ATL linking problem

"Ralph Kazemier" < XXXX@XXXXX.COM >wrote in message
Quote
The project compiles fine, but does not link properly. BCB comes up with;

[Linker Error] Unresolved external '__Module' referenced from
${BCB}\LIB\BCBATL.LIB|bcbatllib
I've found a workaround to get passed this problem. I've declared a
'_Module' variable in the projects main .cpp file;
#include <atl\atlmod.h>
TComModule& _Module=*static_cast<TComModule*>(NULL);
Which results in:
[C++ Warning] atlwin.h(1579): W8017 Redefinition of 'MESSAGE_HANDLER' is
not identical
Nevertheless, the project seems to run fine.
Ralph