C Help

BlitzMax Forums/BlitzMax Programming/C Help

Ghost Dancer(Posted 2010) [#1]
I've been looking for ways to use COM objects from Max and found something called [url=http://disphelper.sourceforge.net/]disphelper[/url] which should do the job. I'm trying to write a Blitz wrapper module for this but my C knowledge isn't great.

I've used the C for Blitzers tutorial and got some basic C code to work in Blitz, but I'm having problems importing the disphelper code. I have the following code:

SuperStrict
Import "*.h"
Import "disphelper.c"


and I'm getting loads of "undefined reference to" compiler errors. I'm guessing this something to do with the C includes but not sure.

disphelper.h:



disphelper.c:




Zeke(Posted 2010) [#2]
add:
Import "-lole32"
Import "-loleaut32"
Import "-luuid"



Ghost Dancer(Posted 2010) [#3]
You are a star, thank you :)

I would be intersted to know what those lines do and/or why they are needed?


plash(Posted 2010) [#4]
They link libraries at compile time, specifically the Windows libraries ole32, oleaut32 and uuid (which I do not believe is a standard library).