I’m using Microsoft Visual Studio C++ 2010 and the examples compile but an .exe won’t be created or start, I get a pop up error stating:
"Unable to start program ‘ C:\Program Files (x86)\FMOD SoundSystem\FMOD Programmers API Win32\examples\playstream.\Debug\playstream.exe’.
The system cannot find the file specified."
I’ve tried making sure said folders exist, I’ve tried changing the output directory, and I’ve tried just making my own projects but I always face the same problem. Anyone have any suggestions or solutions?
- JCSopko asked 8 years ago
JCSopko is right: it turns out that there is a problem when converting the solution. You get a whoooole bunch of warnings when converting the projects (one for each build config for each project).
The conversion warning reads:
[quote:1bvk0av0]MSB8012: $(TargetPath) (‘C:\Program Files (x86)\FMOD SoundSystem\FMOD Programmers API Win32\examples\playstream\Win32\Debug C\playstream.exe’) does not match the Linker’s OutputFile property value ‘playstream.exe’ (‘C:\Program Files (x86)\FMOD SoundSystem\FMOD Programmers API Win32\examples\playstream.exe’) in project configuration ‘Debug C|Win32’. This may cause your project to build incorrectly. To correct this, please make sure that $(TargetPath) property value matches the value specified in %(Link.OutputFile).[/quote:1bvk0av0]
If you just compile as is, it leads to the following build system warning:
[quote:1bvk0av0]1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppBuild.targets(990,5): warning MSB8012: TargetPath(C:\Program Files (x86)\FMOD SoundSystem\FMOD Programmers API Win32\examples\playstream\Win32\Debug\playstream.exe) does not match the Linker’s OutputFile property value (C:\Program Files (x86)\FMOD SoundSystem\FMOD Programmers API Win32\examples\playstream\playstream.exe). This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Link.OutputFile).[/quote:1bvk0av0]
Which is basically the same warning in a different context.
When you attempt to run the program from Visual Studio (F5), it complains that it can’t find the target. However, if you go to explorer (or command prompt) and run it from there, it works properly.
The $(TargetPath) variable is set by:
During the conversion process, the $(OutputPath) variable gets set to the same as the $(IntDir), which is where all of the intermediate files (such as .obj files) go.
The solution to this problem is to set the $(OutputPath) to be the same as the project directory. To do this:
[list:1bvk0av0]- Open the properties for your project
– Select "All Configurations" from the Configuration dropdown
– Select "All Platforms" from the Platform dropdown
– Go to Configuration Properties->General
– Set the Output Directory entry to blank (delete the contents)
– Rebuild the project[/list:u:1bvk0av0]There you go, that should do it! Note that you will have to do this same procedure for every project in the examples solution that you want to run.
Brett, you probably ought to include a VS2010 solution and .vcxproj files so that other people don’t run into this problem.
Edit: missed a step
- Adiss answered 8 years ago
fmod examples usually build the exes into the same directory as the project and c/c++ file, not ‘Debug’ or ‘Release’.
Also they have a post build command that copies the fmodex.dll into the example directory.
Opening the 2005 project in 2010 should auto upgrade and work.
Please login first to submit.