Trying to compile latest Git OpenFrameworks with CB

Here is my troubles bringing my xcode project to windows :

I’ve created a drawing application based on the git openframeworks library (especially for ofFbo, ofVec2f and ofThread). Everything goes well on Mac OS 10.6 with Xcode.

**Then, I have to compile my project on Windows **:

  • I tried with VC++ Express 2010, using the same openframeworks folder as Xcode : lots of errors… and I saw on the forum that _of _team advise to use _CB _with the git version. So…

  • I’m tring with CB 10.5 (Cygwin), errors such as
    “cannot convert ‘wchar_t[260]’ to ‘CHAR*’ in assignment”
    Every error is part of OpenFrameworks Library… is this a linker issue ?

I don’t know what to do at all !! I’ve finally manage to compile the empty example of the OF v0.62 (testing if my CB setup was the problem) but I don’t wan’t to go back with extensions (ofxFBO, etc…) which are less stable than in the git version.

Please, help a single designer in front of this amazing windows stuff.
Ambroise

Then, some news… The compiling step goes well with CodeBlocks (windows + Cygwin). But when it’s time to link with the openframeworks lib, I’ve got "undefined references to : ofColor, ofThread, ofRandom, etc ???

Compilling the OF library outputs no errors, why does the linker not see any of the OF classes ?

I’ve added a path to the ‘openFrameworksCompiled/lib/win_cb’ in my project build settings (linker settings). But it seems that the two projects aren’t linked…

probably unrelated to your problems, but you _do_ realize that there’s a windows version of codeblocks available, using mingw, no need to mess around with cygwin?#

have you followed the steps in http://www.openframeworks.cc/setup ?

Some news

I’ve managed to pass the building process without any error or warning.
The problem is that linking my app with the openFrameworkLib give some strange errors such as :

…/…/…/libs/openFrameworksCompiled/lib/win_cb/openFrameworksDebug.lib(ofAppRunner.o):ofAppRunner.cpp:(.text+0x9d4): undefined reference to `pwglSwapIntervalEXT’

…/…/…/libs/openFrameworksCompiled/lib/win_cb/openFrameworksDebug.lib(ofGraphics.o):ofGraphics.cpp:(.text+0x2147): undefined reference to `pglBlendEquation’

obj\debug\src\environnement.o:E:/Documents/Programmation/openframeworks-openFrameworks-f1c7e38/apps/examples/MIC_Editor/src/environnement.cpp:233: undefined reference to `ofxKeyboard::draw()’

…/…/…/libs/openFrameworksCompiled/lib/win_cb/openFrameworksDebug.lib(ofTexture.o):ofTexture.cpp:(.text$_ZN4Poco16ReferenceCounterD1Ev[Poco::ReferenceCounter::~ReferenceCounter()]+0xd): undefined reference to `Poco::AtomicCounter::~AtomicCounter()’

(I switch back to the GNU C++ Compiler with mingw but I had to install the Gstreamer SDK to get <gst/gst.h> and stuff)

I don’t understand why every pieces of link error are related to GL functions with p or pw prefixes.

Then in the ofFbo source, I added GL_DEPTH_STENCIL, GL_DEPTH_STENCIL_ATTACHMENT constants which weren’t defined for TARGET_WIN32. Is it the issue ?
In fact I had to #ifdef some parts which crashed at compilation on Windows.

It seems to close to Running !!

