View Single Post
  #12 (permalink)  
Old 03-28-2007, 04:01 AM
Karpagarajan Karpagarajan is offline
D-Web Analyst
 
Join Date: Mar 2007
Posts: 299
Karpagarajan is on a distinguished road
Thumbs up Re: VC++ Tips & Tricks

When i tried to create a dll in c using visual c++ compiler i received these errors,

LNK2001: unresolved external symbol _main
Debug/windll.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.

The actual reason for the above problem is...

The problem is creating a executable file
hence the compiler is looking for the main method..

Inorder to create a DLL file u have to some manipulation in the project properties.
i.e open project properties window and select the link tab.
change the output file from exe to DLL and the "Project Options" text box change the "subsytem console" to "dll"

After setting this in the project properties, the program was compiled successfully.

thanks
__________________
Karpagarajan. R
Necessity is the mother of invention

Last edited by Booom : 08-09-2007 at 04:39 AM.
Reply With Quote