Import c files?

BlitzMax Forums/BlitzMax Beginners Area/Import c files?

markcw(Posted 2008) [#1]
Ok, I give up. How do you import c files? Do they have to go in some folder? Where can I find some info on this?


plash(Posted 2008) [#2]
brl.blitz imports alot of C.. I'm not sure if all C code has to be in BBType's or in extern's though..

Brucey?


markcw(Posted 2008) [#3]
Do I need MingW installed? Does the c file have to be in a module? I just have it in a normal subfolder beside the bmx file. What are bbTypes?


plash(Posted 2008) [#4]
Do I need MingW installed?
I think so, yes.

Does the c file have to be in a module?
No.

What are bbTypes?
Take a look at '../mod/brl.mod/blitz.mod/blitz_types.h'. I think it has all the definitions for standard BlitzMax types in there, which I would assume are used to actually pass objects without conversion.


Brucey(Posted 2008) [#5]
Import "mycfile.c"

As simple as that.

:-)

If you have associated headers... you should also add :

Import "*.h"

before your "c" imports.

Do I need MingW installed?

On Windows, absolutely.


markcw(Posted 2008) [#6]
Ok, I installed MinGW using the guide here and it's working now.

Thanks for the tips. :)