Code::blocks, building demo app


I’m trying to build the demo app using code blocks but I’m getting lots of linker errors. The juce library built fine and as far as I can tell I’m linking to all the correct libs when trying to build the demo app. These are the link errors I get:

…\bin\codeblocks\libjuce.a(juce_win32_Network.o):juce_win32_Network.cpp:(.text+0x12a)||undefined reference to `InternetGetConnectedState@8’|

\libjuce.a(juce_win32_Windowing.o):juce_win32_Windowing.cpp:(.text+0x24cf)||undefined reference to `DoDragDrop@16’|

\libjuce.a(juce_win32_SystemStats.o):juce_win32_SystemStats.cpp:(.text+0x4d8)||undefined reference to `timeBeginPeriod@4’|

It looks like I’m not linking to libwsock32.a among other things but my linker options appear to be spot on. I read through an earlier post on this topic from last year and while helpful it fell short in relation to my problem here. I’m using the latest version of mingw with the latest version of code::blocks. Any help is greatly appreciated.



all the Internet* win32 calls are in wininet.lib not winsock so include that, the rest is of unknown source to me.


I’ve included that library, i.e., C:\MinGW\lib\libwininet.a along with as many other libraries I could think off! Somehow codeblocks doesn’t seem to find this library even though I have added my mingw path to the linker search directories and I’ve added the explicit paths to each library. Thanks for the reply, any other suggestions?



here is what i can add, i just downloaded the latest codeblocks (mingw budled with it) installer, installed it, compiled juce (two things were wrong, the VST wrapper had a WM_APPCOMMAND constat witch is not defined, and there was a “int i” in two for loops thing that gcc complains about, some ISO issues), after that loaded the JuceDemo codeblocks project and it worked out of the box.

only debug build, the release buil causes problems with “inline” witch gcc says is not yet implemented.


I will try that. For what it’s worth I’m using the latest mingw distro which I’m assuming is newer than the one which comes with code::blocks. Either way I will let you know if it works. The problem is that I depend on mingw for lots of other projects so I hope this doesn’t mess up my other build environments…



i don’t know how mingw is maintaned nowadays, the unstable branch is gcc4.0 and the stable is gcc3 that’s a big difference, i tried juce with the latest pre-release packages of mingw but i couldn’t get the VST to build, and that’s what i need.


That’s frustrating. What’s more annoying is the fact that the codeblocks download page seems not to be working at the minute.


this one works for me at the moment.


For some reason it just won’t start downloading, the page just says ‘done’ but nothing starts to download. I’ve never had that problem before, I hope it a temporary thing!