LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LNK2001 Error with EasyDLL.zip

I downloaded the EasyDLL.zip example from the "How to Build a DLL with Visual C++" tutorial website. I would like to simply modify this code to inferface some C++ code with LabVIEW. When attempting some simple modifications, the EasyDLL.cpp file compiles okay but when I try to build EasyDLL.exe I get the following error message:

Linking...
Creating library Debug/EasyDLL.lib and object Debug/EasyDLL.exp
LIBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
Debug/EasyDLL.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
EasyDLL.exe - 2 error(s), 0 warning(s)

What is the simplest way to fix this problem? The EasyDLL.zip file can be found at: http://zone.ni.com/devzone/conceptd.nsf/webm
ain/3A1F4B7CBC68B636862567CC004D5CCA?opendocument
0 Kudos
Message 1 of 2
(2,584 Views)
What changes did you make? For some reason, this DLL is looking for a main function which a DLL will never have. Have you started backing out your changes to see where the error is happening? We will need more information to be able to solve this issue for you.

Randy Hoskin
Applications Engineer
National Instruments
http://www.ni.com/ask
0 Kudos
Message 2 of 2
(2,584 Views)