Linker errors in .NET web service (LNK2019)

Started by
2 comments, last by Jell 19 years, 12 months ago
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.
Tough times don''t last,Tough people Do.
Advertisement
The project type is worng. You are not compiling a dll but a win32 console application which needs a main function.
Puhlese.. gimme a break...i have been doing this over a month now...dont tell me that i dont know which project type i am using.

fyi: as i said in my query that this .NET web service has worked perfectly fine with a test DLL.



Tough times don''t last,Tough people Do.
I got so tired of searching on net..plz help !!!
Tough times don''t last,Tough people Do.

This topic is closed to new replies.

Advertisement