LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Building a DLL for use with Labview

Hello,

I am trying to build a DLL to allow Labview to run some C code, but I
am receiving the following error at the linking stage:

***********************************************************************

Linking...
Creating library Debug/lib1wire.lib and object Debug/lib1wire.exp
cin.obj : error LNK2001: unresolved external symbol _CINRun
Debug/lib1wire.dll : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.

lib1wire.dll - 2 error(s), 0 warning(s)

***********************************************************************

There seems to be a missing symbol (_CINRun) from the Labview CIN
library.

I am using Labview 6.1 and Microsoft Visual C++ 6 for the C part.

I have followed the instructions in the Labview m
anual and included
the relevent objects and definitions as well as setting all of the
project options, yet I always receive this error.

If anyone with more experience of this could let me know what I might
be doing wrong then I would be very grateful. I am probably missing
something obvious.

Regards,

Stephen
0 Kudos
Message 1 of 4
(2,973 Views)
CINRUN is not used when building a DLL.

Looks like something's confused about a CIN node and a Call Library (DLL) node.

Make sure you follow the DLL instructions - it works - I just did one last week.
Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


LinkedIn

Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 2 of 4
(2,973 Views)
Hello,

CoastalMaineBird wrote in message news:<506500000005000000E7180100-1042324653000@exchange.ni.com>...
> CINRUN is not used when building a DLL.

Okay, but in that case I have no idea why it is being referred to when
I attempt to compile.

> Looks like something's confused about a CIN node and a Call Library
> (DLL) node.

Do you have any idea why that might be the case? What does one do
that is different between creating each of those?

> Make sure you follow the DLL instructions - it works - I just did one
> last week.

As I mentioned in my original message, I followed the instructions -
to the letter. I went through them once and then a second time to
ensure that I had done exactly what it said, yet I could find no
discrepancy.

Regar
ds,

Stephen
0 Kudos
Message 3 of 4
(2,973 Views)
Do you have any idea why that might be the case?  What does one do that is different between creating each of those?

For one thing, the node on the diagram. If you place a CIN node on the diagram, and then CREATE C FILE from it, you get a call to CINRUN in the body. If you start from a DLL node, you get a call to "funcName", or whatever you called it in the CONFIGURE dialog box. You didn't call it "CINRUN", did you?


As I mentioned in my original message, I followed the instructions - to the letter.

I was just wondering if you followed part of the CIN instructions accidentally.

Did you #include the file "CIN.c"? You shouldn't.

Do a FIND IN FILES search for the word CINRUN, in all files in your projec
t. If you find it in your files, there's the error - you shouldn't. If you don't, then comment out ALL your #includes in ALL your files, and recompile. You should NOT get errors related to CINRUN.

Since it's a LINK error, not a compile-time error, I would suspect that you have an #include reference to CINRUN, but don't actually call it. If you called it but didn't include the prototype, you'd get a compiler complaint, not a linker complaint.
Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


LinkedIn

Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 4 of 4
(2,973 Views)