Linking console executable: bin\emptyExample_DEBUG.exe
Warning: .drectve -defaultlib:LIBCMT ' unrecognized Warning: .drectve-defaultlib:OLDNAMES ’ unrecognized
Warning: .drectve -defaultlib:LIBCMT ' unrecognized Warning: .drectve-defaultlib:OLDNAMES ’ unrecognized
Warning: .drectve -defaultlib:LIBCMT ' unrecognized Warning: .drectve-defaultlib:OLDNAMES ’ unrecognized
Warning: .drectve -defaultlib:LIBCMT ' unrecognized Warning: .drectve-defaultlib:OLDNAMES ’ unrecognized
Warning: .drectve -defaultlib:LIBCMT ' unrecognized Warning: .drectve-defaultlib:OLDNAMES ’ unrecognized
Warning: .drectve -defaultlib:uuid.lib ' unrecognized Warning: .drectve-defaultlib:uuid.lib ’ unrecognized
Warning: .drectve -defaultlib:LIBCMT ' unrecognized Warning: .drectve-defaultlib:OLDNAMES ’ unrecognized
Warning: .drectve -defaultlib:LIBCMT ' unrecognized Warning: .drectve-defaultlib:OLDNAMES ’ unrecognized
Warning: .drectve `/DEFAULTLIB:“LIBC” /DEFAULTLIB:“OLDNAMES” ’ unrecognized

I’ve got these messages before the linker errors.

Here are some screenshot to help understanding my workspace

![](http://forum.openframeworks.cc/uploads/default/1018/Capture d’écran 2011-03-15 à 10.34.39.png)

![](http://forum.openframeworks.cc/uploads/default/1019/Capture d’écran 2011-03-15 à 10.35.57.png)

![](http://forum.openframeworks.cc/uploads/default/1021/Capture d’écran 2011-03-15 à 10.35.27.png)

I hate to repeat myself, but have you done this? especially step e) as outlined in http://www.openframeworks.cc/setup/codeblocks

I hate to repeat myself, but have you done this? especially step e) as outlined in http://www.openframeworks.cc/setup/codeblocks[/quote]

Yes, I’ve done that.

I’ve changed the include for ones in the Mingw folder.
Nothing changes

![](http://forum.openframeworks.cc/uploads/default/1022/Capture d’écran 2011-03-15 à 11.09.14.png)

I’ve managed to get rid of GL error by replacing OF GLee.h and GLee.lib by a newest one (v5.4 instead of 5.21).
I’ll try to do the same with Poco lib

hi

the windows version of git master is pretty broken right now, the problems you’re getting seem to be related with:

  • GLee is not used anymore, instead we are using glew
  • you shouldn’t have any gst related errors, i guess you’re including the gstreamer files in your project, that are linux only, just remove them.
  • we have new versions of Freeimage, freetype and poco

if you’re not used to configure compiler settings and compile libraries in windows i would recommend till the official release, but if you manage to compile it, it will be of great help to have the compiled libraries.

btw, is there any kind of timeframe available for when there’s gonna be the release? days/weeks/months?

Thanks guys !

I’ve manage to compile, link, and lauch my app on Windows !! But unfortunately my FrameBuffer Object does not seem to work. Is there any OpenGL drivers to setup on Windows ? I checked the FBO status and it returns true, however my drawing canvas is still black. (I use FBO as a canvas for my drawing app)

For information, I’m using this commit : https://github.com/openframeworks/openFrameworks/commit/f1c7e387640cad57976eb7726d7afb8d072a1115

Everything else works fine, it’s party today !

hey that’s great, zach has been working in fixing windows today, the last commit should have all the necessary libraries and is compiling. the examples are not tested yet though.

btw, do you remember how did you fixed this error:

  
  
../../../libs/openFrameworksCompiled/lib/win_cb/openFrameworksDebug.lib(ofTexture.o):ofTexture.cpp:(.text$_ZN4Poco16ReferenceCounterD1Ev[Poco::ReferenceCounter::~ReferenceCounter()]+0xd): undefined reference to `Poco::AtomicCounter::~AtomicCounter()'  

?

