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
 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.
  Error 42: Symbol Undefined _D8derelict4util6loader13GenericLoader4loadMFAaZv
  Error 42: Symbol Undefined _D8derelict4util6loader13GenericLoader6unloadMFZv
  Error 42: Symbol Undefined
  Error 42: Symbol Undefined
 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