Ok, I have to correct myself:
Compiling any C/C++ project on Windows is an absolute clusterfuck!
I've now almost spent more time trying to compile my program for Windows than writing the actual code for it - let that sink in!
Whoop! It compiles now on Windows!  
 
You'll never guess what the #error was...
...on my Windows machine I had a file sync program running in the background, which apparently tripped up the compilation process (the program to compile was in a folder that had been under sync)!
Once I moved the program out of this folder, it all compiled fine!
Holy cow! 🤯
Unfortunately, my program doesn't seem to work on #Windows yet. It just gets stuck after passing audio to #Whisper. 😢
Specific to GLSL #version checks if our parser supports the given version. Whilst #extension checks whether our parser supports a given extension possibly enabling or disabling it, or complaining about its support or lack thereof. Depending on what's requested.
Funny thing about discussing the C, GLSL, etc preprocessor on the fediverse. Directives get confused for hashtags!
4/4 Fin!
I'd track a stack of control-flow preprocessor lines tracking whether to keep or discard the lines between them, inserting #line where needed. This is how I'd handle #if, #elif, #else, #endif, #ifdef, #ifndef, #elifdef, #elifndef.
Some of these take identifiers whose presence it should check in the macros table, others would interpret infix expressions via a couple stacks & The Shunting Yard Algorithm. Or they simply end a control-flow block.
#undef removes an entry from the macros table.
3/4
Specific to GLSL #version checks if our parser supports the given version. Whilst #extension checks whether our parser supports a given extension possibly enabling or disabling it, or complaining about its support or lack thereof. Depending on what's requested.
Funny thing about discussing the C, GLSL, etc preprocessor on the fediverse. Directives get confused for hashtags!
4/4 Fin!
 
      
  
                            
                        
                         
      
  
            