I took the poco folder found here (https://github.com/lian/ofx-dev/tree/master/libs/poco) then I got the missing libraries (…mt.a) from the pre-release version of openframeworks.

I remember that I had to explicitly set the poco lib folder in my build linker setting.
I have these lib :

![](http://forum.openframeworks.cc/uploads/default/1028/Capture d’écran 2011-03-17 à 00.08.57.png)

at least in my case,i have to include <ext/algorithm> within the ofutils.cpp,otherwise won’t compile.

I’ve tried the last commited version of Openframeworks.
BIM, compile error in ofUtils.cpp (line 253) : replace() is not a member of std.

I think you should put “path.replace(…)” instead of std::replace(…)

I’ve still got some compile and link errors :

  • ofSoundUnit and ofSoundEffect have been deleted but still in the win-cb project
  • GLee.lib is still linked in the build options (have to get rid of it)
  • Got weird errors linking glew32s.lib
  
  
Warning: .drectve `-defaultlib:LIBCMT ' unrecognized  
Warning: .drectve `-defaultlib:OLDNAMES ' unrecognized  
Warning: .drectve `-defaultlib:LIBCMT ' unrecognized  
Warning: .drectve `-defaultlib:OLDNAMES ' unrecognized  
Warning: .drectve `-defaultlib:LIBCMT ' unrecognized  
Warning: .drectve `-defaultlib:OLDNAMES ' unrecognized  
Warning: .drectve `-defaultlib:LIBCMT ' unrecognized  
Warning: .drectve `-defaultlib:OLDNAMES ' unrecognized  
Warning: .drectve `-defaultlib:LIBCMT ' unrecognized  
Warning: .drectve `-defaultlib:OLDNAMES ' unrecognized  
Warning: .drectve `-defaultlib:uuid.lib ' unrecognized  
Warning: .drectve `-defaultlib:uuid.lib ' unrecognized  
Warning: .drectve `-defaultlib:LIBCMT ' unrecognized  
Warning: .drectve `-defaultlib:OLDNAMES ' unrecognized  
Warning: .drectve `-defaultlib:LIBCMT ' unrecognized  
Warning: .drectve `-defaultlib:OLDNAMES ' unrecognized  
Warning: .drectve `/DEFAULTLIB:"LIBCMT" /DEFAULTLIB:"OLDNAMES" ' unrecognized  
..\..\..\libs\glew\lib\win_cb\glew32s.lib(./static/release/glew.obj):(.text[__glewInit_GL_VERSION_1_2]+0x4): undefined reference to `_imp__wglGetProcAddress@4'  
..\..\..\libs\glew\lib\win_cb\glew32s.lib(./static/release/glew.obj):(.text[__glewInit_GL_VERSION_1_3]+0x4): undefined reference to `_imp__wglGetProcAddress@4'  
..\..\..\libs\glew\lib\win_cb\glew32s.lib(./static/release/glew.obj):(.text[__glewInit_GL_VERSION_1_4]+0x4): undefined reference to `_imp__wglGetProcAddress@4'  
..\..\..\libs\glew\lib\win_cb\glew32s.lib(./static/release/glew.obj):(.text[__glewInit_GL_VERSION_1_5]+0x4): undefined reference to `_imp__wglGetProcAddress@4'  
..\..\..\libs\glew\lib\win_cb\glew32s.lib(./static/release/glew.obj):(.text[__glewInit_GL_VERSION_2_0]+0x4): undefined reference to `_imp__wglGetProcAddress@4'  
..\..\..\libs\glew\lib\win_cb\glew32s.lib(./static/release/glew.obj):(.text[__glewInit_GL_VERSION_2_1]+0x4): more undefined references to `_imp__wglGetProcAddress@4' follow  
..\..\..\libs\glew\lib\win_cb\glew32s.lib(./static/release/glew.obj):(.text[_glewGetExtension]+0x14): undefined reference to `_imp__glGetString@4'  
..\..\..\libs\glew\lib\win_cb\glew32s.lib(./static/release/glew.obj):(.text[_glewContextInit]+0x8): undefined reference to `_imp__glGetString@4'  
..\..\..\libs\glew\lib\win_cb\glew32s.lib(./static/release/glew.obj):(.text[__glewInit_WGL_3DL_stereo_control]+0x7): undefined reference to `_imp__wglGetProcAddress@4'  
..\..\..\libs\glew\lib\win_cb\glew32s.lib(./static/release/glew.obj):(.text[__glewInit_WGL_AMD_gpu_association]+0x4): undefined reference to `_imp__wglGetProcAddress@4'  
..\..\..\libs\glew\lib\win_cb\glew32s.lib(./static/release/glew.obj):(.text[__glewInit_WGL_ARB_buffer_region]+0x4): undefined reference to `_imp__wglGetProcAddress@4'  
..\..\..\libs\glew\lib\win_cb\glew32s.lib(./static/release/glew.obj):(.text[__glewInit_WGL_ARB_create_context]+0x7): undefined reference to `_imp__wglGetProcAddress@4'  
..\..\..\libs\glew\lib\win_cb\glew32s.lib(./static/release/glew.obj):(.text[__glewInit_WGL_ARB_extensions_string]+0x7): undefined reference to `_imp__wglGetProcAddress@4'  
..\..\..\libs\glew\lib\win_cb\glew32s.lib(./static/release/glew.obj):(.text[__glewInit_WGL_ARB_make_current_read]+0x4): more undefined references to `_imp__wglGetProcAddress@4' follow  
collect2: ld returned 1 exit status  
  

The glew errors was due to the fact that I didn’t have any openGL32.lib in my libraries (just a libopengl32.a). I’ve linked my project to this library. Every error I get is due to bad build options… Have to tidy up all these examples projects guys !

In header path search, we need /openframeworks/math, 3d, types and gl too !

The simple examples work for me now. I’ll try to compile and link my MIJEditor now.