So currently I would like to test out if could compile an example csfml code with tcc (Tiny C Compiler 0.9.27) on windows, but currently, I have a compiler error:
C:\Users\User6\Desktop>tcc mainpage.c
In file included from mainpage.c:1:
In file included from c:/program files (x86)/tcc/include/SFML/Audio.h:32:
In file included from c:/program files (x86)/tcc/include/SFML/System.h:33:
In file included from c:/program files (x86)/tcc/include/SFML/System/Clock.h:32:
c:/program files (x86)/tcc/include/SFML/System/Time.h:47: error: declaration for parameter 'sfTime_Zero' but no such parameter
I'm compiling with csfml 2.5.1 with an example of csfml from https://gist.github.com/def-/fee8bb041719337c8812.
If there's no solution to this other than using a more newer compiler, please do say so. (I'm using tcc as i'm runnng out of storage).
Cheers,
harieamjari
The latest tcc (0.9.27) *does* flawlessly compile this code (it's not (C)SFML itself, it's just a simple valid plain C example, :) ).
However, if you try to compile it using the tcc Windows binary (you are using Windows, don't you?) you need to add an additional include at the very top of your code #include <winapi/windows.h>:
#include <winapi/windows.h>
#include <SFML/Audio.h>
#include <SFML/Graphics.h>
int main()
...
To satisfy this import you may also have to add the 'include' folder from 'winapi-full-for-0.9.27.zip' to tcc's include folder (or read the 'readme.txt' in the zip file).
'winapi-full-for-0.9.27.zip' is available from: http://download.savannah.gnu.org/releases/tinycc/ (http://download.savannah.gnu.org/releases/tinycc/)