REOPENED Errors when trying to run ofApp.cpp

These are my errors when trying to run the ofApp.cpp. I’ve just been following the ebook on the learning pages of the openframeworks website. I haven’t managed to get far due to these errors that I don’t understand

I would be eternally grateful for any help I can get
Thank you!

Error (active) E0757 overloaded function “std::chrono::duration<_Rep, _Period>::duration [with _Rep=long long, _Period=std::nano]” is not a type name


Error LNK1104 cannot open file ‘libboost_filesystem-vc140-mt-gd-1_64.lib’ openFrameworksApp12

(I have managed to find a libboost…141-mt-gd-1_64’ but not sure how to change the directory)

What IDE & platform are you developing on/with?

The latest version of visual studio and windows 10

I’ve only made a couple of projects in VS, but if I remember correctly you need to use an older version of VS, I followed these instructions and it worked for me, nb that I think it has to be the old VS

1 Like

How rookie off me! Thank you my friend onwards and upwards :slight_smile:

I would like to reopen this thread.

I tried using VS2015. Now I don’t have the V141 build tools to run my ofApp.cpp file. I have the build tools on 2017 installed.

VS2015 v141 build tools problem with OF.

The solution online is to upgrade to 2017. So this gets me nowhere.

Someone, please help!!! :confused:

hmmmm that might be that they are conflicting, I would try (certainly doesn’t mean it will necessarily work!!) is to uninstall both VS and go through the whole process from the beginning again, including downloading oF (put your source code to one side if you need)

the build tools 141 means VS 2017, so it will not work with VS2015 and you dont need it, it is all ready for VS 2017. I have been using VS2017 for quite some time and everything works just fine.

Uninstall all versions of Visual studio and start again, the instructions are good. You don’t need to run ofApp.cpp at all, you need to use a visual studio project as it contains all the libraries linked correctly. There are plenty of examples in the Visual studio download and they will all work if you follow the directions. You can skip the plugin part in the download directions. But the heading is in a strange place on the page, make sure you do do this part

" Before you’re able to use openFrameworks with Visual Studio, you have to have Common Tools for Visual C++ 2017 installed, otherwise you’ll get an error message later on. To install, go to File > New > Project and choose Visual C++ in the installed templates section. There now should be an option to install the tools, if they aren’t already. Select it, confirm with ‘OK’ and follow the instructions."

Just install VS2017 as directed by the OF installation instructions, download the VS version of openframeworks, unzip it somewhere convenient and don’t move the subfolders around in there, they need to stay the same. Then go to one of the included examples and open one of the visual studio solution (sln) files to see how things work.

If you need you can use the project generator to make new projects.

Have fun.

Hi All,
Sorry to reopen this. I too am getting the exact same error and I have followed the advice from @fresla however I seem to be running into the same issue. I’m using visual studio 2017 community version 15.9.14.
Whenever I compile my code, I get this error:

Error (active)	E0757	overloaded function "std::chrono::duration<_Rep, _Period>::duration [with _Rep=long long, _Period=std::nano]" is not a type name	pixelMergeTest	C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\include\chrono	195	

Here is the code below that I think might be throwing the error.

#include "pixelMerge.h"
#include <iostream>




	delete[] colour2D;


void pixelMerge::setup(ofImage& _img) {
	img = _img;

	width = img.getWidth();
	height = img.getHeight();
	int totalElements = (width + 1) * height + 1;
	colour2D = new ofColor[totalElements*4];
	cout << totalElements << endl;

	for (int y = 1; y < height - 1; y += 2) {
		for (int x = 1; x < width - 1; x += 2) {
			if ((x > 0 && x < width - 1) && (y > 0 && y < height - 1)) {
				//cout << "--------" << endl;
				//cout << x << endl;
				//cout << y << endl;
				float hue[4];
				float totalhue = 0;
				float sat[4];
				float totalsat = 0;
				float bright[4];
				float totalbright = 0;
				int count = 0;
				for (int y1 = -1; y1 < 1; y1++) {
					for (int x1 = -1; x1 < 1; x1++) {
						img.getColor(x+x1, y+y1).getHsb(hue[count], sat[count], bright[count]);
						totalhue += hue[count];
						totalsat += sat[count];
						totalbright += bright[count];
				totalhue = totalhue / 4;
				totalsat = totalsat / 4;
				totalbright = totalbright / 4;
				ofColor c = ofColor(0);
				c.setHsb(totalhue, totalsat, totalbright);



void pixelMerge::update() {

void pixelMerge::draw() {
	img.draw(0, 0);

Any help would be greatly appreciated!

1 Like

Huh! I have been using VS2017 with OF for quite a while now, and only now (that I remember?) am I seeing this error too. Even on an empty new OF project created with the VS New Project wizard.

Am investigating… will update soon!


Ok, so I think it is just some obscure complaint by VS2017 that actually turns out to be entirely ignorable. Try building and then running the program anyway. I did, and it runs fine and from then on, builds with no errors.