failed to link ATL project when not in debug mode

failed to link ATL project when not in debug mode

Post by mac » Sat, 28 Jul 2001 19:05:27



Hello!

I'm using VC6 and ATL and have problems linking my ATL project which contain
one COM object.
When I compile and link using the 'Win32 debug' configuration everything is
fine but when i switch
to any other build configuration I get the same linking problem:

. . .
Linking...
   Creating library ReleaseMinSize/MyComponent.lib and object
ReleaseMinSize/MyComponent.exp
LIBCMT.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
ReleaseMinSize/MyComponent.dll : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.

MyComponent.dll - 2 error(s), 3 warning(s)

 
 
 

failed to link ATL project when not in debug mode

Post by Alexander Nickolo » Sun, 29 Jul 2001 02:46:29


See item 2 in the COM/ATL FAQ in my signature.

--
=====================================
Alexander Nickolov
Microsoft MVP [VC], MCSD

MVP VC FAQ: http://www.mvps.org/vcfaq
=====================================


Quote:> Hello!

> I'm using VC6 and ATL and have problems linking my ATL project which
contain
> one COM object.
> When I compile and link using the 'Win32 debug' configuration everything
is
> fine but when i switch
> to any other build configuration I get the same linking problem:

> . . .
> Linking...
>    Creating library ReleaseMinSize/MyComponent.lib and object
> ReleaseMinSize/MyComponent.exp
> LIBCMT.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
> ReleaseMinSize/MyComponent.dll : fatal error LNK1120: 1 unresolved
externals
> Error executing link.exe.

> MyComponent.dll - 2 error(s), 3 warning(s)


 
 
 

1. TAPI program can be compiled and linked in debug mode but not release mode

Hello

I am in no way an 'experienced' C++ programmer so this may be a really
simple problem.

I have created a full blown TAPI app (ie not assisted TAPI) which works fine
and can be compiled and linked OK in Debug mode.  I am using VC++ v6. (but
have not added any servicepacks).  I have included tapi.h and statically
link to tapi32.lib.

When I try to compile in VC++'s Release mode it complains at the TAPI
commands - eg lineInitialize etc.  Why should this be?  What am I doing
wrong?

Angus Comber

2. MIDI Input help

3. MFC 1.51 Compiler bug appears in RELEASE mode not DEBUG mode

4. DFE-530TX Fast Ethernet and QNX 4.25

5. VC++ 6.0 program works fine in debug mode, but not in release mode

6. Q320176 (?)

7. Kernel32.Dll memory access error in Release mode, not in debug mode

8. DATA_B3 data-ptr byte order

9. MAPILogon fails in Corp Email Mode, but not in Internet Mail Only Mode????

10. DllRegisterServer fails in Debug version of ATL component

11. Slow links in Debug mode

12. Debug-mode VXD fail. Why?

13. not able to use CDialog Classes in ATL Projects