December 15, 2006
My appologies, I would have posted this to the Derelict forum but dsource seems to be down all the time.

Is anyone having problems linking against Derelict on linux using the lastest stuff (dmd .177, bud 3.0.4, Derelict trunk)?

I am using a simple test program:
--------------------------------------------------------------
import derelict.opengl.gl;
import std.stdio;

void main()
{
    try {
        DerelictGL.load();
        writefln("Successfully loaded the OpenGL shared library.");
    } catch (Exception e) {
        writefln("Could not load the OpenGL shared library.");
    }
}
----------------------------------------------------------------

I compiled Bud and Derelict fine. Bud compiles the test code but fails to link based on unresolved references:

test.o: In function `_Dmain':test.d:(.gnu.linkonce.t_Dmain+0xe): undefined reference to `_D8derelict6opengl2gl10DerelictGL4loadFAaZv'

This is what i used to compile:

bud test.d -I/home/wdevore/D2/Derelict/DerelictGL -I/home/wdevore/D2/Derelict/DerelictUtil -L--library=DerelictGL -op -XDerelictGL -Xphobos -LIBPATH=/home/wdevore/D2/Derelict/lib

The Derelict .a files are located in /home/wdevore/D2/Derelict/lib

I also tried a bunch of other variations including calling ld manually and passing all the libraries by hand (i.e. -lpthread -lc etc...) but i still get the link problem.

Has anyone exprienced this in linux using the most lastest stuff? P.S. I am using Ubuntu.

tks.

-Will.