I'm prototyping an app that I'd like to port between Windows and Linux. I'm having trouble linking (static) to a library. c code is the source language of the library (which I have).
Here's the Windows function declaration. It works (i.e. compiles, links, runs) fine:
function seabreeze_open_spectrometer(iWorking:Integer; errorcode:PInteger):Integer; cdecl;
external 'C:\windows\system32\seabreeze.dll';
Here's the Linux function declaration. It compiles but does not link:
function seabreeze_open_spectrometer(iWorking:Integer; errorcode:PInteger):Integer; cdecl;
external '/home/pi/Documents/ScratchProjects/libseabreeze.so';
The error is "Generic error while linking." I've isolated my problem to this statement by commenting and uncommenting same.
I'm primarily a Windows jockey, not so much Linux. Given the examples, it looks like this should do it. However, in the absence of a full fledged working example (the examples are pseudo code or snippets in forum comments), its difficult to tell.
Any help is appreciated.