News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

Disable Automatic Preprocessor Directives

Started by purpleferns, January 18, 2024, 04:23:35 PM

Previous topic - Next topic

purpleferns

I heard that Code::Blocks covers you if you forget to import any preprocessor directives if you use it's functionality. While it's helpful, I'm currently learning C and would rather not pick up that bad habit of forgetting. Is there any way to disable this feature?

stahta01

https://wiki.codeblocks.org/index.php/FAQ-General#Q:_What_Code::Blocks_is_not.3F
Quote
Q: What Code::Blocks is not?
A: Code::Blocks is not a compiler, nor a linker. Release packages of Code::Blocks may include a compiler suite (MinGW/GCC), if not provided by the target platform already. However, this is provided "as-is" and not developed/maintained by the Code::Blocks development team.

What you stated sounds more like a compiler feature than a Code::Blocks feature.

Tim S.
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

purpleferns

#2
That's fair, I'm just new to this so I'm not sure where each project begins and ends.
I'm using the GNU GCC Compiler, am I able to change it from the global compiler settings or should I ask in the GNU GCC forums (or wherever they talk about)
EDIT: Setting the "Treat as errors the warnings demanded by strict ISO C and ISO C++" flag under Global Compiler Settings -> Compiler Settings seems to do what I want it to do. If you're using the GNU GCC Compiler then this should work.