Need help with coding

astrosammy

Dash!
Addon Developer
Donator
Joined
Apr 27, 2008
Messages
2,124
Reaction score
0
Points
36
Location
ICAO ID: EDFB
I decided to try to code something.
I've gone through the Free Compiler Setup at orbiterwiki http://www.orbiterwiki.org/wiki/Free_Compiler_Setup
I made exactly what is written there and compiled the ShuttlePB.
But now I'm getting a CTD when I use any thruster.




I'll write step-by-step what I've done so someone can find what I've done wrong:
  1. Downloaded and installed Visual C++ 2005 Express Edition from here: http://www.microsoft.com/express/2005/.
  2. Made a new clean Orbiter with Orbiter Base (060929) and SDK (060929).
  3. Downloaded Microsoft Windows Server 2003 R2 Platform SDK (PSDK-x86.exe) and installed it like it is described.
  4. Set the configuration to Release, added all include and library paths.
  5. Changed "#include <fstream.h>" to "#include <fstream>" in the OrbiterAPI.h file.
  6. Did this: http://www.orbiterwiki.org/wiki/Free_Compiler_Setup#C.2B.2B_language_change
  7. Added to "Additional Dependencies kernel32.lib,user32.lib and gdi32.lib, and to "Ignore Specific Library" msvcirt.lib
  8. Clicked Build/Build ShuttlePB.
  9. Tested it in Orbiter, ignited main engines, CTD :(.
 
It looks like you did everything right. Did you get any errors/warnings in VC++2005 when you compiled it?
 
Change the configuration to Debug. Change the project settings for debug so that the output file (in the linker section) is in orbiter's plugins\modules directory (where you would normally copy it to) and set the debug directory to be the orbiter directory. Then you can hit F5 and run orbiter in debug mode (Make sure it's not full screen). From there, you can step through the code with the F5,F10,F11 keys and see where it crashes.
 
Back
Top