Thomas
Thomas

Reputation: 2560

Visual Studio not compiling specific file

I am working on an OpenGL game in C++ and am using Visual Studio 2013 for it. Until now everything worked fine but since about 3 days, one of my files is no longer compiled when I change it. The strange thing is, it is really just related to this one single file. Every other file works as expected. So if I change something in said file (it is a .h file with implementation in it) Visual Studio doesn't care. Even if I write some unexecutable statement in it, he lines it in red but doesn't bother anyway thus will just use an old, pre-compiled version. If I delete the "build-Debug" folder, he compiles the file again and it works as it should. Any ideas how to solve this problem?

I also realised that the "build-Debug" folder, contains no .obj file for all the header files with implementation in it. Maybe it has something to do with it?

Also, my general building properties are okay, like always compile when files change and such stuff.

Upvotes: 3

Views: 3148

Answers (1)

Thomas
Thomas

Reputation: 2560

I eventually solved the problem myself by just splitting the file into a seperate .h and .cpp file. While this was not my intention after all I could not find another solution for this problem. Thus it must have had something to do with being part of another .obj file and maybe with some include order or something similar.

Upvotes: 1

Related Questions