Cannot open file openframeworksLibDebug.lib

I am trying to get ofx running in Visual Studio 2013 so I can run Joshua Noble’s ofxKinectV2 addon. Following the instructions I have downloaded ofx with poco libs compiled found here

When I try to build the project examples at apps/devApps/projectGenerator/ it fails wth the following errors

1>------ Build started: Project: openframeworksLib, Configuration: Debug Win32 ------
1>  ofVbo.cpp
1>..\..\..\openFrameworks\gl\ofVbo.cpp(330): error C2440: '=' : cannot convert from     'ofPtr<ofGLProgrammableRenderer>' to 'bool'
1>          No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
2>------ Build started: Project: projectGenerator, Configuration: Debug Win32 ------
2>LINK : fatal error LNK1104: cannot open file 'C:\Users\Jason\Development\openFrameworks-VS2013\libs\openFrameworksCompiled\lib\vs\openframeworksLibDebug.lib'
========== Build: 0 succeeded, 2 failed, 0 up-to-date, 0 skipped ==========

you really should look at the first error first, not the last error.

“1>…\openFrameworks\gl\ofVbo.cpp(330): error C2440: ‘=’ : cannot convert from ‘ofPtr’ to ‘bool’”

you have somewhere an assignment where you are trying to assign an ofPtr to a bool, which won’t work.

but it’s likely you have not compiled the OF library for debug mode, yet.

I have downloaded a virgin copy of of_v0.8.4_vs_release and attempted a build of the example ‘multiLightExample’. The same error

error C2440: ‘=’ : cannot convert from ‘ofPtr’ to ‘bool’

occurred. so this is something in the main ofx distribution. Is it a known problem?

Actually, the error occurs while building openframeworksLib. From looking at the source, line 330 of ofVbo.cpp should be:

supportVAOs = ofIsGLProgrammableRenderer( );

At least it compiles with that change. Is there a way to submit a bug report?

1 Like

are you compiling with C++11 enabled? the library won’t compile with C++11. Version 0.9.0 will fix this, but it isn’t released yet.

Hello BananasGoMoo,

If you take a close look at the code with the error, it isn’t a C++11 problem. It is actually an incorrect statement. A function returning a pointer is being called (which is incorrect), instead a different function should be used: ofIsGLProgrammableRenderer, which does return the necessary boolean.

Looking in git, code for ofVbo has changed substantially from 8.4 to the latest version, so it may no longer be a problem. But should 8.4 be fixed, or does it matter?

same happen to me.
downloaded the 8.4 version, open the vectorMathExample, compile it in debug.
Using Windows 8.1 and Visual studio 2013 professional.

my first user experience with openFrameworks is a broken build … (not true, but happens with this version now)
i outcommented the line