Re: [Vala] static linking with Vala




On Thu, January 28, 2010 23:00, rastersoft wrote:
Is possible to statically link a Vala program? I need it to compile code
for a Multimedia hard disk for which I don't have all the libraries.

There is no global statically vs. dynamically link. The compiler will link
against static or dynamic libraries depending on what it finds. It's
perfectly OK to have static library for something and dynamic for
something else (GLib only installs dynamic version by default) in one
program. You don't need to tell compiler anything special either -- the
-llibrary option makes it look for both dynamic and static variant and use
whichever is available.

On whindows you need to have everything compiled against the same variant
of standard runtime (static vs. dynamic) though and you need to tell the C
compiler (/MT, /MD), not only the linker.

-- 
                                        - Jan Hudec <bulb ucw cz>




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