ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

NIDAQmxBase Library Linking within Linux

Hi all,

I have written a piece of C code that provides a native library for my Java code to 'JNI' to. Problem is, I don't know which libraries that I need to link from NIDAQmxBase to get it to work.

The Java code is able to find the C shared object library that I have created, but unable to run any of the DAQmxBase functions.

Obviously, I am not compiling this correctly in some way and haven't linked the daqmxbase libraries, but I did think that having the nidaqmxbase.h was enough - it was in Windows...

Does anyone have any ideas? I am using gcc.

Cheers
Chris
0 Kudos
Message 1 of 5
(3,816 Views)
Chris,

I have never tried this, but you should only need to link nidaqmxbase.lib when you build your C library. Are you doing this? Do you get an error when you run your Java application? If so, what is it? Also, were you able to do this successfully with NI-DAQmx (not Base)?
Ryan Verret
Product Marketing Engineer
Signal Generators
National Instruments
0 Kudos
Message 2 of 5
(3,778 Views)
Hi Ryan,

Apologies, I should have posted back earlier - I have worked out how to do this, I needed to pass the library directly to the compiler - something that I did not need to do in Windows.

I will post the exact command when I am back in the office tomorrow.

Thanks again
Chris
0 Kudos
Message 3 of 5
(3,778 Views)

Below is a useful KB that provides information about using DLLs to get java to work with NI drivers

http://digital.ni.com/public.nsf/websearch/802A9D349090D3F5862565CC0076BCF9?OpenDocument

I hope this helps!

Kurt

0 Kudos
Message 4 of 5
(3,730 Views)
Hi!

I'm also working in a JNI wrapper in order to use NIDAQmxBase for Linux from Java code but I have some problems. I posted a message in the forums with my problems and an attachment with some code:

http://forums.ni.com/ni/board/message?board.id=250&message.id=22944

Please, seems you have to do things similiar to mine, so I'll thanks you a lot if you could help me in anyway!

I tried to send you an email because this post has been here from several months and perhaps you don't look at it anymore, but I have to try 🙂

Thanks in advance!
0 Kudos
Message 5 of 5
(3,622 Views)