Namespacing issue


#1

Hi Jules.

I have a small hack inside juce_win32_messaging which requires #include <atlcomcli.h>.
It all worked fine until the last namespace commit.

I never was a namespace guru and after looking at the changes I still don’t understand what in the commit broke it.
I tried to encapsulate the hack in a small class, but when I try it I get linkage errors when calling the class’s method.

Can you shed some light about what causes this (and yes, I know I should have read an in-depth C++ book by now…)

Thank you.

Edit: I can compile the new cpp file by adding it to juce_events.cpp, but then again the #include <atlcomcli.h> will cause compilation errors.


#2

You’re probably including that file inside the juce namespace block. Just put the include somewhere else - why not find where all the other win32 headers are included, and add it there?


#3

It worked, thanks!!

I still don’t understand why when I add a new header file inside juce_MessageManager.h for example, its cpp file does not get compiled.
I can only compile it by adding the cpp to the juce_events.cpp, but then I lose all the encapsulation idea.