Linking Problem when trying to create ReleaseUMinDependency[error LNK2001: unresolved external symbol _main] 
Author Message
 Linking Problem when trying to create ReleaseUMinDependency[error LNK2001: unresolved external symbol _main]

Hi,

I created an ATL COM component using VC++ 6.0. Everything is fine when I
compile for Win32 debug. But I get a linking error(error LNK2001: unresolved
external symbol _main), when I change  to "ReleaseUMinDependency". What am I
missing ?

Thanks in advance.

Regards,

Soumitra Banerjee.

The error message is as follows:

Deleting intermediate files and output files for project 'SEDataServer -
Win32 Unicode Release MinDependency'.
--------------------Configuration: SEDataServer - Win32 Unicode Release
MinDependency--------------------
Creating Type Library...
Microsoft (R) MIDL Compiler Version 5.01.0164
Copyright (c) Microsoft Corp 1991-1997. All rights reserved.
Processing C:\SEDevelopment\BusinessService\SEDataServer\SEDataServer.idl
SEDataServer.idl
Processing C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\oaidl.idl
oaidl.idl
Processing C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\objidl.idl
objidl.idl
Processing C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\unknwn.idl
unknwn.idl
Processing C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\wtypes.idl
wtypes.idl
Processing C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\ocidl.idl
ocidl.idl
Processing C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\oleidl.idl
oleidl.idl
Processing C:\Program Files\Microsoft Visual
Studio\VC98\INCLUDE\servprov.idl
servprov.idl
Processing C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\urlmon.idl
urlmon.idl
Processing C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\msxml.idl
msxml.idl
Compiling resources...
Compiling...
StdAfx.cpp
c:\sedevelopment\businessservice\sedataserver\releaseumindependency\msado15.
tlh(405) : warning C4146: unary minus operator applied to unsigned type,
result still unsigned
Compiling...
SEDataServer.cpp
SEDS.cpp
C:\SEDevelopment\BusinessService\SEDataServer\SEDS.cpp(40) : warning C4530:
C++ exception handler used, but unwind semantics are not enabled.
Specify -GX
Generating Code...
Linking...
   Creating library ReleaseUMinDependency/SEDataServer.lib and object
ReleaseUMinDependency/SEDataServer.exp
LIBCMT.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
ReleaseUMinDependency/SEDataServer.dll : fatal error LNK1120: 1 unresolved
externals
Error executing link.exe.

SEDataServer.dll - 2 error(s), 2 warning(s)



Wed, 02 Jun 2004 03:46:50 GMT  
 Linking Problem when trying to create ReleaseUMinDependency[error LNK2001: unresolved external symbol _main]
Remove _ATL_MIN_CRT define in Project Settings
--
With best wishes,
    Igor Tandetnik

"For every complex problem, there is a solution that is simple, neat,
and wrong." H.L. Mencken


Quote:
> Hi,

> I created an ATL COM component using VC++ 6.0. Everything is fine when
I
> compile for Win32 debug. But I get a linking error(error LNK2001:
unresolved
> external symbol _main), when I change  to "ReleaseUMinDependency".
What am I
> missing ?

> Thanks in advance.

> Regards,

> Soumitra Banerjee.

> The error message is as follows:

> Deleting intermediate files and output files for project
'SEDataServer -
> Win32 Unicode Release MinDependency'.
> --------------------Configuration: SEDataServer - Win32 Unicode
Release
> MinDependency--------------------
> Creating Type Library...
> Microsoft (R) MIDL Compiler Version 5.01.0164
> Copyright (c) Microsoft Corp 1991-1997. All rights reserved.
> Processing

C:\SEDevelopment\BusinessService\SEDataServer\SEDataServer.idl
Quote:
> SEDataServer.idl
> Processing C:\Program Files\Microsoft Visual

Studio\VC98\INCLUDE\oaidl.idl
Quote:
> oaidl.idl
> Processing C:\Program Files\Microsoft Visual

Studio\VC98\INCLUDE\objidl.idl
Quote:
> objidl.idl
> Processing C:\Program Files\Microsoft Visual

