JUCE lib build fails + best practice / stable versions?

Hi,

I just pulled in the latest changes from the main JUCE repository, and I can’t build the JUCE library today:
I get many errors like this:
juce\src\core\juce_atomic.h(63) : error C4716: ‘juce::Atomic::operator=’ : must return a value

Related question: what is actually the best practice for working with JUCE? Is it generally safe to always work with the latest version from git? Or are there stable releases?

Koen

Sorry, I only wrote that class yesterday, and I’ve obviously made a silly typo in it! I’ve checked in a fix now. (Slightly surprised that none of my compilers moaned about it though - what kind of build are you doing?)

The tip is generally pretty stable, with occasional blips when I add something new like this.

No problem, just need to figure out the best way of working. I just saw there was a recent stable .zip, and I’ll use this for now.

I was doing the lib build Debug Win32 with VS2008 (latest), on Windows7 64-bit.

Just updated, and that error is now fixed. Thanks!

However, it still doesn’t build: I get these warnings and errors:

Warning 1 warning C4505: ‘juce::juce_InterlockedExchange64’ : unreferenced local function has been removed h:\koen\code\c++\various\juce\src\core\juce_atomic.h 195

Warning 32 warning C4100: ‘cause’ : unreferenced formal parameter h:\koen\code\c++\various\juce\src\gui\components\code_editor\juce_codeeditorcomponent.cpp 1103

Error 127 error C3861: ‘MemoryBarrier’: identifier not found h:\koen\code\c++\various\juce\src\core\juce_atomic.h 319

That’s odd - in a 64-bit build, that juce_InterlockedExchange64 function won’t be created. Are you sure your build is 64-bit??

Also kind of odd that MemoryBarrier() isn’t defined - it should be, according to the MS docs, and worked for me in VS2008. Does it compile if you use this instead?

#define juce_MemoryBarrier _ReadWriteBarrier

No, you read it the wrong way: my build is Debug Win32, and I’m also building with VS2008 (SP). It is my Windows7 operating system that is 64-bit…

When I use the _ReadWriteBarrier as you suggested, I don’t get any errros any longer, and the lib builds.

Still get both warnings mentioned above though,
plus these 4:

Warning 127 warning C4189: ‘cursorH’ : local variable is initialized but not referenced h:\koen\code\c++\various\juce_git\src\native\windows\juce_win32_windowing.cpp 2468

Warning 128 warning C4189: ‘os’ : local variable is initialized but not referenced h:\koen\code\c++\various\juce_git\src\native\windows\juce_win32_windowing.cpp 2469

Warning 151 warning LNK4221: no public symbols found; archive member will be inaccessible juce_Line.obj

Warning 152 warning LNK4221: no public symbols found; archive member will be inaccessible juce_AudioCDReader.obj

Ah, I see, thanks!

The warnings are trivial, but I’ll tidy them up too…