I try to build ActiveX plugin (VS 2012) according this manual https://github.com/julianstorer/JUCE/blob/master/extras/browser%20plugin%20demo/How%20to%20build%20a%20browser%20plugin.txt. But i get
juce_browser_plugin.h(53): fatal error C1189: #error : "You must define the JuceBrowserPlugin_Company macro before including juce_browser_plugin.h!"
#ifndef JuceBrowserPlugin_ActiveXCLSID
#error "For an activeX plugin, you need to define JuceBrowserPlugin_ActiveXCLSID in your BrowserPluginCharacteristics.h file!"
#endif
What? No no no no no.. It's not possible to include JuceHeader.h in a module file - that would make no sense at all.
I haven't time to try this myself right now, but I can't see what the problem is.. The juce_browser_plugin.cpp file includes juce_ActiveX_GlueCode.cpp, and before it does so, it also includes AppConfig.h, which in turn includes BrowserPluginCharacteristics.h which defines that macro. I can't really see a problem with all that..?
Dear, Julian. JUCE framework is realy awsome for me. But it's not my imagination. I just download source code from github and then try to build plugin demo (https://github.com/julianstorer/JUCE/tree/master/extras/browser%20plugin%20demo/build/win32) with ActiveX in Visual Studio 2012 - that's all
I just tried compiling the demo browser plugin project, and this doesn't happen for me. I don't know what you're misunderstanding or doing wrong, I'm afraid.
I'm afraid I can confirm the error here (latest pull from repo, no changes whatsoever).
I did as stated in the docs in "How to build a browser plugin.txt" for an ActiveX plugin:
"add the juce_ActiveX_GlueCode.cpp file to the project".
This is the full build log (Visual Studio 2008 SP1, on Win7 64-bit):
1>------ Rebuild All started: Project: JuceBrowserPluginDemo, Configuration: Release Win32 ------
1>Deleting intermediate and output files for project 'JuceBrowserPluginDemo', configuration 'Release|Win32'
1>Compiling...
1>juce_ActiveX_GlueCode.cpp
1>Have you included your AppConfig.h file before including the JUCE headers?
1>e:\koen\juce\modules\juce_browser_plugin_client\wrapper\../juce_browser_plugin.h(51) : fatal error C1189: #error : "You must define the JuceBrowserPlugin_Company macro before including juce_browser_plugin.h!"
1>juce_gui_basics_wrapper.cpp
1>juce_graphics_wrapper.cpp
1>juce_events_wrapper.cpp
1>juce_data_structures_wrapper.cpp
1>juce_core_wrapper.cpp
1>juce_browser_plugin_wrapper.cpp
1>JuceBrowserPluginDemo.cpp
1>Build log was saved at "file://e:\Koen\JUCE\extras\browser plugin demo\build\win32\Release\BuildLog.htm"
1>JuceBrowserPluginDemo - 1 error(s), 0 warning(s)
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========
Seems like some order-of-inclusion thing.
The JuceBrowserPlugin_Company macro is defined in BrowserPluginCharacteristics.h, which is included by AppConfig.h. And AppConfig.h is included by JuceHeader.h.
However, when the build starts, the compiler starts with compiling juce_ActiveX_GlueCode.cpp, and that one includes juce_browser_plugin.h, where the existence of JuceBrowserPlugin_Company is checked. But JuceHeader.h nor AppConfig.h have been seen at that moment.
You don't need to do anything at all to build the ActiveX version - as long as JUCE_BUILD_ACTIVEX = 1 (which is the default) then the module will do the rest. I've updated the readme now.