Compiling problems
Derek Parnell
derek at psych.ward
Thu Feb 7 13:13:39 PST 2008
On Thu, 07 Feb 2008 12:40:05 -0500, Audun Wilhelmsen wrote:
> 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 suspect it is trying to link old object files. Although the -od will pace
all the new object files into a single directory, it doesn't mean that the
linker will look there.
Can you try a couple of things...
First try using the -clean -full switches. This will force all source to be
recompiled and it will remove the object files after a successful link.
Secondly, if the problem still persists, use the -V switch to get a very
verbose output. I can use that output to see the actions it is taking and
have a better idea about what is going on.
Personally, I never use the -od switch as I don't care where the object
files are temporarily stored. However, if your source is in read-only
directories you still need to specify a writable work area for object files
using the -od switch.
--
Derek Parnell
Melbourne, Australia
skype: derek.j.parnell
More information about the Digitalmars-d-learn
mailing list