User forums > Using Code::Blocks
SDL and cpp project.
(1/1)
phR689:
Hello
When i create a new SDL project, C::B creates a "main.cpp" file.
But, i want to create a C SDL project.
Can you help me?
My C::B release is 10.05 and runs on a GNU/Linux Ubuntu platform
Regards
Thanks
stahta01:
Save "main.cpp" as "main.c"
Add "main.c" to project
remove "main.cpp" from project.
Fix the compiler errors in "main.c"; the simplest fix is adding "#include <stdbool.h>"
--- Code: ---#ifdef __cplusplus
#include <cstdlib>
#else
#include <stdlib.h>
#include <stdbool.h>
#endif
--- End code ---
Save the project as a template. (Note: I have never done this step myself.)
Use the template for future C SDL Projects.
Tim S.
phR689:
hi Tim,
Thanks a lot for your help.
I'll work with this template from now on.
Philippe
Navigation
[0] Message Index
Go to full version