Undefined function, even though imported
Trass3r
un at known.com
Tue Jun 14 09:30:44 PDT 2011
Am 14.06.2011, 02:43 Uhr, schrieb Loopback <elliott.darfink at gmail.com>:
> Thanks for all the answers! Seems like rdmd did the trick.
> I don't see why this isn't built in to dmd though
No one does ;)
> I've also stumbled upon an additional error with the win32 DirectX
> bindings, but this seems D related actually. When I compile any code
> at all (with rdmd) which imports win32.directx.d3d9 and uses the
> function Direct3DCreate9, the linker issues this warning:
>
> Error 42: Symbol Undefined _Direct3DCreate9 at 4
So the other functions in d3d9 work but only this one doesn't?
> Both of these links says that the problem is solved by adding
> _Direct3DCreate9 to imports. I've tried to do this by linking to a
> .def file with this content (without success, same error is still
> issued).
>
> EXETYPE NT
> SUBSYSTEM WINDOWS
>
> IMPORTS
> _Direct3DCreate9 at 4=d3d9.Direct3DCreate9
^^ This can't work cause the linker knows nothing about D modules.
You'd have to use the correct D mangled name.
More information about the Digitalmars-d-learn
mailing list