| Windows shared libraries are in searched in your exec path. On Linux they
are
set ldconfig (/etc/ldconfig.conf) or LD_LIBRARY_PATH. That is, when you
run the program. Linking obeys gcc rules everywhere.
Victor
----- Original Message -----
From: "James Hearon"
To:
Sent: Wednesday, August 20, 2008 5:41 PM
Subject: [Csnd] GCC Linux
Hi,
A bit stumped on GCC Linux (fedora) differences from MinGW GCC. Trying to
compile simple api example (interfaces/csound/csound_main.c) using GCC from
the command line using csound5 or build as the current directory. Linking
to libcsound.a, but get lots of undefined ref errors.
$ gcc -Wall -O2 -IH -L. csound_main.c -o csound_main -lcsound
Works fine in MinGW. Tried all sorts of things with Linux GCC (permissions,
direct paths, static flag, different versions etc.), but only work around I
could stumble upon was also include any shared lib (ex. librtalsa.so), to
make the undefined reference errors go away.
$ gcc -Wall -O2 -IH -L. csound_main.c -o csound_main -lcsound -lrtalsa
But then I need to set the LD_LIBRARY_PATH variable to run the binary file
because of the linked .so lib.
Just seems odd. Wonder if anyone could help explain. Thanks.
gcc --version
gcc (GCC) 4.3.0 20080428 (Red Hat 4.3.0-8)
_________________________________________________________________
Get ideas on sharing photos from people like you. Find new ways to share.
http://www.windowslive.com/explore/photogallery/posts?ocid=TXT_TAGLM_WL_Photo_Gallery_082008
Send bugs reports to this list.
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
csound"=
|