Linker errors in .NET web service (LNK2019)
i had to discontinue something i was trying out in .NET for a couple of weeks cos of my project requirement, thankfully i am back now.
last time when i was working on my code was when i got link errors.
error LNK2019: unresolved external symbol _main referenced in function _mainCRTStartup
fatal error LNK1120: 1 unresolved externals
i had faced this error couple of times before n had gotten rid of it too ...much cos of trial n error method.But this time its not leaving me!
The problem is:
1. I am building a web service wrapper for my legacy code(c++).
2. For that I am loading a legacy dll(c++ dll) into my project at load time(I am not using DLLImport for reasons which need lot of explanation so i am avoiding it for now) and calling the exported method in it from my .NET web service.
3.I have just copied the DLL into the system directory and put the legacy header file into my .NET project folder and imported the library using
#pragma comment(lib, "CppClassExport")
4. when i build the solution i get these linker errors.
WHATS baffling me is ::::::
I first tested my .NET Web Service with a simple MFC win32 dll.
I didnt get any linker errors (It has a DllMain just like the legacy dll which is giving errors)
if anybody can give inputs on this, it would be great help for me.
i would be back on running track!
DO I SOUND UNAWARE OF SOME UNDERLYING CONCEPT? Please Guide.
The project type is worng. You are not compiling a dll but a win32 console application which needs a main function.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement