LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

error building dll

I am getting the following error when I try to build the dll in VC++.
"Linking...
   Creating library Debug/winport.lib and object Debug/winport.exp
LINK : warning LNK4098: defaultlib "MSVCRT" conflicts with use of other libs;
use /NODEFAULTLIB:library
MSVCRTD.lib(crtexe.obj) : error LNK2001: unresolved external symbol _main
Debug/winport.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe."

Can anyone help me to get rid of this problem?

Thanx & Regards,
Srini.




0 Kudos
Message 1 of 3
(2,779 Views)

srini,

Are you trying to use the dll in LabVIEW and getting the error from LabVIEW?  If you are using Measurement Studio there is a seperate discussion forum for those issues.  The MSVCRT is a Microsoft Visual C Run Time library.  This thread explains it a little better: MSVCRT.dll

If you are trying to create C++ dlls to be used in LabVIEW you may need to create wrappers if you are using certain classes.  Here is some more information on calling dlls in LabVIEW An Overview of Accessing DLLs or Shared Libraries from LabVIEW

Sam R.
Applications Engineer
National Instruments

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 2 of 3
(2,753 Views)
Hi Srini,

It sounds like you are missing the main function from your c file. You have to make sure that the following function is somewhere in the c file:
int main (int argc, char *argv[])
Also remember that the function is case sensitive, so make sure main is not capitalized.
In case you are going to be using DAQmx calls as well here is a KnowledgeBase to help you link the .lib files you need in the correct path: http://digital.ni.com/public.nsf/websearch/38F67B28D995C6958625706E000C580C?OpenDocument

Please let me know if this doesn't fix your problem. Maybe you can provide more detailed information like whether you are using Visual C++ 6.0 or .NET, what external libraries you are using, as well as attaching your code if possible.

Regards,

Tica Taveras
Applications Engineer
Natinal Instruments

0 Kudos
Message 3 of 3
(2,747 Views)