Paul Surgeon on Sun, 02 Mar 2003 23:18:21 +0200 (SAST)


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

[Linux dev] Re: Static C++ (wxWindows libs)


I'm not sure what wx-config does but by default gcc uses shared libraries so 
if you really need to link against static libraries you need to use the 
-static flag.

eg.
$ gcc prog.cpp -lmystaticlib -static -o prog

Paul


On Sunday, 2 March 2003 20:54, Jens Thiede wrote:
> Hello,
>
> How do you link a wxWindows C++ program statically?
>
> $ gcc prog.cpp `wx-config --libs --cflags` -o prog
>
> What else should I do to the line above?
>
> Any help appreciated,
>
> Jens.