www.digitalmars.com         C & C++   DMDScript  

D - error during compiling, using c dll in d code

I just started trying to use D so please ignore my ignorance.

What I want to end up with is a d program that uses a c dll, the C dll have
function for rendering 3D objects.

I converted a c header file to d via htod.

When I compile test.d I get to following error :

D:\d\projects\titanWrapper>dmd test.d
D:\D\dmd\bin\..\..\dm\bin\link.exe test,,,user32+kernel32/noi;
OPTLINK (R) for Win32  Release 7.50B1
Copyright (C) Digital Mars 1989 - 2001  All Rights Reserved

 Error 42: Symbol Undefined _trCreateGLWindow
--- errorlevel 1

Can anybody give me a tutorial on how to use C dll in D for dummies.




import std.c.stdio;
import windowing;

int main()
	return 0;


/* Converted to D from windowing.h by htod */
module windowing;

alias int BOOL;
//C    #define FALSE 0
const TRUE = 1;
//C   #endif
const FALSE = 0;

// Exports
//C     BOOL trCreateGLWindow(int, int, int, BOOL);
extern (C):
int  trCreateGLWindow(int , int , int , int );
Oct 06 2006