You seem to want to make life very hard for yourself! I’ve no idea if it’s possible, but it’s definitely not as easy as starting up visual studio and hitting F5…
I want to use Juce with Eclipse. I can build Juce on Visual studio and then use the library with Eclipse, but I want my applications to be compiled with 100% GCC.
premake is not able to create Eclipse make files, but Eclipse can use MinGW’s make files. At the worst case, I can build Juce using MinGW-make from the command prompt window after then being able to make premake create make files for MinGW.
I looked at the source codes of Juce, and replaced “LINUX=1” with “_WIN32=1”, “intermediate_linux” with “intermediate_windows”, “/usr/include” with “C:\MinGW\include”, “/usr/include/freetype2” with “C:\Program Files\GnuWin32\include\freetype2” in juce_premake.lua
(I installed freetype library into C:\Program Files\GnuWin32)
After than copying juce.lua into juce\build\win32 folder, I used
premake --file juce_premake.lua --cc gcc --os windows --target gnu
command on the command prompt window (path system variable was set to have premake and mingw32-make inside path variable).
After then runnung mingw32-make on the folder juce\build\win32, MinGW compiled all the files except for juce_win32_WebBrowserComponent.cpp
The MinGW output related to juce_win32_WebBrowserComponent.cpp is below,
juce_win32_WebBrowserComponent.cpp
platform_specific_code/juce_win32_WebBrowserComponent.cpp:39:21: warning: comuti
l.h: No such file or directory
platform_specific_code/juce_win32_WebBrowserComponent.cpp:159: warning: class j uce::WebBrowserComponentInternal::EventHandler' has virtual functions but non-vi rtual destructor platform_specific_code/juce_win32_WebBrowserComponent.cpp: In member functionv
oid juce::WebBrowserComponentInternal::goToURL(const juce::String&, const juce::
StringArray*, const juce::MemoryBlock*)’:
platform_specific_code/juce_win32_WebBrowserComponent.cpp:108: error: _variant_ t' was not declared in this scope platform_specific_code/juce_win32_WebBrowserComponent.cpp:108: error: expected
;’ before "flags"
platform_specific_code/juce_win32_WebBrowserComponent.cpp:111: error: headersVa r' was not declared in this scope platform_specific_code/juce_win32_WebBrowserComponent.cpp:111: warning: unused v ariable 'headersVar' platform_specific_code/juce_win32_WebBrowserComponent.cpp:133: error:postDataV
ar’ was not declared in this scope
platform_specific_code/juce_win32_WebBrowserComponent.cpp:133: warning: unused v
ariable ‘postDataVar’
platform_specific_code/…/…/…/src/juce_appframework/gui/components/special/…/
juce_Component.h:2049: error: juce::Component::ComponentFlags juce::Component:: <anonymous union>::flags' is private platform_specific_code/juce_win32_WebBrowserComponent.cpp:139: error: within thi s context platform_specific_code/juce_win32_WebBrowserComponent.cpp:139: error:frame’ wa
s not declared in this scope
platform_specific_code/juce_win32_WebBrowserComponent.cpp:140: error: postDataV ar' was not declared in this scope platform_specific_code/juce_win32_WebBrowserComponent.cpp:140: error:headersVa
r’ was not declared in this scope
platform_specific_code/juce_win32_WebBrowserComponent.cpp:108: warning: unused v
ariable '_variant_t’
platform_specific_code/juce_win32_WebBrowserComponent.cpp:139: warning: unused v
ariable 'frame’
platform_specific_code/juce_win32_WebBrowserComponent.cpp:140: warning: unused v
ariable 'postDataVar’
platform_specific_code/juce_win32_WebBrowserComponent.cpp:140: warning: unused v
ariable 'headersVar’
make[1]: *** […/…/bin/intermediate_windows/Debug/juce_win32_WebBrowserComponen
t.o] Error 1
make: *** [JUCE] Error 2
How can I solve this problem?
I looked at juce_win32_WebBrowserComponent.cpp, and I saw that there are some lines related to ActiveX. Is this component based on Internet Explorer? If it is so, is it possible to make this component Mozilla Gecko based?
Ehhrmm… if Jules would provide CMake files for all the stuff, you could use Eclipse/All flavours of VC/NMake/Xcode/makefiles etc. See http://www.cmake.org . It is really one awesome tool (we actually use it for all our stuff, incl. juce)
If you are familiar with CMake, can’t you prepare cmake file for Juce? Since Juce is open source, you can include cmake script into Juce repository. You can take all the include instructions from premake, and then prepare cmake build file regarding the parameters which make Juce multiplatform. It will be very useful.
GCC doesn’t compile juce_win32_WebBrowserComponent.cpp. This component is not multi platform. Is there a way to disable this component?
_WIN32=1 and _WIN64=1 definitions are checked in the Juce codes, so either _WIN32=1 or _WIN64=1 should be set for Windows builds (I think this is Juce specific definition).
Haven’t tried on Mac and Linux yet, but yes it works on Windows (and its prepped for Mac/Linux). I’ll have to make a cmake file for the juce demo so its clear how it works (so everyone can make their own)