2 minutes ago, SoldierOfLight said:
Are you sure you're exporting that symbol out of your exe (and not, e.g. a renderer dll)?
The symbol is exported in a .cpp file of a static .lib which is used by my .exe.
Since you mentioned this, I started moving the export to a .cpp of the .exe itself (NVIDIA GPU is selected and has an output). But it also works when I move the export to another .cpp of my static .lib. Based on these observations and the fact that it worked once, I looked at the changes to the .cpp file for which it does not work anymore. Apparently, I moved all declarations from this file. So basically:
#include "rendering\rendering.hpp"
extern "C" {
__declspec(dllexport) DWORD NvOptimusEnablement = 0x00000001;
}
extern "C" {
__declspec(dllexport) int AmdPowerXpressRequestHighPerformance = 1;
}
is all what is left in the file. "rendering.obj" is still generated by the compiler. So could the linker be the culprit?
Anyway, thanks to everyone who looked into this.