Orbiter-Forum  

Go Back   Orbiter-Forum > Orbiter Space Flight Simulator > General Questions & Help
Register Blogs Orbinauts List Social Groups FAQ Projects Mark Forums Read

General Questions & Help General & Advanced Orbiter flight questions, Orbiter installation questions, to all other help topics here.

Reply
 
Thread Tools
Old 06-21-2010, 09:06 PM   #1
Columbia42
Orbinaut
 
Columbia42's Avatar
Default "Error spawning mt.exe/rc.exe" when trying to compile C++ projects

I've been trying to compile some C++ projects (mine and Orbitersdk samples) but I keep getting one of two error messages; "error spawning mt.exe" or "error spawning rc.exe." Does anyone know how to fix this?
Columbia42 is offline   Reply With Quote
Old 06-21-2010, 09:49 PM   #2
orb
O-F Administrator
Ninja
 
orb's Avatar

Default

You may not have properly set paths to "Microsoft Windows SDK" directories. The "mt.exe" and "rc.exe" comes from "bin" directory in there. Those paths should be set automatically when you installed the Windows SDK.

You can try to run "SetEnv.cmd" batch file, that is also located in the "bin" folder of Microsoft Windows SDK, which should set all the needed paths.
orb is offline   Reply With Quote
Thanked by:
Old 06-22-2010, 12:39 AM   #3
Columbia42
Orbinaut
 
Columbia42's Avatar
Default

I ran SetEnv.cmd and it didn't fix the problem. It might be worth mentioning that I just reinstalled Microsoft Windows SDK and since then this problem has occured. Before that everything worked fine.
Columbia42 is offline   Reply With Quote
Old 06-22-2010, 01:01 PM   #4
orb
O-F Administrator
Ninja
 
orb's Avatar

Default

This may mean that SetEnv.cmd didn't set the "WindowsSdkDir" environment variable for all processes and users, and this variable could be set to path, where Microsoft Windows SDK was previously installed.

You can try to run it in command console as Administrator, or add/change WindowsSdkDir environment variable yourself, or edit options to add path to Windows SDK in Visual Studio / Visual C++.


Setting environment variables could depend on your operating system version. Here is how to do it in Windows XP:
  1. Choose System Properties either from Control Panel, or by right clicking on My Computer, and choosing Properties.
  2. On "Advanced" tab click "Environment Variables" button.
  3. In the Environment Variables dialog window, find WindowsSdkDir, and if there isn't any, create a new named this way (in System variables).
  4. As a value for the WindowsSdkDir copy full path to "Microsoft Windows SDK" installation folder (without "bin" at the end).

To set the path in options, choose from menu of VS/VC++:
  1. Tools -> Options... -> Projects and Solutions -> VC++ Directories
  2. On the right, there should be "Show directories" for "Executable files".
  3. If there is "$(WindowsSdkDir)\bin" entry, this means that "WindowsSdkDir" environment variable is invalid. If there isn't any, just add it, and all should be working fine.
  4. You can add a new directory by selecting an empty line at the bottom, then clicking on "..." button, and selecting "bin" directory of "Microsoft Windows SDK".
  5. If WindowsSdkDir environment variable was invalid, you also need to add "include" subdirectory of Windows SDK to "Include files", and "lib" subdirectory to "Library files".
orb is offline   Reply With Quote
Thanked by:
Reply

  Orbiter-Forum > Orbiter Space Flight Simulator > General Questions & Help


Thread Tools

Posting Rules
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
Forum Jump


All times are GMT. The time now is 04:12 AM.

Quick Links Need Help?


About Us | Rules & Guidelines | TOS Policy | Privacy Policy

Orbiter-Forum is hosted at Orbithangar.com
Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
Copyright 2007 - 2017, Orbiter-Forum.com. All rights reserved.