02-08-2010 03:25 PM
Hello,
I am trying to use Java methods into LV. I am doing so by creating Java Invocation Interface, usind which I can call Java methods into C++ and then create a shared library that can be called into LV.
When I am importing my shared library into Labview, I am getting the following error messages:
"
The shared library contains 3 function(s). But no function is found and recognized in the header file. The following function(s) cannot be wrapped. If you want to import these functions, please review the warning messages next to the functions below. You will need to fix the problems before you can continue with the wizard.
jclass invokeJavaClass(JNIEnv* jenv, string className);
The following symbols are not defined:
jclass;
Undefined symbols can prevent the wizard from recognizing functions and parameters. To correct this problem, check the header file to determine if you must add preprocessor definitions. Click the Back button to return to the previous page of the wizard to add a preprocessor definitionsl (for example, "NIAPI_stdcall = __stdcall" or "NIAPIDefined = 1").
The following header file was not found in the specified header file or one of the referenced header files:
- string
- iostream
- cstring
- jni.h
To fix, click the Back button to go to the previous page and add the header file path to the Include Paths list.
"
Please advise.
Regards,
H
02-09-2010 05:17 PM
Hello,
It looks like the Wizard cannot detect the four header files you mentioned. Is there any common characteristic for these header files? Are they being included within a main header file for instance? If they are being referenced by another header file, try including each one of them separately.
I hope this suggestion helps.
02-10-2010 01:25 AM
Hi,
The same happens to me when I try to import a dll previously created with labview..there are some missing header files
And I have no idea where I can find them..
Any idea about how to fix it?
thanks,
ben
02-11-2010 01:30 PM
Hi Ben,
Is there something common among these header files? For example, if your LabVIEW DLL included functions for a third-party device, you can check if they are header files associated with that instrument's driver. I would search the PC to check where these header files are located and what they are used for.
02-11-2010 01:59 PM
Hello Vivek,
The LabVIEW dll that I am trying to import does not include any third-party device..all my code is fully based on LabVIEW. Maybe this helps you to guess what is happening: once I've parsed the dll' header appears an error like this one:
void
__cdecl Zdmt(LVBoolean *stop, double P, char channelName[],
TD1
*errorIn, TD14 *FFTOptions, TD12 *Calibration, char FileName[],
int32_t minRecordLength, TD26 *InstrumentHandler, LVRefNum
sessionRefArray[],
LVRefNum *queueIN, TD1 *errorOut, LVBoolean
*averagingDone,
HWAVES LastRecordFetched, TD24 *Impedance, TD17
*ColeColeCluster,
TD18 *FFTcluster, TD5
*InstrumentHandleOutputCluster, LVRefNum *queueOut,
int32_t
*Acquired, TD6 *FreqTimeInfoCluster, double *averagesCompleted,
int32_t len);
The following symbols are not defined:
LVBoolean;
int32_t; LVRefNum;
Undefined symbols can prevent the wizard
from recognizing functions and parameters. To correct this problem,
check the header file to determine if you must add predefined symbols.
Click the Back button to return to the previous page of the wizard to
add a preprocessor definitionsl (for example, "NIAPI_stdcall =
__stdcall" or "NIAPIDefined = 1").
The following header file was
not found in the specified header file or one of the referenced header
files:
- extcode.h
To fix, click the Back button to go to the
previous page and add the header file path to the Include Paths list.
I have replaced the first line #include "extcode.h" of the dll header file for #include "C:\Program Files\National Instruments\LabVIEW 8.6\cintools\extcode.h" that is the full path where the header file is located. However, new libraries seems to be missed:
- stdint.h
- MacTypes.h
As far as I know, Mactypes.h contains basic mac os data types and it doesn't have any relation with stdint.h...
I have created both of them and stored into the same folder as extcode.h, but then other libraries are missed!!!
Do you know if it would be possible to create the .dll generating all the header files associated for its data structures???
And if this is not factible, then what do you suggest me? because I hope to not having to create all the header files until it stops giving me an error!
thanks for four time,
ben
02-14-2010 10:00 PM
Hello Ben,
I will look into this and let you know what I find out.
Vivek
02-17-2010 09:30 AM
02-19-2010 01:13 AM
Hi Vivek,
Nice to hearing again from you.
Nope, I have not used Call library Function to import the dll. I did it using the wizard: tools - import -shared library (.dll). I am going to try it right now!
Maybe it helps you to guess what's happening: before creating my dll and to be sure to do it correctly, I did a the labview tutorial for creating dll with its own code available.
http://zone.ni.com/devzone/cda/tut/p/id/3303#toc2
Once I tried to import the dll created with the wizard there were also missed libraries..
dll and the header file were created using LabVIEW 8.6.
Hope to hear again from you!
Best regards,
ben
02-19-2010 01:28 AM
From what I know, we must first create wrappers for calling dlls. This can be done by taking controls of exact data type as defined in your dll code, then passing these controls to the "Call Library Function" which calls the dll.
for example,
if your dll code has U8 and bool datatype, you can use the "call library function" node and use one numeric control of "U8" datatype and other control of boolean data type and give them to the dll inputs. Create connectors and save the vi, this VI is now wrapped to use the dll.
Hope this helps 🙂
12-04-2015 02:38 AM
Hi
It seems like I have the same problem with my c++ dll.
I've include <iostream> and <cstring> in .h file, but I think LabVIEW doesn't know where they are located. How can I tell LabVIEW the path to the files? I was trying to use the file paths into "Include Path" in dll wizard but it gave me nothing.
I was also trying to include dll without dll wizard, but LV crashed during running dll.
Thanks for help
K