Jump to content

Staticly link a dynamic library

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
2 replies to this topic

#1
Groogy

Groogy

    Programmer

  • Members
  • PipPipPipPip
  • 183 posts
Hi!

Okay I am trying to get a daemon up and running on my web server where mysqlpp is not installed which my daemon requires. So since my access there is limited I thought I should just link it staticly. But when I tried to configure the library to compile it as static it just didn't....


./configure --enable-static

make

su -c "make install"


This only compiles and installs dynamic libraries.

Anyway so I was wondering if there's ome way to convert a dynamic library to a static one or tell ld to link it as static.

I've searched google after it and this forum. Didn't find anything helpfull except for "ld -static" which I guess tells ld to only link with static libraries?

Edited by Groogy, 15 February 2010 - 07:37 AM.
Solved the problem


#2
dargueta

dargueta

    Writes binary right handed and hex left handed

  • Moderators
  • 4,717 posts
Try this first, if not then look here.
sudo rm -rf /

#3
Groogy

Groogy

    Programmer

  • Members
  • PipPipPipPip
  • 183 posts
Thanks! Love you man

I really hoped that the first one would work because that would been easiest to maintain but it didn't seem to want to copy the libraries into the static one.

Anyway the second seems to work which is better than nothing! I'll let the test engine run for another hour before carving it in stone.