To my intense annoyance I’ve wasted several days failing to get the projucer to link with llvm/clang on Windows, due to all sorts of VC++ nastiness. As a result I’ve decided to spend a few hours trying plan B, which is to switch to a MINGW build instead of VC…
So, to make that happen, I’ve quickly thrown together an Code::Blocks export target for the Introjucer. I’ve never been a fan of Code::Blocks, but I know that some people have talked about using it, so I’d really appreciate anyone who’s experienced with it trying this out. I’ve managed to build the juce demo with it, and it all seems to work… Feedback appreciated!
I’m doing all my Linux work in CodeBlocks, and it’s pretty useful. Remote debugging is fine, and some code completion, and a reasonable debugger once you get used to how stripped down it is.
Not a good time for a juce update, but I’ll try in a few weeks.
I’ve only targeted a Windows build, but it’d be interesting to make it cross-platform… How does a Code::Blocks project work in terms of different platforms needing different libraries and settings?
Two things that i had to “fix” to get CodeBlocks to work (i need it know since i have a PC with Win7 and no admin right at work).
it’s the chicken and the egg thing, there is no Codeblocks project in the GIT so i can’t build Introjucer to get other projects built with CB
I had to add winmm to the library list to get the timeGetTime symbol to resolve
so far i got the Introjucer to build (using a Introjucer.exe i copied from a different PC) and I got a test standalone project created in Introjucer to build.
I’m using latest MINGW with gcc 4.7.2 and the latest nightly build of Codeblocks i found on the forums on their website.
Edit.
I get an error when building my own application, i saw this when i was using codelite
..\..\..\Standalone\JuceLibraryCode\modules\juce_audio_processors\..\..\..\..\..\Juce\modules\juce_audio_processors\..\juce_gui_basics\..\juce_graphics\colour\..\images\..\contexts\juce_GraphicsContext.h|30|fatal error: ../geometry/juce_Rectangle.h: No such file or directory|
It’s like GCC is not using relative paths correctly, this is how the file is compiled
mingw32-g++.exe -Wall -O0 -std=gnu++0x -march=pentium4 -D__MINGW__=1 -D__MINGW_EXTENSION= -DCTRLR_NIGHTLY=1 -DJucePlugin_Build_Standalone= -DJUCER_CODEBLOCKS_34295A7F=1 -march=prescott -I. -I..\..\..\Standalone\JuceLibraryCode -I..\..\..\..\Boost -I..\..\..\..\Source\Lua\luabind -I..\..\..\..\Source\Misc -I..\..\..\..\Source\MIDI -I..\..\..\..\Source -I..\..\..\..\Source\UIComponents -I..\..\..\..\Source\Core -I..\..\..\..\Source\Plugin -I..\..\..\..\Source\Application -I..\..\..\..\Source\Lua -I..\..\..\..\Source\Lua\lua -Ic:\mingw\lib\gcc\mingw32\4.7.2\include\c++ -Ic:\mingw\lib\gcc\mingw32\4.7.2\include\c++\mingw32 -Ic:\mingw\lib\gcc\mingw32\4.7.2\include -c C:\devel\ctrlr\Source\Core\CtrlrIDManager.cpp -o obj\Debug\Source\Core\CtrlrIDManager.o
In file included from ..\..\..\Standalone\JuceLibraryCode/modules/juce_audio_processors/../../../../../Juce/modules/juce_audio_processors/../juce_gui_basics/../juce_graphics/colour/../images/juce_Image.h:30:0,
from ..\..\..\Standalone\JuceLibraryCode/modules/juce_audio_processors/../../../../../Juce/modules/juce_audio_processors/../juce_gui_basics/../juce_graphics/colour/juce_FillType.h:30,
from ..\..\..\Standalone\JuceLibraryCode/modules/juce_audio_processors/../../../../../Juce/modules/juce_audio_processors/../juce_gui_basics/../juce_graphics/juce_graphics.h:80,
from ..\..\..\Standalone\JuceLibraryCode/modules/juce_audio_processors/../../../../../Juce/modules/juce_audio_processors/../juce_gui_basics/juce_gui_basics.h:29,
from ..\..\..\Standalone\JuceLibraryCode/modules/juce_audio_processors/../../../../../Juce/modules/juce_audio_processors/juce_audio_processors.h:29,
from ..\..\..\Standalone\JuceLibraryCode/modules/juce_audio_processors/juce_audio_processors.h:4,
from ..\..\..\Standalone\JuceLibraryCode/JuceHeader.h:20,
from C:\devel\ctrlr\Source\Core\stdafx.h:74,
from C:\devel\ctrlr\Source\Core\CtrlrIDManager.cpp:1:
..\..\..\Standalone\JuceLibraryCode/modules/juce_audio_processors/../../../../../Juce/modules/juce_audio_processors/../juce_gui_basics/../juce_graphics/colour/../images/../contexts/juce_GraphicsContext.h:30:40: fatal error: ../geometry/juce_Rectangle.h: No such file or directory
compilation terminated.
Process terminated with status 1 (0 minutes, 3 seconds)
1 errors, 0 warnings (0 minutes, 3 seconds)
MinGW is a good compiler and C::B is a nice IDE, but lot of people use Eclipse-CDT + MinGW as develop enviroment.
Would be nice to see an Introjucer exporter for Eclipse.
Regards
It would be great if we could have a MinGW Makefile export target as well, so you could build from command line in MinGW environment. That would also make it easier to integrated with Eclipse as well (makefile project type in Eclipse).
I was trying to compile the introjucer in CodeBlocks with the included project file and I having the the following build error:
||=== The Introjucer, Debug ===|
C:\APPLICATIONS\juce\modules\juce_core\native\juce_win32_Network.cpp||In function 'void juce::MACAddressHelpers::getViaNetBios(juce::Array<juce::MACAddress, juce::DummyCriticalSection, 0>&)':|
C:\APPLICATIONS\juce\modules\juce_core\native\juce_win32_Network.cpp|379|error: no matching function for call to 'zerostruct(juce::MACAddressHelpers::getViaNetBios(juce::Array<juce::MACAddress, juce::DummyCriticalSection, 0>&)::ASTAT&)'|
||=== Build finished: 1 errors, 0 warnings ===|
the error: no matching function for call to zerostruct(juce::MACAddressHelpers::getViaNetBios(juce::Array<juce::MACAddress, juce::DummyCriticalSection, 0>&)::ASTAT&)
in the file: juce\modules\juce_core\native\juce_win32_Network.cpp
Any help and pointer will be well appreciated. Many thanks!
I was trying to compile the introjucer in CodeBlocks with the included project file and I having the the following build error:
||=== The Introjucer, Debug ===|
C:\APPLICATIONS\juce\modules\juce_core\native\juce_win32_Network.cpp||In function 'void juce::MACAddressHelpers::getViaNetBios(juce::Array<juce::MACAddress, juce::DummyCriticalSection, 0>&)':|
C:\APPLICATIONS\juce\modules\juce_core\native\juce_win32_Network.cpp|379|error: no matching function for call to 'zerostruct(juce::MACAddressHelpers::getViaNetBios(juce::Array<juce::MACAddress, juce::DummyCriticalSection, 0>&)::ASTAT&)'|
||=== Build finished: 1 errors, 0 warnings ===|
the error: no matching function for call to zerostruct(juce::MACAddressHelpers::getViaNetBios(juce::Array<juce::MACAddress, juce::DummyCriticalSection, 0>&)::ASTAT&)
in the file: juce\modules\juce_core\native\juce_win32_Network.cpp
Any help and pointer will be well appreciated. Many thanks!
God blesses!!!
Best regards,
Sanyaade[/quote]
What version of GCC? You’d need a recent one, the old versions of mingw were very buggy.
Well, just to make sure, I compiled the juce demo again with mingw 4.7.2, and yes, it compiles just fine. The code itself is 100% legit.
I really do think you must be accidentally using an old compiler version, there’s no other reason why it’d do that. You should add “–version” to your build flags to double-check,