Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

How can I move a library inside a project's source tree and compiling static binaries?

I want to use a particular tool that utilizes ANCIENT binaries without upgrading it's API usage. This way I can use the old libraries inside the single binary without wrecking the local host environment. I am on nix with netbeans/eclipse/code::blocks.

I don't have a problem reading, just looking for a starting point. Any thoughts?

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

You could make a script to compile the lib and modify your project file to use that library's path. for qmake it would be :

DEPENDPATH += . oldlib/
INCLUDEPATH += . oldlib/
LIBS += -Wl,-rpath=oldlib-build-path-L. -L../ -Loldlib-build-path -loldlib

Note that the rpath part is strictly for gcc, could be different on different compilers.

share|improve this answer
    
i primarily use gcc and am looking into using this solution...if it works i'll give the check –  hbdgaf Nov 29 '10 at 20:06
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.