Juce for mingw codeblocks

im using mingw 6.3.0 with codeblocks.

but when i run the juce starter code i get this error.


i manually open the project file in codeblocks because “open IDE” in projucer is disabled

Please try using the develop branch from GitHub - I think we’ve already fixed this problem there, and it’ll be included in the imminent JUCE 5 release too.

okay thanks. i didnt know i was using the one from master branch since i download it in Juce site.

accidentally deleted my reply.

i get this error when i use the develop branch from github. my compiler is 32 bit. does it mean it only support 64 bit?

EDIT: fixed it by changing the architecture into 32 bit

but now i get this error.

https://puu.sh/vxMAw/7888141cfb.png it seems the error from OP’s screenshot is fixed, but when i changed to develop branch, i get this another new error.

When you’re using MinGW I think you need to set the precompiler variable WINVER to whatever is appropriate for your application: https://msdn.microsoft.com/en-us/library/6sehtctf.aspx

Does setting WINVER=0x0A00 in “Preprocessor definitions” in the Code::Blocks build pane of the Projucer (and resaving your project) fix things?

1 Like

when doing that, i get stuck with “it seems that this project has not been built yet. do you want to build it now?” so i cant runt it.

here is the build log: https://hastebin.com/uwapeyetet.tex

Why can’t your run it? There are no errors in the build log…

What happens if you navigate to the build directory and double click on the executable?

yea it works. i think i should just build it instead of running. thanks for that.

Yeah. Confirmed. Putting WINVER=0x0A00 to project’s definitions manually solves the problem even for MinGW GCC 7.1.

Could anyone from the developer team modify Projucer so that it sets the definition when exporting to Code::Blocks?


It’s not quite as easy as that… at the very least it should be a configurable option; what if you want to target a different version of Windows? Look at the link I posted previously. We’ll look at adding something along those lines.

Agreed. But can we perhaps start with an extra combobox that has Windows version options in it? I’m saying that because even Visual Studio has that combobox in its settings. Thus, we must define WINVER for any Windows compilers since they count on it. So, even simpler, you can add this definition to all exporters for Windows.

Fact: JUCE cannot be compiled for a Windows version less than 7 (0x0601). So, there is no need to include options less than Windows 7. The developers of JUCE should have been aware of that, since they use WIndows functions that are only available starting from Win 7, right? Thus, having WINVER=0x0601 as the default parameter would solve the problem. If you don’t set a WINVER for VC++, it assumes a default value for it (that is Win 7 I guess). But this is merely a side effect. You cannot count on it for every compiler. WINVER is a must for Windows.

Just dropping a note in this thread that a dropdown has been added to the Projucer to allow the selection of a specific WINVER.


Nope, that’s not a fact. It’s possible to compile both apps and plug-ins that will work on Windows XP, if you choose the build settings carefully. However, the new drop down will make it easier to select sensible target platforms.