0
0

I’m writing an application in Visual c++ 2005 express. I need to use VC++ because I have to create the GUI, but when I compile I get an ambiguous symbol error whenever I use System or FMOD::System in the code.
How can I resolve the problem?

  • You must to post comments
0
0

[code:7xi6mimt]private FMOD.System pSystem;
private FMOD.Channel pChannel;
private FMOD.Sound pSound;
private FMOD.RESULT pResult;[/code:7xi6mimt]

[b:7xi6mimt]pSystem != System[/b:7xi6mimt]

  • You must to post comments
0
0

Also, do you mean your doing something like System("PAUSE") in order to keep the window up? If so, then that’s the problem, and do what Colores suggested. ie, don’t create a FMOD::System named ‘System’.

  • You must to post comments
0
0

No, this is not the problem. I have a namespace problem. Visual C++ has a namespace called System.
If I use
[code:2muvo3sp]using namespace System;
using namespace FMOD;
[/code:2muvo3sp]
everytime the code contains a reference to System the compiler gives me an ambiguity error, because it can’t choose between FMOD::System and System.
Instead, whenever I use FMOD::System there’s no problem.
If I don’t use FMOD namespace I receive a warning telling me that FMOD_SYSTEM is an unresolved typeref and that the program could not work.
I tried to use ::System insted of System and also to create an alias for the System namespace but these solution give other different errors.
?

  • You must to post comments
0
0

Maybe you have a class named system in your System namespace, in which case you should use System::System.
Simple suggestion.

  • You must to post comments
0
0

[quote="artscoop":3pb2w12c]Maybe you have a class named system in your System namespace, in which case you should use System::System.
Simple suggestion.[/quote:3pb2w12c]

You misunderstand him. The problem is that on windows if you use the "use namespace FMOD" statement you will have two namespaces named "System".

Hence the compiler will not be able to make a difference between them and see both "System" namespaces as one. Which is the reason namespaces was introduced to stop. So using the statement "using namespace FMOD" should not be used on the windows platform (and possibly XBOX?), or things might eventually break.

  • You must to post comments
0
0

Ah, ok, thanks for the info, a good thing to know about.

  • You must to post comments
Showing 6 results
Your Answer

Please first to submit.