Re: Linker issues and pkg-config [message #1715459] |
Mon, 23 November 2015 14:58  |
Eclipse User |
|
|
|
On 11/22/2015 06:56 PM, Shew Horn wrote:
> Not sure what to make of this. I have a simple .c file. I can compile it
> without warnings or errors from the command line with the following call
> to gcc:
>
> gcc `pkg-config --cflags --libs jack` -o simple simple_client.c
>
> When I try to build it in Eclipse though...
>
> 22:22:10 **** Incremental Build of configuration Debug for project
> SimpleJackClient ****
> make all Building target: libSimpleJackClient
> Invoking: GCC C Linker
> gcc -shared -o "libSimpleJackClient" ./simple_client.o /usr/bin/ld:
> ./simple_client.o: relocation R_X86_64_32 against `.rodata' can not be
> used when making a shared object; recompile with -fPIC
> /simple_client.o: error adding symbols: Bad value
> collect2: error: ld returned 1 exit status
> makefile:29: recipe for target 'libSimpleJackClient' failed
> make: *** [libSimpleJackClient] Error 1
>
> It's such a straightforward program that I'm surprised it won't compile.
> I double checked, jack 2 libs and dev packages (Jack audio connection
> kit) are both installed. When I search on -fPIC I get a bunch of
> references to Java. Huh? This is C.
>
> One thing I can't find is where to enter:
>
> `pkg-config --libs --cflags jack`
>
> Googling around indicates that there used to be a pkg-config tab in the
> C/C++ settings but it's not there in Mars and a search in the Eclipse
> help yields zero hits. Any direction would be greatly appreciated!
You might want to post in the Eclipse CDT forum.
|
|
|
|
Powered by
FUDForum. Page generated in 0.04656 seconds