On 02/08/2009 11:08 AM, go music wrote: > I'm sorry, I don't get the little program compiled, could you give me some > explanation on how best doing this? Should I just insert it in some > linuxsampler source subpath (e.g. src/driver/audio ?) and add the .cpp to the > makefile, and then use make in that subpath? > Or can I just g++ it, in the latter case which options (include and libs) do > I need?
Yes, just use g++, but for the test to be meaningful, it's important that you use the same options as your linuxsampler build uses. For example, when I build my linuxsampler, I see this compile command for JackAudioOutputDevice.cpp: g++ -DHAVE_CONFIG_H -I. -I../../.. -I/usr/include/artsc -pthread -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/home/andreas/jack116/include -Wreturn-type -ffast-math -march=i686 -O2 -mfpmath=sse -g -pthread -msse -MT AudioOutputDeviceJack.lo -MD -MP -MF .deps/AudioOutputDeviceJack.Tpo -c AudioOutputDeviceJack.cpp -fPIC -DPIC -o .libs/AudioOutputDeviceJack.o From this line I take all options except -Mx, -c and -o. The long linking command for the linuxsampler binary looks like this in my build: g++ -Wreturn-type -ffast-math -march=i686 -O2 -mfpmath=sse -g -pthread -msse -o .libs/linuxsampler linuxsampler.o ../src/.libs/liblinuxsampler.so /usr/lib/libsqlite3.so -L/usr/local/lib /usr/local/lib/libgig.so -L/home/andreas/jack116/lib /home/andreas/jack116/lib/libjack.so /usr/lib/libsamplerate.so -L/usr/lib /usr/lib/libartsc.so -L/usr/lib/qt3/lib /usr/lib/libgmodule-2.0.so /usr/lib/libgthread-2.0.so -lrt /usr/lib/libglib-2.0.so /usr/lib/libasound.so -ldl -lpthread /home/andreas/gcc433/lib/libstdc++.so -luuid -Wl,--rpath -Wl,/usr/local/lib/linuxsampler -Wl,--rpath -Wl,/usr/local/lib -Wl,--rpath -Wl,/home/andreas/gcc433/lib -Wl,--rpath -Wl,/home/andreas/jack116/lib From this I take everything except -o and linlinuxsampler.so. Combining the compile and link stages I get this command: g++ -DHAVE_CONFIG_H -I. -I../../.. -I/usr/include/artsc -pthread -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/home/andreas/jack116/include -Wreturn-type -ffast-math -march=i686 -O2 -mfpmath=sse -g -pthread -msse jacktest.cpp -fPIC -DPIC -Wreturn-type -ffast-math -march=i686 -O2 -mfpmath=sse -g -pthread -msse /usr/lib/libsqlite3.so -L/usr/local/lib /usr/local/lib/libgig.so -L/home/andreas/jack116/lib /home/andreas/jack116/lib/libjack.so /usr/lib/libsamplerate.so -L/usr/lib /usr/lib/libartsc.so -L/usr/lib/qt3/lib /usr/lib/libgmodule-2.0.so /usr/lib/libgthread-2.0.so -lrt /usr/lib/libglib-2.0.so /usr/lib/libasound.so -ldl -lpthread /home/andreas/gcc433/lib/libstdc++.so -luuid -Wl,--rpath -Wl,/usr/local/lib/linuxsampler -Wl,--rpath -Wl,/usr/local/lib -Wl,--rpath -Wl,/home/andreas/gcc433/lib -Wl,--rpath -Wl,/home/andreas/jack116/lib /Andreas ------------------------------------------------------------------------------ Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM) software. With Adobe AIR, Ajax developers can use existing skills and code to build responsive, highly engaging applications that combine the power of local resources and data with the reach of the web. Download the Adobe AIR SDK and Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com _______________________________________________ Linuxsampler-devel mailing list Linuxsampler-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxsampler-devel