Re: [Vala] Static linking



Jan Hudec wrote:
On Wed, Dec 02, 2009 at 04:52:13 -0700, Mark Dewey wrote:
How do I statically link libraries for Vala programs? I mean, like
libgee and such. Don't worry, I do plan to have a license compatible
with such behavior.

Well, just as you would any other C library.

I have no idea how to link (either statically or dynamically) any other
C library—that's why I posted. I'm having a very hard time finding
anything that says how, too.

Also, valac -c doesn't seem to output the object files I would need. It
just produces binaries, the same as without it. Is there something I'm
missing?

If you're wondering why I want to do static linking, I have several reasons:
• It's less work for the end user to use my program
• I need my program to be cross-platform, and other platforms besides
Linux don't always have such a nice package system. Getting an every day
Windows user to deal with that stuff just isn't very likely.
• I /don't/ want my packages automatically updated in the first place,
unless I can be absolutely sure the updates won't cause problems. I'd
rather deal with the updates manually. From my experience, too high of a
percentage of the updates make the program so it doesn't work, without
some kind of change or workaround. I want some kind of guarantee that my
program will work exactly as it does now ten years from now if I decide
to leave off development. I've seen this problem tons and tons with
programs I've wanted to use, but for some reason or other, some change
made it incompatible with the program.

Anyway, whatever the case, I still need to know how to link. It's
something any programmer should know, methinks.




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