http://d.puremagic.com/issues/show_bug.cgi?id=3564

           Summary: Rdmd failing to link external C libraries
           Product: D
           Version: 2.034
          Platform: x86
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nob...@puremagic.com
        ReportedBy: pelle.mans...@gmail.com


--- Comment #0 from Pelle M�nsson <pelle.mans...@gmail.com> 2009-12-02 00:33:57 
PST ---
I try to run D-code with an externally linked C library in this example:

~/dee% dmd test.d -L-lSDL
~/dee% ./test
~/dee% rdmd test.d -L-lSDL
/tmp/.rdmd/rdmd-test.d-E6CBF3336CD9625C87A273ACDCCC0CF8/test.d.o: In function
`_Dmain':
test.d:(.text._Dmain+0x9): undefined reference to `SDL_Init'
collect2: ld returned 1 exit status
--- errorlevel 1

With dmd it works fine, but with rdmd it doesn't link the library at all. Dry
run looks like this:

~/dee% rdmd --dry-run test.d -L-lSDL 
chdir '.' && dmd  -v -o- 'test.d' >test.d.deps
dmd  -of'/tmp/.rdmd/home/plol/dee/test.d.E6CBF3336CD9625C87A273ACDCCC0CF8'
-od'/tmp/.rdmd/rdmd-test.d-E6CBF3336CD9625C87A273ACDCCC0CF8' 'test.d' 

The code I run is this:

extern (C) { int SDL_Init(uint); }
enum uint SDL_INIT_EVERYTHING = 0x0000FFFF;

void main(char[][] args) {
    SDL_Init(SDL_INIT_EVERYTHING);
}

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to