Hi.
I've stumbled into an error when trying to use the math library toghether with nidaqmxbase library.
The compile works well, the following is an output of my compilation.
if gcc -DHAVE_CONFIG_H -I. -I. -I.. -I/opt/gnome/include/glib-2.0 -I/opt/gnome/lib/glib-2.0/include -ggdb -g -O2 -MT nid-counter.o -MD -MP -MF ".deps/nid-counter.Tpo" -c -o nid-counter.o `test -f 'counter.c' || echo './'`counter.c; \
then mv -f ".deps/nid-counter.Tpo" ".deps/nid-counter.Po"; else rm -f ".deps/nid-counter.Tpo"; exit 1; fi
if gcc -DHAVE_CONFIG_H -I. -I. -I.. -I/opt/gnome/include/glib-2.0 -I/opt/gnome/lib/glib-2.0/include -ggdb -g -O2 -MT nid-dio.o -MD -MP -MF ".deps/nid-dio.Tpo" -c -o nid-dio.o `test -f 'dio.c' || echo './'`dio.c; \
then mv -f ".deps/nid-dio.Tpo" ".deps/nid-dio.Po"; else rm -f ".deps/nid-dio.Tpo"; exit 1; fi
if gcc -DHAVE_CONFIG_H -I. -I. -I.. -I/opt/gnome/include/glib-2.0 -I/opt/gnome/lib/glib-2.0/include -ggdb -g -O2 -MT nid-nid.o -MD -MP -MF ".deps/nid-nid.Tpo" -c -o nid-nid.o `test -f 'nid.c' || echo './'`nid.c; \
then mv -f ".deps/nid-nid.Tpo" ".deps/nid-nid.Po"; else rm -f ".deps/nid-nid.Tpo"; exit 1; fi
if gcc -DHAVE_CONFIG_H -I. -I. -I.. -I/opt/gnome/include/glib-2.0 -I/opt/gnome/lib/glib-2.0/include -ggdb -g -O2 -MT nid-input.o -MD -MP -MF ".deps/nid-input.Tpo" -c -o nid-input.o `test -f 'input.c' || echo './'`input.c; \
then mv -f ".deps/nid-input.Tpo" ".deps/nid-input.Po"; else rm -f ".deps/nid-input.Tpo"; exit 1; fi
/bin/sh ../libtool --mode=link --tag=CC gcc -g -O2 -o nid -L/opt/gnome/lib -lglib-2.0 -lm nid-counter.o nid-dio.o nid-nid.o nid-input.o -lnidaqmxbase
mkdir .libs
gcc -g -O2 -o nid nid-counter.o nid-dio.o nid-nid.o nid-input.o -L/opt/gnome/lib /opt/gnome/lib/libglib-2.0.so -lm -lnidaqmxbase
The problem arise when i try to run the application, I get:
./nid
ERROR! The LabVIEW RunTime Engine failed to initialize correctly.
This is usually caused by linking applications incorrectly.
Please see the AppLibs/README.shlibs file in the LabVIEW directory for
instructions on building programs using LabVIEW-built shared libraries.
LabVIEW caught fatal signal
- Received SIGSEGV
Reason: address not mapped to object
Attempt to reference address: 0x4
Segmentation fault
If i dont link the mathlibrary then everything works. The problem is that i need the mathlibrary for my application
Any suggestion where the problem is ?
regards /josef