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)
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 https://openframeworks.cc/setup/vs/
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.
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.
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!
Aha!
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.