You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After days of fiddling with the SDK i finally managed to get images from the Thorlabs zelux CS165MU under Win11.
Unfortunately the example code only gives a pointer to the image but not how the data is organized. (RGB? width? height? etc.)
The Linux version of the SDK however won't get far and will cause a segfault. Apart from the curiously creative dlopen solution (why not just link the executable with the libraries??) it looks pretty straight forward C code.
In general linking with shared libraries is as simple as adding -l<library> to gcc. Using dlopen however will add an enormous amount of complexity (see the ..._load.c source files) that mimics the same behavior but skips the initialization of the library. It also hides any other issues that may arise by simply using pointers that may or may not be correctly configured. Dynamic linking actually makes the code simpler and possibly faster. Let the compiler do the heavy lifting, it's built for that.
Under Linux it is general practice to have some sort of build environment that is widely supported like Make or CMake.
The latter allowing for easy checks of where to find related libraries and such.
I hope to see some Linux examples in this repository that can be used to reproduce a working camera image capture.
best regards,
Jan Rinze.
The text was updated successfully, but these errors were encountered:
Hi there,
After days of fiddling with the SDK i finally managed to get images from the Thorlabs zelux CS165MU under Win11.
Unfortunately the example code only gives a pointer to the image but not how the data is organized. (RGB? width? height? etc.)
The Linux version of the SDK however won't get far and will cause a segfault. Apart from the curiously creative dlopen solution (why not just link the executable with the libraries??) it looks pretty straight forward C code.
In general linking with shared libraries is as simple as adding
-l<library>
to gcc. Usingdlopen
however will add an enormous amount of complexity (see the ..._load.c source files) that mimics the same behavior but skips the initialization of the library. It also hides any other issues that may arise by simply using pointers that may or may not be correctly configured. Dynamic linking actually makes the code simpler and possibly faster. Let the compiler do the heavy lifting, it's built for that.Under Linux it is general practice to have some sort of build environment that is widely supported like Make or CMake.
The latter allowing for easy checks of where to find related libraries and such.
I hope to see some Linux examples in this repository that can be used to reproduce a working camera image capture.
best regards,
Jan Rinze.
The text was updated successfully, but these errors were encountered: