How to install openFrameworks properly?

I can’t get oF to work. First I’ve tried the msys2 install for windows and followed the instructions on the website. I was able to compile the examples, but I couldn’t develop because the msys2 version doesn’t have the project builder. This forces me to use the Qt creator which is a huge install and not something I need or want.

Next I’ve tried using Visual Studio 2017, and after following instructions from their website I couldn’t compile any projects. I would get this error:

Cannot open include file: 'winnt.h': No such file or directory (C:\Program Files (x86)\Windows Kits\8.1\Include\um\winnt.h)

Although when I copy and paste the path into windows explorer it shows that the file is clearly there. At this point I checked all possible permissions and reinstalled all Visual Studio components. The error persisted.

After some digging I’ve found that apparently VS 2017 is not supported so I go ahead and download VS 2015. Do the same install process again only to get the error:

The build tools for v141 (Platform Toolset = 'v141') cannot be found. To build using the v141 build tools, please install v141 build tools.

So far I found nothing about this error related to oF. Actually some people say that this means I should update to VS 2017 which is a complete contradiction to my previous error.
If anyone can help it would be very much appreciated.


Looking at the v141 error it looks like you’re trying to run oF 0.9.8? When you open a project in VS2015, VS probably asks whether you want to upgrade the project - you should be saying no at this point. If I remember correctly, that should work.

Otherwise, give 0.10.0 RC3 a go (It’s pinned in the forum) - it should work fine with VS2017.

I saw the prompt to update the project and I had declined it, but now I actually tried upgrading and it got rid of the error and summoned another one:

LINK : fatal error LNK1104: cannot open file 'C:\openFrameworks\libs\openFrameworksCompiled\lib\vs\Win32\openframeworksLib_debug.lib'

The vs\Win32\ folder is empty (oF not compiled?). That causes the error. Anyways now I tried compiling the VS version project file in libs\openFrameworksCompiled\project\vs but I get the same error as before:

1>c:\program files (x86)\windows kits\8.1\include\um\winnt.h(31): fatal error C1083: Cannot open include file: 'ctype.h': No such file or directory

(Note that the file ctype.h is located at the path above and has correct permissions).

What gives? :confused:

EDIT: I think this is getting absurd. I just can’t install openframeworks on Windows. I’ve tried qt creator, and while it does compile with MSYS2 and make, I can’t develop my own apps in qt because I can’t add source files to my project. At this point I have spent a total of 12 hours trying to get openframeworks to work in any IDE or enviroment at all and failed to do so. Either I’m a total idiot or there’s something wrong with oF.

Hello Jan, I have installed recently OF 0.9.8 and visual studio 2015 and it worked. I have never tried msys2 so I can’t tell about it.
As soon as the next release (0.10) is ready, there will be instruction on the website about how to install OF 0.10 with visual studio 2017 or qtCreator. If you can not wait some days, I would suggest you to use 0.9.8 and visual studio 2015.

Hello Jan,

You don’t need QtCreator to use OpenFrameworks with MSYS2… I’m using it everyday with a plain terminal.
You can use whatever code editor you want (Notepad ++, QtCreator, VS Code,…).
If you manage to compile and run the examples, then your Of setup is fine.
The location of your project compared to of installation dir is really important.
The default makefiles tries to set OF_ROOT to …/…/…
So your project should be at <OF_DIR>/apps/myApps/myproject.

1 Like

1>c:\program files (x86)\windows kits\8.1\include\um\winnt.h(31): fatal error C1083: Cannot open include file: 'ctype.h': No such file or directory

that looks like you’re missing dependencies. ctype.h is a C++ header for handling C-style strings. not otherwise related to oF.

LINK : fatal error LNK1104: cannot open file 'C:\openFrameworks\libs\openFrameworksCompiled\lib\vs\Win32\openframeworksLib_debug.lib'

of course you’re going to get that error, @ayruos just told you not to upgrade it, haha :stuck_out_tongue:

as for what you can do, it looks like you just have to figure out how to get the correct libraries. Maybe the ./ script will help. I didn’t have any problems with dependencies on windows so I haven’t performed these steps myself. As a last resort you might be able to use visual studio installer to get them. Or you might be missing a crucial component like MinGW.