By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,152 Members | 1,837 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,152 IT Pros & Developers. It's quick & easy.

Release build error LNK2019

P: n/a
Hi,

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
wrapper
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
contents
[
/OUT:"C:\Projects\IPRManaged\Release\IPRCommWrapper .dll" /INCREMENTAL:NO
/NOLOGO /DLL /DEBUG
/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"
.\Release\AssemblyInfo.obj
.\Release\comportmoxa.obj
.\Release\LogFile.obj
.\Release\PortParam.obj
.\Release\RtrPort.obj
.\Release\StdAfx.obj
.\Release\transportInterface.obj
.\Release\TrspPortManaged.obj
.\Release\app.res
]
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
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.