Studio\VC98\INCLUDE\unknwn.idl
Quote:
> unknwn.idl
> Processing C:\Program Files\Microsoft Visual

Studio\VC98\INCLUDE\wtypes.idl
Quote:
> wtypes.idl
> Processing C:\Program Files\Microsoft Visual

Studio\VC98\INCLUDE\ocidl.idl
Quote:
> ocidl.idl
> Processing C:\Program Files\Microsoft Visual

Studio\VC98\INCLUDE\oleidl.idl
Quote:
> oleidl.idl
> Processing C:\Program Files\Microsoft Visual
> Studio\VC98\INCLUDE\servprov.idl
> servprov.idl
> Processing C:\Program Files\Microsoft Visual

Studio\VC98\INCLUDE\urlmon.idl
Quote:
> urlmon.idl
> Processing C:\Program Files\Microsoft Visual

Studio\VC98\INCLUDE\msxml.idl
Quote:
> msxml.idl
> Compiling resources...
> Compiling...
> StdAfx.cpp

c:\sedevelopment\businessservice\sedataserver\releaseumindependency\msad
o15.

- Show quoted text -

Quote:
> tlh(405) : warning C4146: unary minus operator applied to unsigned
type,
> result still unsigned
> Compiling...
> SEDataServer.cpp
> SEDS.cpp
> C:\SEDevelopment\BusinessService\SEDataServer\SEDS.cpp(40) : warning
C4530:
> C++ exception handler used, but unwind semantics are not enabled.
> Specify -GX
> Generating Code...
> Linking...
>    Creating library ReleaseUMinDependency/SEDataServer.lib and object
> ReleaseUMinDependency/SEDataServer.exp
> LIBCMT.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
> ReleaseUMinDependency/SEDataServer.dll : fatal error LNK1120: 1
unresolved
> externals
> Error executing link.exe.

> SEDataServer.dll - 2 error(s), 2 warning(s)



Wed, 02 Jun 2004 03:57:56 GMT  
 Linking Problem when trying to create ReleaseUMinDependency[error LNK2001: unresolved external symbol _main]
Hi Igor,
Thanks for mail. I am still getting the error as follows:

Compiling...
StdAfx.cpp
c:\sedevelopment\businessservice\sedataserver\releaseumindependency\msado15.
tlh(405) : warning C4146: unary minus operator applied to unsigned type,
result still unsigned
LIBCMT.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
StdAfx.exe : fatal error LNK1120: 1 unresolved externals
Error executing cl.exe.

SEDataServer.dll - 2 error(s), 1 warning(s)

Regards,

Soumitra.


Quote:
> Remove _ATL_MIN_CRT define in Project Settings
> --
> With best wishes,
>     Igor Tandetnik

> "For every complex problem, there is a solution that is simple, neat,
> and wrong." H.L. Mencken



> > Hi,

> > I created an ATL COM component using VC++ 6.0. Everything is fine when
> I
> > compile for Win32 debug. But I get a linking error(error LNK2001:
> unresolved
> > external symbol _main), when I change  to "ReleaseUMinDependency".
> What am I
> > missing ?

> > Thanks in advance.

> > Regards,

> > Soumitra Banerjee.

> > The error message is as follows:

