Game Development Community

Compile-debug-error

by Arne Hawly · in Torque Game Engine · 01/05/2006 (12:09 pm) · 7 replies

Hi,

I just installed Torque 1.4 and followed all instructions.
I copied the "starter.fps" and named it "mygame". Then I changed the "main.cs" file in the "example" folder ("$defaultGame = "mygame";"). When I run "torqueDemo.exe" everything works just fine, so I wanted to compile the *.exe again (I have Microsoft Visual C++ .NET 7.1).

I used the instructions and building the *.exe was not a problem ("Build: 17 succeeded, 0 failed, 0 skipped")
but when I run the file I am given this information:

Failed to open "main.cs"

I am stuck. Can anyone help me? Thanks!

#1
01/05/2006 (12:38 pm)
I assume this was trying to run from inside the compiler. .NET treats that as running it from the same directory that the solution is in. Just copy over the stuff you need into that directory and you'll be able to run it that way, which would be your mygame folder, the common folder, main.cs, all the .dll's.
#2
01/05/2006 (12:46 pm)
In your project settings set "working directory" to be "../example" (without quotes).
#3
01/05/2006 (12:55 pm)
Doh, yeah or you could do that. I don't know why I always forget about that.
#4
01/05/2006 (1:02 pm)
I copied the hole "common"-folder into "mygame"-folder. Unfortunately I get the same error.
Where shall I change the "working directory"?
#5
01/05/2006 (1:16 pm)
Whoa, I think there was a breakdown in my explaination, that wasn't quite what I meant. Doesn't matter, ignore my stupid brute force answer and do it the proper way like Matthew said.

You'll find the working directory setting here:

Project->Properties->Configuration Properties->Debugging

You'll see working directory there. Make sure to do it for Debug and Release.
#7
01/05/2006 (1:21 pm)
Hui, thanks a lot! Works now :))