Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Re: Linker issues and pkg-config
Re: Linker issues and pkg-config [message #1715459] Mon, 23 November 2015 19:58 Go to next message
Russell Bateman is currently offline Russell BatemanFriend
Messages: 3799
Registered: July 2009
Location: Provo, Utah, USA
Senior Member

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.
Re: Linker issues and pkg-config [message #1715477 is a reply to message #1715459] Mon, 23 November 2015 22:50 Go to previous message
Joe C. is currently offline Joe C.Friend
Messages: 5
Registered: November 2015
Junior Member
Thanks Smile Did so earlier today.

Cheers, Joe
Previous Topic:issue after clean project
Next Topic:Getting started contributing
Goto Forum:
  


Current Time: Mon Sep 16 12:41:21 GMT 2019

Powered by FUDForum. Page generated in 0.04113 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top