www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Re: Compiling problems

Audun Wilhelmsen Wrote:

 I'm having some strange problems compiling a project. I'm currently using
Poseidon to write and compile code. At one point (after including OpenGL
extensions from Derelict) I just couldn't get it to compile anymore. So I tried
using bud from the command line, and poof! It worked. But then I thought I'd
make bud collect the obj files in a single directory, so I added the -odObjs
switch.. but that gave me a similar error as poseidon did. The error returned
is:
 
 C:\D\Logos>bud main.d -Tmain.exe -odtest
 OPTLINK (R) for Win32  Release 8.00.1
 Copyright (C) Digital Mars 1989-2004  All rights reserved.
 test\main.obj(main)
  Error 42: Symbol Undefined _D8derelict4util6loader13GenericLoader4loadMFAaZv
 test\main.obj(main)
  Error 42: Symbol Undefined _D8derelict4util6loader13GenericLoader6unloadMFZv
 test\sdl.obj(sdl)
  Error 42: Symbol Undefined
_D8derelict4util6loader13GenericLoader5setupMFAaAaAa
 PFC8derelict4util6loader9SharedLibZvAaZv
 test\sdl.obj(sdl)
  Error 42: Symbol Undefined
_D8derelict4util6loader16Derelict_GetProcFC8derelict
 4util6loader9SharedLibAaZPv
 
 Still, if I compile using:
 bud main.d -Tmain.exe
 
 It works perfectly. What is going on here?

I looked over this issue again.. and I think the problem is that in derelict there are two files called loader.d. Since the object files are named the same as the d files but with .obj extension instead, I'm guessing one of the obj files are overwritten. This is kind of silly.. I guess the -op switch would fix this when using dmd directly. But I can't find a way to do this with bud.
Feb 19 2008