www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Help plz: Using to libraries in D?

reply "K.K." <trampzy yahoo.com> writes:
Hi! I've kinda got a few noob questions...

I've been trying to learn D for the last few months, and I've got 
a pretty good grasp of the syntax, but I've been having trouble 
figuring out how to use libraries(excluding the standard lib).

I've been trying to setup a game engine, so I've tried libraries 
like Derelict, Allegro(the derelict version and the C version), 
and GFM. Plus later on when I'm having less trouble I was hoping 
to get PyD involved.

I tried using the makefile that came with Derelict2 (win32.mak 
through powershell with DMD), and everything worked fine but I 
still didn't know what to do with the D interface files or the 
object lib files. Do I only worry about them at compile time? 
-but I still need to link to the libraries in the files that need 
them right? ....and which one, there seems to be multiple 
locations to go to.

But then ofcouse GFM is based off of Derelict3, which doesn't 
seem to have any makefiles, so.... idk.

I feel like I'm on the right path here, and have all the pieces 
but am totally lost on how to put it together. I feel like I've 
gotta ask someone directly at this point because I've just been 
reading manuals and books for this one step for like 2 weeks now.

So if someone could break it down for me, or atleast give me a 
few links to some guides that'd be greatly appreciated; Thanks!

(If you need me to elaborate some more on what I'm trying to do, 
I'd be happy to oblige)
Apr 29 2014
next sibling parent "K.K." <trampzy yahoo.com> writes:
btw, please ignore my completely broken English in the title. 
Apparently I had a moment.
Apr 29 2014
prev sibling parent reply "John Colvin" <john.loughran.colvin gmail.com> writes:
On Tuesday, 29 April 2014 at 20:55:01 UTC, K.K. wrote:
 Hi! I've kinda got a few noob questions...

 I've been trying to learn D for the last few months, and I've 
 got a pretty good grasp of the syntax, but I've been having 
 trouble figuring out how to use libraries(excluding the 
 standard lib).

 I've been trying to setup a game engine, so I've tried 
 libraries like Derelict, Allegro(the derelict version and the C 
 version), and GFM. Plus later on when I'm having less trouble I 
 was hoping to get PyD involved.

 I tried using the makefile that came with Derelict2 (win32.mak 
 through powershell with DMD), and everything worked fine but I 
 still didn't know what to do with the D interface files or the 
 object lib files. Do I only worry about them at compile time? 
 -but I still need to link to the libraries in the files that 
 need them right? ....and which one, there seems to be multiple 
 locations to go to.

 But then ofcouse GFM is based off of Derelict3, which doesn't 
 seem to have any makefiles, so.... idk.

 I feel like I'm on the right path here, and have all the pieces 
 but am totally lost on how to put it together. I feel like I've 
 gotta ask someone directly at this point because I've just been 
 reading manuals and books for this one step for like 2 weeks 
 now.

 So if someone could break it down for me, or atleast give me a 
 few links to some guides that'd be greatly appreciated; Thanks!

 (If you need me to elaborate some more on what I'm trying to 
 do, I'd be happy to oblige)
I would recommend using dub for managing dependencies and building libraries etc. http://code.dlang.org/about
Apr 29 2014
parent "K.K." <trampzy yahoo.com> writes:
On Tuesday, 29 April 2014 at 21:16:38 UTC, John Colvin wrote:
 I would recommend using dub for managing dependencies and 
 building libraries etc. http://code.dlang.org/about
Oh wow this looks awesome! I'll start messing around with it now - Thanks!
Apr 29 2014