467,228 Members | 1,391 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,228 developers. It's quick & easy.

Release build error LNK2019


I think it is a FAQ but I found no answer to my problem.
I created a C# program that called some C++ legacy code.
I created 2 projects :

1) a DLL (IPRCommWrapper.dll) including an unmanaged C++ wrapper for
legacy code and a managed C++ wrapper to allow C# to call this unmanaged
2) a C# Win application

In Debug mode, everything works fine.
When I try to build in release mode, I have the following error :

"libcmt.lib(crt0.obj) : error LNK2019: unresolved external symbol _main
referenced in function _mainCRTStartup".

here is the output from the build log :

Creating temporary file
"c:\Projects\IPRManaged\IPRCommWrapper\Release\RSP 000017.rsp" with
/OUT:"C:\Projects\IPRManaged\Release\IPRCommWrapper .dll" /INCREMENTAL:NO
/PDB:"C:\Projects\IPRManaged\Release/IPRCommWrapper.pdb" /NOENTRY
/FIXED:No /noentry nochkclr.obj mscoree.lib pcomm.lib kernel32.lib
user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib
ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib "\Program
Files\Microsoft Visual Studio .NET 2003\Sdk\v1.1\Lib\mscoree.lib"
Creating command line "link.exe
@c:\Projects\IPRManaged\IPRCommWrapper\Release\RSP 000017.rsp"
I suppose I did not choose appropriate options (though I selected
"NoEntry" as DLL entry point).

Thanks in advance for any help.
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 16 '05 #1
  • viewed: 1406

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by David++ | last post: by
reply views Thread by Usman | last post: by
1 post views Thread by developer | last post: by
2 posts views Thread by 2b|!2b==? | last post: by
1 post views Thread by eraserwars | last post: by
reply views Thread by Adict | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.