GLBasic forum

Codesnippets => Inline / 3rd party => Topic started by: MrTAToad on 2010-Jun-02

Title: Basic headers file
Post by: MrTAToad on 2010-Jun-02
I've put all the standard C functions I use into one file, which you may find useful.

[attachment deleted by admin]
Title: Re: Basic headers file
Post by: MrTAToad on 2010-Jun-02
Only if you use the headers file - which I don't.  This is an alternative to it, although it only allows access to standard C functions, and no operating system stuff...
Title: Re: Basic headers file
Post by: Kitty Hello on 2010-Jun-03
You should have made that with IMPORT now and a shiny .gbas file ;)
Title: Re: Basic headers file
Post by: MrTAToad on 2010-Jun-03
Quite true - didn't think of IMPORT :)

However, I did try it with tmpnam :

Code: (glbasic) [Select]
IMPORT "C" char *tmpnam(char *str)
 and I just keep getting a syntax error...
Title: Re: Basic headers file
Post by: Schranz0r on 2010-Jun-03
const char* :)
Title: Re: Basic headers file
Post by: MrTAToad on 2010-Jun-03
Tried it with that too...
Title: Re: Basic headers file
Post by: MrTAToad on 2010-Jun-03
Think I've sorted it - normally I put the pointer symbol next to the function/variable it applies to.  However, IMPORT requires it next to the type...