On 2011-04-05 05:23, Nick Sabalausky wrote:
"Adam D. Ruppe"<destructiona...@gmail.com>  wrote in message
news:ine114$14ar$1...@digitalmars.com...
Nick Sabalausky wrote:
Looking at the pages that are there for QtD, and the source
browser, I'm honestly not sure how to even get started with it.

Somewhere, there was a binary distribution with the needed .libs..
I don't remember where, but I think I still have a copy on my
other laptop (not available right now though).

Note that the duic for Qt Designer files apparently is behind
some changes - it won't work right. Gotta write straight D yourself.

But, you install it however, the process on the site I think works
but it takes a little while.

Anyway, here's a hello world I just whipped up with some comments
to keep in mind - stuff that took me hours to figure out...


Thanks.


The compile line looks like this on Linux:
dmd
hello.d -I/usr/local/include/d -L-L/usr/local/lib -L-lqtdgui -L-lqtdcore
-L-lcpp_core -L-lcpp_gui -L-lQtGui -L-lQtCore


Hmm, I really wish DMD had a cmdline param to specify a library to be passed
to the linker rather than needing to use "-L". Makes it impossible to write
a cross-platform DMD command for anything that requires linking to a lib.

Should "pragma(lib, nameoflib);" work, or was that just a special thing in
bu(il)d?

pragma(lib) works but I don't think it's cross-platform. You have to specify the extension. DSSS/rebuild and bu(il)d supports pragma(link, "link") which lets you specify any options to the linker.

Note it takes a few seconds to compile. Pretty slow for D.


Psshh. Compiling DDMD takes a minute or two. I can live with a few seconds
:)


It's similar on Windows, but since I don't have my win laptop
available right now I don't quite remember what it was exactly.

Anyway, the program:

[...snip...]

Thanks. That should help. It does seem that QtD could *really* use some
D-ification, though. Like arrays of delegates instead of signals/slots. And
properties instead of the get*/set* functions that trigger my flashbacks of
Java.





--
/Jacob Carlborg

Reply via email to