> > Deleting intermediate files and output files for project
> 'SEDataServer -
> > Win32 Unicode Release MinDependency'.
> > --------------------Configuration: SEDataServer - Win32 Unicode
> Release
> > MinDependency--------------------
> > Creating Type Library...
> > Microsoft (R) MIDL Compiler Version 5.01.0164
> > Copyright (c) Microsoft Corp 1991-1997. All rights reserved.
> > Processing
> C:\SEDevelopment\BusinessService\SEDataServer\SEDataServer.idl
> > SEDataServer.idl
> > Processing C:\Program Files\Microsoft Visual
> Studio\VC98\INCLUDE\oaidl.idl
> > oaidl.idl
> > Processing C:\Program Files\Microsoft Visual
> Studio\VC98\INCLUDE\objidl.idl
> > objidl.idl
> > Processing C:\Program Files\Microsoft Visual
> Studio\VC98\INCLUDE\unknwn.idl
> > unknwn.idl
> > Processing C:\Program Files\Microsoft Visual
> Studio\VC98\INCLUDE\wtypes.idl
> > wtypes.idl
> > Processing C:\Program Files\Microsoft Visual
> Studio\VC98\INCLUDE\ocidl.idl
> > ocidl.idl
> > Processing C:\Program Files\Microsoft Visual
> Studio\VC98\INCLUDE\oleidl.idl
> > oleidl.idl
> > Processing C:\Program Files\Microsoft Visual
> > Studio\VC98\INCLUDE\servprov.idl
> > servprov.idl
> > Processing C:\Program Files\Microsoft Visual
> Studio\VC98\INCLUDE\urlmon.idl
> > urlmon.idl
> > Processing C:\Program Files\Microsoft Visual
> Studio\VC98\INCLUDE\msxml.idl
> > msxml.idl
> > Compiling resources...
> > Compiling...
> > StdAfx.cpp

> c:\sedevelopment\businessservice\sedataserver\releaseumindependency\msad
> o15.
> > tlh(405) : warning C4146: unary minus operator applied to unsigned
> type,
> > result still unsigned
> > Compiling...
> > SEDataServer.cpp
> > SEDS.cpp
> > C:\SEDevelopment\BusinessService\SEDataServer\SEDS.cpp(40) : warning
> C4530:
> > C++ exception handler used, but unwind semantics are not enabled.
> > Specify -GX
> > Generating Code...
> > Linking...
> >    Creating library ReleaseUMinDependency/SEDataServer.lib and object
> > ReleaseUMinDependency/SEDataServer.exp
> > LIBCMT.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
> > ReleaseUMinDependency/SEDataServer.dll : fatal error LNK1120: 1
> unresolved
> > externals
> > Error executing link.exe.

> > SEDataServer.dll - 2 error(s), 2 warning(s)



Wed, 02 Jun 2004 04:09:47 GMT  
 Linking Problem when trying to create ReleaseUMinDependency[error LNK2001: unresolved external symbol _main]
For the first problem, see KB Article Q253317 "BUG: Using #import with
ADO 2.5 and Later Causes C4146 Warning in Visual C++"

For the second - have you removed the define as suggested? Go to Project
| Settings | C/C++ | General. Make sure the correct configuration is
selected in the "Settings for:" drop-down list at the top left corner.
Delete _ATL_MIN_CRT in Preprocessor Definitions box.
--
With best wishes,
    Igor Tandetnik

"For every complex problem, there is a solution that is simple, neat,
and wrong." H.L. Mencken


Quote:
> Hi Igor,
> Thanks for mail. I am still getting the error as follows:

> Compiling...
> StdAfx.cpp

c:\sedevelopment\businessservice\sedataserver\releaseumindependency\msad
o15.
Quote:
> tlh(405) : warning C4146: unary minus operator applied to unsigned
type,
> result still unsigned
> LIBCMT.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
> StdAfx.exe : fatal error LNK1120: 1 unresolved externals
> Error executing cl.exe.

> SEDataServer.dll - 2 error(s), 1 warning(s)

> Regards,

> Soumitra.



> > Remove _ATL_MIN_CRT define in Project Settings
> > --
> > With best wishes,
> >     Igor Tandetnik

> > "For every complex problem, there is a solution that is simple,
neat,
> > and wrong." H.L. Mencken



> > > Hi,

> > > I created an ATL COM component using VC++ 6.0. Everything is fine
when
> > I
> > > compile for Win32 debug. But I get a linking error(error LNK2001:
> > unresolved
> > > external symbol _main), when I change  to "ReleaseUMinDependency".
> > What am I
> > > missing ?

> > > Thanks in advance.

> > > Regards,

> > > Soumitra Banerjee.

> > > The error message is as follows:

