Thread overview
Errors compiling programs using Derelict 3 under DMD 2
May 12, 2012
Kevin Kowalczyk
May 12, 2012
Francois Chabot
May 12, 2012
Kevin Kowalczyk
May 13, 2012
Mike Parker
May 13, 2012
Mike Parker
May 13, 2012
Kevin Kowalczyk
May 14, 2012
Mike Parker
May 12, 2012
I posted on stackoverflow but there hasn't been much in the way of actually resolving my problem, I'll post the link here in the hopes someone can answer my question.

http://stackoverflow.com/questions/10564608/using-derelict3-under-dmd2-d
May 12, 2012
On Saturday, 12 May 2012 at 16:46:05 UTC, Kevin Kowalczyk wrote:
> I posted on stackoverflow but there hasn't been much in the way of actually resolving my problem, I'll post the link here in the hopes someone can answer my question.
>
> http://stackoverflow.com/questions/10564608/using-derelict3-under-dmd2-d

Hmmm, maybe you are linking in the libs from Derelict 2?

On my end, I avoid this altogether by compiling the needed derelict modules directly in my program instead of bothering with a library.

I can't see why I should bother with library files for a library that has only D modules, assuming that I'm not dealing with .di files.

Am I missing something here? Tools like rdmd seem to make compiled libraries fairly redundant.
May 12, 2012
On Saturday, 12 May 2012 at 17:07:38 UTC, Francois Chabot wrote:
> On Saturday, 12 May 2012 at 16:46:05 UTC, Kevin Kowalczyk wrote:
>> I posted on stackoverflow but there hasn't been much in the way of actually resolving my problem, I'll post the link here in the hopes someone can answer my question.
>>
>> http://stackoverflow.com/questions/10564608/using-derelict3-under-dmd2-d
>
> Hmmm, maybe you are linking in the libs from Derelict 2?
>
> On my end, I avoid this altogether by compiling the needed derelict modules directly in my program instead of bothering with a library.
>
> I can't see why I should bother with library files for a library that has only D modules, assuming that I'm not dealing with .di files.
>
> Am I missing something here? Tools like rdmd seem to make compiled libraries fairly redundant.

So I should just put the .d files from Derelict3 in the same folder as my project?
May 13, 2012
On 5/13/2012 1:46 AM, Kevin Kowalczyk wrote:
> I posted on stackoverflow but there hasn't been much in the way of
> actually resolving my problem, I'll post the link here in the hopes
> someone can answer my question.
>
> http://stackoverflow.com/questions/10564608/using-derelict3-under-dmd2-d

That looks to me like it has to do with ordering. When using the GCC tools, the order the libraries are passed to the linker matters. Try moving the pragma for DerelictUtil beneath the one for GLFW3. If that doesn't work, try this on the command line:

-L-lDerelictGL3 -L-lDerelictGLFW3 -L-lDerelictUtil

You also need to be linking with libdl if you aren't already, since DerelictUtil has a dependency on it.
May 13, 2012
On 5/13/2012 1:46 AM, Kevin Kowalczyk wrote:
> I posted on stackoverflow but there hasn't been much in the way of
> actually resolving my problem, I'll post the link here in the hopes
> someone can answer my question.
>
> http://stackoverflow.com/questions/10564608/using-derelict3-under-dmd2-d

I should mention, the best place to ask about Derelict issues is the Derelict forum.


http://www.dsource.org/forums/viewforum.php?f=19
May 13, 2012
On Saturday, 12 May 2012 at 16:46:05 UTC, Kevin Kowalczyk wrote:
> I posted on stackoverflow but there hasn't been much in the way of actually resolving my problem, I'll post the link here in the hopes someone can answer my question.
>
> http://stackoverflow.com/questions/10564608/using-derelict3-under-dmd2-d

I got it running on my windows PC so I suppose I can just use that for now, I had to add the .lib/.a files directly to the lib directory in the dmd compiler. This is hard to do on linux because it installs to your filesystem's protected area(ie. normal users can't access it). Something to think about I suppose.
May 14, 2012
On 5/14/2012 3:05 AM, Kevin Kowalczyk wrote:
> On Saturday, 12 May 2012 at 16:46:05 UTC, Kevin Kowalczyk wrote:
>> I posted on stackoverflow but there hasn't been much in the way of
>> actually resolving my problem, I'll post the link here in the hopes
>> someone can answer my question.
>>
>> http://stackoverflow.com/questions/10564608/using-derelict3-under-dmd2-d
>
> I got it running on my windows PC so I suppose I can just use that for
> now, I had to add the .lib/.a files directly to the lib directory in the
> dmd compiler. This is hard to do on linux because it installs to your
> filesystem's protected area(ie. normal users can't access it). Something
> to think about I suppose.

Good to hear you got it working, but that's not a good solution. You should never have to drop libraries into the dmd directory tree. It would be beneficial to you to figure out how to get it working normally. Your current approach can cause headaches when you upgrade DMD.