0
0

I’ve been staring at this for far too long now. I took the stream sample and essentially copied it into a msvc++ 7.0 win32 project and included the .lib file. Then, I copied the .dll to the same directory. When I compile, I get the following error:

[code:3n4gqz5v]Unhandled Exception: System.TypeLoadException: Could not load type FSOUND_STREAM
from assembly soundExperiment, Version=0.0.0.0, Culture=neutral, PublicKeyToken
=null.
at main()
Press any key to continue[/code:3n4gqz5v]

I can’t figure out what I am missing. Any ideas?

  • Tucker
  • You must to post comments
0
0

Which project type did you select?

Edit:
Silly me… I missed it in your original post… I’m trying the same thing on my box.

Edit:
Okay… I created a new C++ Win32 Application (Console, Empty project). I copied the “Main.cpp” from the [b:1icb3nx0]stream[/b:1icb3nx0] sample into the project’s directory and added it to the project. I then added “fmodvc.lib” to “Configuration Properties/Linker/Input/Additional Dependencies”. I also made sure that the FMOD SDK directories “api/inc” and “api/lib” were in the directory paths at “Tools/Options/Projects/VC++ Directories”. With the exception of 6 warnings (mostly type-cast related), the program compiled and executes normally.

  • You must to post comments
0
0

I won’t be able to try that out for another 8 or so hours, but thanks.

> Which project type did you select?

I chose managed c++ empty app.

  • Tucker
  • You must to post comments
0
0

FMOD is unmanaged code, so you cannot work with it directly in a managed environment. Adding “#pragma unmanaged” to the top of your source file will instruct the compiler to work in unmanaged mode. This will let the program run. You lose nothing, since nothing could be managed.

Until the .NET/CLR version of FMOD releases, I’d advise you to stick to unmanaged C/C++ for now. Anyway, Microsoft made Managed C++ a really messy language with all of the extensions. 😉 (…and in those many extensions are probably the very keywords you would need, if you wanted to augment “fmod.h” in order to get it to cooperate with managed code.)

  • You must to post comments
0
0

Yeah, adding “#pragma unmanaged” to the top fixed everything. Thanks enormously. :) I’ll stick to unmanaged code for now at least.

  • Tucker
  • You must to post comments
0
0

Thank god for this thread. I’ve been at this all day – tried google,yahoo – none of them worked. msn did the job:)

A++ to serac.

edit: see’ing as how we’re now in 2005 as oppose to when this thread got started.. does the lastest version of MS Visual Studio.NET give you the option to create an .cpp C/C++ file (console project) unmanaged so you don’t have to insert #pragma unmanaged on your .cpp file??

Thanks in advanced.

  • You must to post comments
Showing 5 results
Your Answer

Please first to submit.