Compiling without OpenGL


#1

Not a big issue, but I’m trying to compile and link the up-to-date version of JUCE as a static library, without support for OpenGL.
I have defined JUCE_OPENGL to 0 or directly commented out the corresponding line inside juce_Config.h.
I’m getting several link errors referring to juce_win32_NativeCode.obj.
I’m using Visual C++ 7 (net 2003) on XP.

Thanks
Amedeo


#2

As far as I can tell, that should work just fine - what exactly are the errors you’re getting?


#3

Here they are:

jucelib_static_Win32_debug.lib(juce_win32_NativeCode.obj) : error LNK2019: riferimento al simbolo esterno "public: virtual __thiscall juce::OpenGLContext::~OpenGLContext(void)" (??1OpenGLContext@juce@@UAE@XZ) non risolto nella funzione __unwindfunclet$??0WindowedGLContext@juce@@QAE@QAVComponent@1@PAUHGLRC__@@ABUOpenGLPixelFormat@1@@Z$0


jucelib_static_Win32_debug.lib(juce_win32_NativeCode.obj) : error LNK2019: riferimento al simbolo esterno "protected: __thiscall juce::OpenGLContext::OpenGLContext(void)" (??0OpenGLContext@juce@@IAE@XZ) non risolto nella funzione "public: __thiscall juce::WindowedGLContext::WindowedGLContext(class juce::Component * const,struct HGLRC__ *,struct juce::OpenGLPixelFormat const &)" (??0WindowedGLContext@juce@@QAE@QAVComponent@1@PAUHGLRC__@@ABUOpenGLPixelFormat@1@@Z)


jucelib_static_Win32_debug.lib(juce_win32_NativeCode.obj) : error LNK2019: riferimento al simbolo esterno "public: __thiscall juce::OpenGLPixelFormat::OpenGLPixelFormat(int,int,int,int)" (??0OpenGLPixelFormat@juce@@QAE@HHHH@Z) non risolto nella funzione "public: virtual struct juce::OpenGLPixelFormat const __thiscall juce::WindowedGLContext::getPixelFormat(void)const " (?getPixelFormat@WindowedGLContext@juce@@UBE?BUOpenGLPixelFormat@2@XZ)


jucelib_static_Win32_debug.lib(juce_win32_NativeCode.obj) : error LNK2019: riferimento al simbolo esterno "public: bool __thiscall juce::OpenGLPixelFormat::operator==(struct juce::OpenGLPixelFormat const &)const " (??8OpenGLPixelFormat@juce@@QBE_NABU01@@Z) non risolto nella funzione "public: void __thiscall juce::WindowedGLContext::findAlternativeOpenGLPixelFormats(class juce::OwnedArray<struct juce::OpenGLPixelFormat,class juce::DummyCriticalSection> &)" (?findAlternativeOpenGLPixelFormats@WindowedGLContext@juce@@QAEXAAV?$OwnedArray@UOpenGLPixelFormat@juce@@VDummyCriticalSection@2@@2@@Z)

#4

Well it just looks to me like you’ve built the library with opengl turned off, but still have it turned on when you include juce.h in your app project…


#5

You are right, of course. But it wasn’t so easy for me to find out what was going on. I’ve just switched to the last version of Juce, but I wanted to keep the old version, that’s in a folder called ‘Juce’. I had the bad idea to put the new version in a folder called “Juce+” and switched the Visual C++ include paths accordingly.

I have discovered that VC was silently using the old path, but only during compilation. In fact, when I tried to open ‘juce.h’ by right-clicking the #include instruction in the editor, it refused to do so. In the end, I’ve discovered that (for VC) you cannot call a folder ‘Juce+’ or ‘Juce-’, but ‘Juce_’ is alright. Oh, well.