I've just tried using two namespaces in a project at the same time, using the "using namespace ... ;" syntax for each namespace. MinGW threw errors claiming variables and functions weren't defined. Is it possible to use two namespaces in this way, without having to resort to the "namespace::member" syntax for one of the namespaces?
Guess what namespaces are designed for...
The "using namespace" directive is *EVIL* and should be illegal alltogether, as far as I am concerned. Most likely you only require single types. If you really feel the urge, use usingnamespace::member
for the members you really require to be in global scope.
To your question: it is possible to do so if and only if no ambiguities arise. Otherwise, how should name resolution work?
That doesn't solve the problem. MinGW doesn't throw random errors. If it says something is not defined, then it is very likely not defined, or not defined properly.
The only place that using directives are evil is in header files. Multiple using directives are additive, and only conflict when you try to use the same unqualified name from different namespaces with using.
Make sure you have everything properly defined, #included, and include-guarded.