08-06-2024 05:02 PM
I'm trying to load the .lib files, for example: Optitrack's NatNetSDK's lib/x64/NatNetLib.lib
which contains:
NatNetLib.dll, NatNetLib.lib, NatNetML.dll, NatNetML.xml
Here's the tree:
NatNetSDK
├── include
│ ├── NatNetCAPI.h
│ ├── NatNetClient.h
│ ├── NatNetRepeater.h
│ ├── NatNetRequests.h
│ └── NatNetTypes.h
├── lib
│ └── x64
│ ├── NatNetLib.dll
│ ├── NatNetLib.lib
│ ├── NatNetML.dll
│ └── NatNetML.xml
...
Every tutorial I've found just plain do not work, are not what i'm searching for, are for dll loading, which doesn't work here because there's multiple dll who seems to be requiring multiple .h files each.
And the one who seemed to be good was from 15 years ago with windows vista.
I'm completely new to labview, I'm running LabView 2024 Q3
Do not assume I know where every menu option is, as "Select from VI" just isn't in the right click menu or any menu at the top.
Thank you for your time.
08-06-2024 05:04 PM
Btw, I couldn't find the Call Library Function either.
08-07-2024 04:52 AM
Hi motion,
@motioncapurelab wrote:
Btw, I couldn't find the Call Library Function either.
Ctrl-Space to open the QuickDrop window, then type "Call"…
08-09-2024 07:07 PM
Ok, i can load the .dlls, not .lib, which are static libraries.
Now, how do i point to header files, having a dll without headers is kinda useless.
08-11-2024 12:28 PM
Hi Motion,
@Motion_capture_Lab_Home wrote:
Ok, i can load the .dlls, not .lib, which are static libraries.
Now, how do i point to header files, having a dll without headers is kinda useless.
What exactly should "point to header files"?
The CLFN (CallLibraryFunctionNode) just needs the DLL path…
08-11-2024 12:32 PM
Well, it has the wrong types.
The function uses struct. So XYZ float points inside a struct, inside a struct,...
Labview forces me to have primitive types on everything
Input. Args. Output.
08-11-2024 12:56 PM
Hi Motion,
@Motion_capture_Lab_Home wrote:
The function uses struct. So XYZ float points inside a struct, inside a struct,...
Labview forces me to have primitive types on everything Input. Args. Output.
Write a wrapper in C to handle the structs and provide simple datatypes to LabVIEW…
08-11-2024 01:07 PM
Ok, but can Labview recieves arrays?
08-11-2024 01:50 PM - edited 08-11-2024 01:53 PM
@Motion_capture_Lab_Home wrote:
Ok, but can Labview recieves arrays?
No, but it can pass arrays of scalars to the functions. C memory management is involved and the least problematic is that the caller ALWAYS allocates any memory and passes it to the function and the function either reads the memory contents or writes something into it. If you configure a Call Library Parameter as Array of any Integer or Floating Point type, passed as C data pointer, LabVIEW will pass that array to the function as a C pointer.
Important is that you need to preallocate such an array. For an input parameter this is obvious, you need to pass the elements in that the function needs to read, but for an output parameter you have to ALSO allocate the array with as many elements as the function is documented to need at most. This can be either an implicit fixed number of elements that needs to be documented in the function documentation, or it can be explicit in which case the number of elements the preallocated array has, is passed in an extra parameter so that the function can verify that the array is big enough for the information it wants to use. Often the function also returns in that case an extra parameter that indicates how many elements were actually filled in.
08-11-2024 03:12 PM
Ok.
So, is it malloc or calloc allocated,
Or from int array[5],
and labview needs to know the number of points in the array.
Or they'd all work.
Btw, thank you for your time.