Posted Mon, 05 Nov 2012 21:26:39 -0600
Reply
On Mon, 05 Nov 2012 07:23:49 -0600, Rene Zwanenburg
renezwanenburg@gmail.com wrote:
I'm currently working on a smallish application with a web interface,
and vibe.d seems like a good fit for my needs. However, the application
depends on a large C library. Is it possible to instruct vibe to link to
a certain static library when using the 'vibe' command from the project
root? Or should I call rdmd myself?
Rene
If you are using dmd, then a simple <br>pragma(lib, "gtkd");<br>
is all that's necessary. But note that gdc completely ignores that. I
have no clue what ldc does.
I usually include a pragma(lib, "whatever") even if I have a build script.
It makes it easier for (myself or others) to pick it apart and compile
individual sections.
I can vibe
, or dmd -Isource -J... whatever and it still links fine.
As an added bonus, It's a nice way to keep the list of external libs in
one place. Self-documenting code and all that.
So... I would do both pragmas and the dflags method mentioned.
Using Opera's revolutionary email client: http://www.opera.com/mail/