LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices



Reply
 
Search this Thread
Old 03-03-2013, 07:39 AM   #1
jeypeyy
LQ Newbie
 
Registered: Mar 2013
Posts: 4

Rep: Reputation: Disabled
Can't get my program to use my modified glib


Due to a school project, I made a small change to the glib source code (GFileInfo.c in gio to be more precise), ran ./configure (with a new prefix), make and make install.

Then I changed /usr/lib/x86_64-linux-gnu/pkgconfig/gio-2.0.pc file so that the prefix is my working directory and that everything goes to the right path. Writing "pkg-config --cflags --libs gio-2.0" in the terminal seems to give a good output.

Then I made a small haxx.c file that took use of this new glib. I compiled it with Code:

Code:
gcc haxx.c $(pkg-config --cflags --libs gio-2.0)
But when I run "ldd a.out", it only shows me the old paths. What am I doing wrong?

tl;dr: Built my own glib on a different path. Can't get my haxx.c program to use it. Why and how?
 
Old 03-05-2013, 01:42 AM   #2
pan64
Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian i686 (solaris)
Posts: 5,558

Rep: Reputation: 1466Reputation: 1466Reputation: 1466Reputation: 1466Reputation: 1466Reputation: 1466Reputation: 1466Reputation: 1466Reputation: 1466Reputation: 1466
have you tried the flag -rpath or the environment variable LD_RUN_PATH already?
 
Old 04-12-2013, 06:52 AM   #3
jeypeyy
LQ Newbie
 
Registered: Mar 2013
Posts: 4

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by pan64 View Post
have you tried the flag -rpath or the environment variable LD_RUN_PATH already?
Thanks, -W,rpath=".." worked.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Cent OS GLib 2.12.3 pkg-config --modversion glib-2.0' returned 2.22.2 Styles Linux - Distributions 1 10-09-2009 04:12 AM
LXer: Want To Program Smartly In C? Use GLib LXer Syndicated Linux News 0 11-12-2008 12:10 PM
How do you get a linux program modified to your specific needs jacatone Linux - Software 1 07-10-2007 12:14 AM
xmms install (needs glib>1.22), just installed glib 2.4.8 and still get error message eskiled Linux - Software 2 12-19-2005 10:12 PM
backup program for backing up only modified files | 'snapshot' ibm5_25 Linux - Software 2 01-10-2004 01:28 AM


All times are GMT -5. The time now is 02:53 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration