2

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?

gnat
  • 21,442
  • 29
  • 112
  • 288
RobotHumans
  • 906
  • 8
  • 11

1 Answers1

2

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.

OneOfOne
  • 292
  • 2
  • 6