D - error during compiling, using c dll in d code
- %u (35/35) Oct 06 2006 I just started trying to use D so please ignore my ignorance.
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 test.obj(test) Error 42: Symbol Undefined _trCreateGLWindow --- errorlevel 1 Can anybody give me a tutorial on how to use C dll in D for dummies. Thanx, Glen test.d import std.c.stdio; import windowing; int main() { trCreateGLWindow(640,480,16,0); return 0; } windowing.d /* 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