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

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
  • viewed: 1406
Share:

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.