linker: undefined symbol when an interface is derived from.

Neal Alexander wqeqweuqy at hotmail.com
Mon Feb 26 18:32:08 PST 2007


Jarrett Billingsley wrote:
> "Neal Alexander" <wqeqweuqy at hotmail.com> wrote in message 
> news:erv3kf$2ukm$1 at digitalmars.com...
>> The IDirect3D8 interface works fine if its used opaquely with the various 
>> directx routines; but when the interface is used to make a class that 
>> implements it, or in this case wraps it, the linker cant find the 
>> IDirect3D8 interface symbol.
>>
>> Scope issues or compiler bug?
> 
> Are you compiling both files?
> 
> dmd file1.d d3d8.d
> 
> Actually, if this isn't a typo, the error references file2.obj, but I only 
> see file1.d. 
> 
> 

Yea, file2 is some other code that isn't hugely relevant. Anyway, I tried 
compiling d3d8.d in with it, but it gives 'multiple defined' type errors during 
the parsing stage since the module is imported i guess (cant build without the 
type definitions in it). d3d8.d is just a "header" anyway it shouldn't need to 
be explicitly compiled right? Also, i don't understand why an interface 
definition produces a symbol in the binary haha.

I was thinking, maybe it could also be an issue with symbol naming - maybe 
extern (Windows) isnt matching up for everything -- but i tried playing with 
different extern () settings and it diddnt help.

I uploaded the full d3d8.d; incase someone wanted to take a look. Its relatively 
small compared to some of the other D3D headers haha.

http://arenz.game-host.org:8080/d3d8.d.txt


More information about the Digitalmars-d-learn mailing list