Why does my working directory change to C:\Windows\System32 when I use a Console subsystem

315 views Asked by At

I'm using SDL in VS2013 and I'm trying to load an image from the folder that my working directory should be using a relative path. Which is where the .vcxproj files are. However I discovered that the working directory is not the folder it should be, it is actually in C:\Windows\System32. I have realised that this is only the case when I go to linker, system and then change the subsystem to CONSOLE. In a WINDOWS subsystem it uses the correct working directory. Why is this happening and how do I fix it?

I think it may have something to do with VS2013 using cmd.exe which is in the system32 folder but I cannot be certain and would not know how to fix it even if that is the case.

1

There are 1 answers

0
Trevor Hart On

Hmm...I don't think I've ever had that problem, and I always write with the console window. Have you tried just making a new project to see if maybe something got set in your properties by accident or something? I would give that a try, or maybe re-install SDL..? That's weird, sorry I don't have better advice!