GCC GNU99/C99 impossible?

BlitzMax Forums/BlitzMax Programming/GCC GNU99/C99 impossible?

ProfJake(Posted 2011) [#1]
Hi,

I've tried to compile a module (which is mostly written in C) in C99 and GNU99 mode.
Why? Well I would like to use some of the features in the C99 standard. Furthermore I noticed that the resulting .a file seems to be a bit smaller : )

I configured the gcc via
ModuleInfo "CC_OPTS: -std=gnu99"

The module can be build without any errors or warnings, but I only got linking errors when I tried to run an application using it.

Has anyone experience with this kind of thing? Is the binary resulting from gnu99 incompatible to gnu90? Or is it a problem on BlitzMax's part?

Last edited 2011

Last edited 2011


Brucey(Posted 2011) [#2]
You can certainly compile C code using C99 mode.
If your module compiles without error, there's no reason it shouldn't work. Whether you are calling the functions correctly is another thing entirely :-)


ProfJake(Posted 2011) [#3]
I tried it using you BMK (NG), but the result was the same.

All functions are imported to BlitzMax via an .i file and can be called in default mode.
But as soon as I set the flag to gnu99 and try to build an app the linker complains about a large amount of incoherent "Undefined symbols".
Some are from extern modules but many of them come from inside of the module.

Maybe I'll solve that tomorrow : )


ProfJake(Posted 2011) [#4]
I just wanted to say that it worked the next day, not sure what caused the problem.