LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

calling library func with stream fails under linux

On Mandriva Linux I created a shared object (.so) lib with following code;

#include <sstream>

extern "C" int test(const char* c)
{
  std::stringstream s(c);
 
  int i;
  s >> i;
  return i;
}

No when I try to call test from LabVIEW using a 'Call Library Function Node', I get an error (see attached error_message.jpg) trying to configure it.
I get the same error when I open the vi (see attached test_vi.jpg).

When I build the same code into a dll under Windows the same test_vi runs perfectly.

In other occasions where we used (string)streams more embedded in the library we were able to
start up the vi but problems occurred when running it.


It seems that using 'Call Library Function Node' with libraries with C++ streams in it, is not possible with Linux LabVIEW.


Any thoughts?


Download All
0 Kudos
Message 1 of 2
(2,630 Views)
Hello,

i found the problem to ocurr when compiling the library with gcc. If I use c++ as compiler, the problem disappears, strange enough.

Gtx
Carl.
0 Kudos
Message 2 of 2
(2,604 Views)