LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

c++ builder 6 unresolved external error loading a dll

Im using LabVIEW 6.1 and i'm trying to export a DLL that performs math routines (such as FFT and stuff..) to include it im my BC#B6 project. I chose the C Calling convention (because the Standard Calling Convention cannot be converted by the Coff2omf.exe tool (to get rid of the 0x21 error)). Still, i now get the following linking error (it searches for an underscore before the first letter of my function):

[Linker Error] Unresolved external '_calcul' referenced from E:\WORK\PROJECT\CALLINGFORM.OBJ

for now i only have a simple "multiply by 2" function that takes an int and returns an int :
int16 __cdecl calcul(int16 Input);

I would like to know...
1 - How to get rid of this problem - where is the source
of the problem (application builder i guess)?
2 - Will I have this problem if i link dynamically the driver?
3 - do i need to link the Run-time engine dlls to make it work in both static and dynamic loading?

Simon Lapierre
slapierre@sonomax.com
0 Kudos
Message 1 of 4
(5,249 Views)
Hi,
It may be that the linker is looking definitions(libraries) of the functions you are using. Make sure the linker can resolve the paths to any "external" functions, for example, C math routine functions.
'Ope this helps,
-ken-
0 Kudos
Message 2 of 4
(5,249 Views)
Hello Simon,

Thank you for contacting National Instruments.

When you created your DLL in LabVIEW, a LIB file should also have been created. To call the DLL in C#, make sure that you include the LIB file in C#.

In answer to your questions:

1. You can solve this problem by including the LIB file in C#.
2. You will not have this problem if you dynamically link the driver.
3. You do not need to link the Run-time engine DLLs to make it work in both static and dynamic loading.

I hope this helps. Let me know if this does not solve your problem.

Sean C.
Applications Engineer
National Instruments
0 Kudos
Message 3 of 4
(5,249 Views)
Sean,
Since Simon is trying to link an existing DLL using the Labview code node, the library that should be available in the same location, or in a resolvable path is the .LIB file that was prouduced by the C compiler
Thus, if he is linking xxxx.DLL he should also have xxxx.LIB ( his math fuction definitions) I hope this
is a bit clearer than my earlier post
Ken
0 Kudos
Message 4 of 4
(5,249 Views)