c++ - Can't build PortAudio for i386 to make it play nice with NI's DAQmxBase -


i'm trying write little c/c++ program both acquires data ni usb daq , plays audio portaudio. problem is, appears ni daq library mac/linux, daqmxbase, has built under i386, , can't portaudio build i386.

i have tried setting cflags , ldflags -arch=i386 before running ./configure --disable-mac-universal && make && make install, ni daqmxbase example code still won't build when add calls portaudio it:

gcc -i../../includes -g -o2 -arch i386 acanalogtest.c -framework nidaqmxbase -framework nidaqmxbaselv -o acanalogtest   undefined symbols architecture i386:       "_pa_initialize", referenced from:           _main in ccf1t0bz.o     ld: symbol(s) not found architecture i386     collect2: ld returned 1 exit status     make: *** [acanalogtest] error 1 

the ni daqmxbase makefile looks this:

nilibs=-framework nidaqmxbase -framework nidaqmxbaselv                                                               includes=-i../../includes flags= -g -o2 -arch i386 cc=gcc  ao_examples = acanalogtest acquirenscans ...... : $(ao_examples)  % : %.c  >---$(cc) $(includes) $(flags) $< $(nilibs) -o $@  clean : >---rm -f $(ao_examples) 

changing -arch flag in daqmxbase makefile doesn't work:

gcc -i../../includes -g -o2 -arch x86_64 acanalogtest.c -framework nidaqmxbase -framework nidaqmxbaselv -o acanalogtest in file included acanalogtest.c:1: ../../includes/nidaqmxbase.h:104: warning: division 0 ../../includes/nidaqmxbase.h:104: error: enumerator value ‘assert_line_104’ not integer constant ../../includes/nidaqmxbase.h:105: warning: division 0 ../../includes/nidaqmxbase.h:105: error: enumerator value ‘assert_line_105’ not integer constant make: *** [acanalogtest] error 1 

i assume because daqmxbase written i386 data types in mind. lines above error references nidaqmxbase.h are:

nistaticassert(sizeof(long) == 4, "error: platform unsupported because long not 4 bytes.");               nistaticassert(sizeof(int) == sizeof(long), "error: platform unsupported because int not same size long."); 

i can build of normal portaudio examples on own fine, want put portaudio , daqmxbase in same program , have them along. there must way build portaudio works daqmxbase, no?

thanks!

daqmx base versions 14.0 , 15.0 support 64-bit applications, should able upgrade driver , try again.

daqmx base 15.0 mac


Comments

Popular posts from this blog

php - regexp cyrillic filename not matches -

c# - OpenXML hanging while writing elements -

sql - Select Query has unexpected multiple records (MS Access) -