> > > Deleting intermediate files and output files for project
> > 'SEDataServer -
> > > Win32 Unicode Release MinDependency'.
> > > --------------------Configuration: SEDataServer - Win32 Unicode
> > Release
> > > MinDependency--------------------
> > > Creating Type Library...
> > > Microsoft (R) MIDL Compiler Version 5.01.0164
> > > Copyright (c) Microsoft Corp 1991-1997. All rights reserved.
> > > Processing
> > C:\SEDevelopment\BusinessService\SEDataServer\SEDataServer.idl
> > > SEDataServer.idl
> > > Processing C:\Program Files\Microsoft Visual
> > Studio\VC98\INCLUDE\oaidl.idl
> > > oaidl.idl
> > > Processing C:\Program Files\Microsoft Visual
> > Studio\VC98\INCLUDE\objidl.idl
> > > objidl.idl
> > > Processing C:\Program Files\Microsoft Visual
> > Studio\VC98\INCLUDE\unknwn.idl
> > > unknwn.idl
> > > Processing C:\Program Files\Microsoft Visual
> > Studio\VC98\INCLUDE\wtypes.idl
> > > wtypes.idl
> > > Processing C:\Program Files\Microsoft Visual
> > Studio\VC98\INCLUDE\ocidl.idl
> > > ocidl.idl
> > > Processing C:\Program Files\Microsoft Visual
> > Studio\VC98\INCLUDE\oleidl.idl
> > > oleidl.idl
> > > Processing C:\Program Files\Microsoft Visual
> > > Studio\VC98\INCLUDE\servprov.idl
> > > servprov.idl
> > > Processing C:\Program Files\Microsoft Visual
> > Studio\VC98\INCLUDE\urlmon.idl
> > > urlmon.idl
> > > Processing C:\Program Files\Microsoft Visual
> > Studio\VC98\INCLUDE\msxml.idl
> > > msxml.idl
> > > Compiling resources...
> > > Compiling...
> > > StdAfx.cpp

c:\sedevelopment\businessservice\sedataserver\releaseumindependency\msad

- Show quoted text -

Quote:
> > o15.
> > > tlh(405) : warning C4146: unary minus operator applied to unsigned
> > type,
> > > result still unsigned
> > > Compiling...
> > > SEDataServer.cpp
> > > SEDS.cpp
> > > C:\SEDevelopment\BusinessService\SEDataServer\SEDS.cpp(40) :
warning
> > C4530:
> > > C++ exception handler used, but unwind semantics are not enabled.
> > > Specify -GX
> > > Generating Code...
> > > Linking...
> > >    Creating library ReleaseUMinDependency/SEDataServer.lib and
object
> > > ReleaseUMinDependency/SEDataServer.exp
> > > LIBCMT.lib(crt0.obj) : error LNK2001: unresolved external symbol
_main
> > > ReleaseUMinDependency/SEDataServer.dll : fatal error LNK1120: 1
> > unresolved
> > > externals
> > > Error executing link.exe.

> > > SEDataServer.dll - 2 error(s), 2 warning(s)



Wed, 02 Jun 2004 04:33:05 GMT  
 Linking Problem when trying to create ReleaseUMinDependency[error LNK2001: unresolved external symbol _main]
Hi Igor,

It worked. The settings were not getting saved and that's why I was getting
the same error.

Thanks.
Regards,

Soumitra.


Quote:
> Hi Igor,
> Thanks for mail. I am still getting the error as follows:

> Compiling...
> StdAfx.cpp

c:\sedevelopment\businessservice\sedataserver\releaseumindependency\msado15.
Quote:
> tlh(405) : warning C4146: unary minus operator applied to unsigned type,
> result still unsigned
> LIBCMT.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
> StdAfx.exe : fatal error LNK1120: 1 unresolved externals
> Error executing cl.exe.

> SEDataServer.dll - 2 error(s), 1 warning(s)

> Regards,

> Soumitra.



> > Remove _ATL_MIN_CRT define in Project Settings
> > --
> > With best wishes,
> >     Igor Tandetnik

> > "For every complex problem, there is a solution that is simple, neat,
> > and wrong." H.L. Mencken



> > > Hi,

