For a while now I've been writing dlls for DBPro. Now I would like to port them so I could make them usable with DarkGDK.
The dll which I am currently porting, is BlitzTerrain. A LOD Terrain plugin currently only available for Dark Basic Pro, but hopefully, going to be ported to DarkGDK.
http://forum.thegamecreators.com/?m=forum_view&t=145404&b=8
I got blitzterrain compiling with the Dark GDK Header file, but I am having problems. When you use blitzterrains lib with Dark GDK, It gives a few LNK4217 warnings for commands in stdlib (malloc, free, etc). The application crashes when I run it. My Question is, how do I get rid of these warnings?
Heres some code that when compiled as a lib then used in a DarkGDK project, It creates these warnings:
1>libpractise.lib(main.obj) : warning LNK4217: locally defined symbol _free imported in function "void __cdecl DoSomething(unsigned long)" (?DoSomething@@YAXK@Z)
1>libpractise.lib(main.obj) : warning LNK4217: locally defined symbol _malloc imported in function "void __cdecl DoSomething(unsigned long)" (?DoSomething@@YAXK@Z)
and heres the code:
#include <DarkGDK.h>
#include <stdlib.h>
void DoSomething(unsigned long ObjectID)
{
void* somedata;
somedata=malloc(10);
dbScaleObject(ObjectID,200,200,200);
free(somedata);
}
That code doesnt crash like BlitzTerrain does, It works. I know why BlitzTerrain is crashing, and I'm working on that. I just need to know how to get rid of these warnings.
Thanks in advance!
- Kaedroho