Project

General

Profile

Linking with static libraries and run application without installed libraries

Added by Matthias Schönberger almost 14 years ago

Hi,

I am working on Ubuntu system.

I want to run a wt-application on another debian or ubuntu system (but older versions as the development system).

The machine which I want to run on the application has very slow and not reliable internet connection, so I don't want to have havy installation sessions. I can connect the remote machine via ssl terminal.

Is it possible to build a wt executable with static libraries, that I can run the application on another machine without the need to install the libraries?

I mean just copy the executable to the remote system with scp and start the application?

Thanks for answers!


Replies (1)

RE: Linking with static libraries and run application without installed libraries - Added by Koen Deforche almost 14 years ago

Hey Matthias,

Yes. You can build a static version of Wt (-DSHARED_LIBS=OFF), and when also building a static version of boost, you end up with a binary that only links to libc and libstdc.

Of course your machine architectures will need to match too.

In almost all situations I actually recommend a static build for a release, since in that way your deployed app is self-contained. So, you even should ! :-)

Regards,

koen

    (1-1/1)