> > > I created an ATL COM component using VC++ 6.0. Everything is fine when
> > I
> > > compile for Win32 debug. But I get a linking error(error LNK2001:
> > unresolved
> > > external symbol _main), when I change  to "ReleaseUMinDependency".
> > What am I
> > > missing ?

> > > Thanks in advance.

> > > Regards,

> > > Soumitra Banerjee.

> > > The error message is as follows:

> > > Deleting intermediate files and output files for project
> > 'SEDataServer -
> > > Win32 Unicode Release MinDependency'.
> > > --------------------Configuration: SEDataServer - Win32 Unicode
> > Release
> > > MinDependency--------------------
> > > Creating Type Library...
> > > Microsoft (R) MIDL Compiler Version 5.01.0164
> > > Copyright (c) Microsoft Corp 1991-1997. All rights reserved.
> > > Processing
> > C:\SEDevelopment\BusinessService\SEDataServer\SEDataServer.idl
> > > SEDataServer.idl
> > > Processing C:\Program Files\Microsoft Visual
> > Studio\VC98\INCLUDE\oaidl.idl
> > > oaidl.idl
> > > Processing C:\Program Files\Microsoft Visual
> > Studio\VC98\INCLUDE\objidl.idl
> > > objidl.idl
> > > Processing C:\Program Files\Microsoft Visual
> > Studio\VC98\INCLUDE\unknwn.idl
> > > unknwn.idl
> > > Processing C:\Program Files\Microsoft Visual
> > Studio\VC98\INCLUDE\wtypes.idl
> > > wtypes.idl
> > > Processing C:\Program Files\Microsoft Visual
> > Studio\VC98\INCLUDE\ocidl.idl
> > > ocidl.idl
> > > Processing C:\Program Files\Microsoft Visual
> > Studio\VC98\INCLUDE\oleidl.idl
> > > oleidl.idl
> > > Processing C:\Program Files\Microsoft Visual
> > > Studio\VC98\INCLUDE\servprov.idl
> > > servprov.idl
> > > Processing C:\Program Files\Microsoft Visual
> > Studio\VC98\INCLUDE\urlmon.idl
> > > urlmon.idl
> > > Processing C:\Program Files\Microsoft Visual
> > Studio\VC98\INCLUDE\msxml.idl
> > > msxml.idl
> > > Compiling resources...
> > > Compiling...
> > > StdAfx.cpp

> > c:\sedevelopment\businessservice\sedataserver\releaseumindependency\msad
> > o15.
> > > tlh(405) : warning C4146: unary minus operator applied to unsigned
> > type,
> > > result still unsigned
> > > Compiling...
> > > SEDataServer.cpp
> > > SEDS.cpp
> > > C:\SEDevelopment\BusinessService\SEDataServer\SEDS.cpp(40) : warning
> > C4530:
> > > C++ exception handler used, but unwind semantics are not enabled.
> > > Specify -GX
> > > Generating Code...
> > > Linking...
> > >    Creating library ReleaseUMinDependency/SEDataServer.lib and object
> > > ReleaseUMinDependency/SEDataServer.exp
> > > LIBCMT.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
> > > ReleaseUMinDependency/SEDataServer.dll : fatal error LNK1120: 1
> > unresolved
> > > externals
> > > Error executing link.exe.

> > > SEDataServer.dll - 2 error(s), 2 warning(s)



Wed, 02 Jun 2004 04:41:53 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. LNK2001 when trying to link a MFC Extension DLL into another Extension DLL

2. Error during linking - error LNK2001

3. Error LNK2001 when I try to implement a RUNTIME_CLASS

4. Error LNK2001 when I try to implement a RUNTIME_CLASS

5. Error LNK2001 while try attach menu to Frame.

6. Trying to get started error LNK2001: unresolved external symbol

7. 1st try no link, 2nd try link?

8. Linking Error LNK2001

9. LNK2001 Linking Error

10. Link Error LNK2001: Multithreaded ATL Object

11. Link error LNK2001

12. linking error LNK2001 on DllGetClassObject

 

 
Powered by phpBB® Forum Software