09-14-2009 06:12 AM
Hi;
I am developing a LabVIEW binding for Fast Artificial Neural Network (FANN) library using LabVIEW Import Shared Library (.DLL). This library can be found here. My problem is, the wizard cannot convert all functions into corresponding VIs. One of the error is
"FANN_EXTERNAL struct fann *FANN_API fann_create_from_file(const char *configuration_file);
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").
FANN_DLL_EXPORTS;FIXEDFANN;_INC_WINDOWS;_MSC_EXTENSIONS;_MSC_VER;__GNUC__;__cplusplus;"
Can somebody tell me what is the problem. I am not good in C.
Below I attached the configuration for Import Shared Library(picture) and the source code for FANN Library. I have removed some of the source code which are not related as this forum limit the attachment file size.
Thanks in advance
09-16-2009 05:32 AM
Hi mrutm,
There are a few problems.
1) the files that cannot be created are missing some (linux) headerfiles.
This function can be implemented by using the Call Library Function node yourself.
2. The struct. There is no Labview datatype that can be used to represent this structure. This because some elements in this structure are pointers.
There are two possible solutions for this.
1. Use a U32 (pass by value) to pass the pointer between functions. This can only be done when you don't need to change the cluster in Labview.
2. Creare a wrapper dll to convert the structure to a Labview datatype.
I did notice that there are .NET bindings available on the FANN website, which is more easy to implement in Labview.
Regards,
Bas van Dijke
National Instruments
04-22-2012 01:02 PM
Hello
I'm facing the same problem; Thank you for your explanations but they are short. Could you give us more detailed explanations.
Thanks