1

I'm currently working with some tutorials for opengl and don't want to set up the linker and include directories for each test source file. But from the tutorial each different example has its own main. I'also don't want to exclude all source files I'm currently working on.

I could put each source file into a

#ifndef EXAMPLE_X
 /*sourcecode*/
#endif

But when I started typing this for each source file, I was aksing my self: is there some kind of pragma or flag for MSVC (I don't care about portabilty, as I'm just practicing the tutorial of a book) that says "just ignore this file stop compiling this file, and forget all you have parsed untill now in this file" so it is just as it is excluded, but I don't have to exclude and reinclude the files from my solution browser everytime I wan't to check something from older source. And instead just have to comment or uncomment the #pragma ignore flag stuff

dhein
  • 6,431
  • 4
  • 42
  • 74

1 Answers1

2

No, there isn't.

Either remove the files you don't want from your project, or use macros to conditionally turn on/off their contents.

Lightness Races in Orbit
  • 378,754
  • 76
  • 643
  • 1,055