[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Static linking of libraries

From: Paul Pluzhnikov
Subject: Re: Static linking of libraries
Date: Tue, 21 Mar 2006 07:07:36 -0800
User-agent: Gnus/5.1006 (Gnus v5.10.6) XEmacs/21.4 (Jumbo Shrimp, linux)

"Paulo Matos" <> writes:

> Found the -static flag... Hope it does the trick! :)

This is *the* wrong way to solve this problem.
Your binary may crash and/or not work correctly when moved to a
different machine.

See this thread for gory details:

Correct way to ensure that you don't depend on dynamic versions of
log4cpp and glpk, while still making your binary portable to other systems:

  g++ ... -o myapp mayapp.o ... -Wl,-Bstatic -llog4cpp -lglpk -Wl,-Bdynamic

In order to understand recursion you must first understand recursion.
Remove /-nsp/ for email.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]