Unable to compile openFrameworks - c++

While trying to set up OF on eclipse (linux mint 17), I keep getting the following error :
g++: error: unrecognized command line option ‘-std=c++14’
I cannot find a solution online. I have tried updating my g++, replacing my libs/frameworks/video files with the latest on github, but nothing seems to work.
Though this issue has been closed here, i am unable to solve mine.
Is there a way to change the make file so that it builds successfully?

g++ doesn't support -std=c++14 until 4.9
See (for example) https://askubuntu.com/questions/428198/getting-installing-gcc-g-4-9-on-ubuntu for how to install 4.9 on Ubuntu

Related

_ctermid.h: No such file or directory error on mac without Xcode

I was trying to compile my code using gcc 10.2.8 and I got this error:
scons: *** [S.os] Error 1
In file included from /usr/local/Cellar/gcc/10.2.0_2/include/c++/10.2.0/cstdio:42,
from Public_Library/C.h:10,
from Public_Library/D.h:11,
from Public_Library/RS.h:10,
from Projects/S/main.cpp:1:
/usr/local/Cellar/gcc/10.2.0_2/lib/gcc/10/gcc/x86_64-apple-darwin18/10.2.0/include-fixed/stdio.h:219:10: fatal error: _ctermid.h: No such file or directory
I found a few questions like this but the problem is I don't have Xcode on my mac and I have already updated my CommandLine tools several times and it did not work.
I'm using OSX 10.14.6 by the way.
I'm just gonna add this in case it might help others. I updated my OSX to big sure and installed Xcode but that did not help. What solved the problem for me was getting an unshallow version of brew with this command:
git -C /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core fetch --unshallow
and then updating and upgrading my brew.
brew update
brew upgrade

'iostream' file not found

I have the following folders inside /usr/include/c++:
4.6
4.7
4.8
4.9
I want to run a program but that program gives me an error while it uses 4.6. I want it to use 4.9, therefore, I removed 4.6. Now I am getting this error:
'iostream' file not found
How do I fix this? How do I use 4.9? I am using Ubuntu 12.04.
have you tried adding
export CPATH=/usr/include/c++/4.9:$CPATH
in your ~/.bashrc file?
because I think this might be a problem with your include path not containing your /usr/include/c++/4.9 folder

Cygwin g++ compilation fails

I am trying to compile a c++ file using cygwin. I get the following error :
fatal error: stddef.h: No such file or directory #include
This link provides a solution : link.
But even if I upgrade gcc and g++ package from the UI(setup.exe) it still gives me the same error.How to fix this? How to upgrade it from the cygwin command line?
The link you mentioned was the solution I'd used when I came across the same error.
For the second part of the question, if you've worked with Ubuntu et al. you've heard of apt-get, and know how awesome it is. These guys made just that for Cygwin. :) Link to apt-cyg on GitHub.
After that, it's as simple as:
apt-cyg update <your packages>

g++: error: libgomp.spec: No such file or directory

I use g++ (GCC) 4.7.2. on Windows 7, 64-bit version.
downloaded from http://nuwen.net/mingw.html
I tried to use the "-fopenmp" flag and got the error:
g++: error: libgomp.spec: No such file or directory
I can't find the file anywhere on my system. Do I need to re-install something? Can I just throw a file somewhere?
You could try installing TDM-GCC, which looks as though it includes OpenMP.
There's also Sezero's personal build.
I had a similar problem. I got it working installing one of the version at the following discussion.
Which version of MinGW should I use
I don't have access to my windows machine now so I don't know which version I used but I can check on Monday if you don't have it working by then.
It might have been this one.
http://sourceforge.net/projects/mingwbuilds/files/host-windows/releases/

Run Error With Qt Creator

I just downloaded and installed Qt Creator.
I have not messed with the PATH or any other settings.
But when I try to run a Qt GUI Application project, it gives the following error:
cc1plus.exe:-1: error: error: unrecognized command line option "-fno-keep-inline-dllexport"
The output says:
Error while building/deploying project ProjectFirst (kit: Desktop Qt
5.0.1 MinGW 32bit) When executing step 'Make'
I don't understand why this is happening. I looked it up online a lot before asking, but couldn't find anything.
I've just found the problem on my friend's computer the same as yours.
Type g++ --version to see what g++ is taking by default from your path.
If it is 4.4.* (<= 4.7.2) then found that old g++ and remove it to the trash.
Usually it goes with Perl package, needed by Qt configure.
Then return to Console and try g++ --version again
if it not 4.7.2 then lookfor old g++ again and remove it.
If it is written g++ : command not found or something like that - change your PATH variable.
Don't forget to reboot your computer after changing it.
When you got g++ --version with 4.7.2, look forward to having success.
Try to use nmake, not mingw32-make
The problem is that you are using the wrong mingw32 installation (an older version).
In order to solve this, check that the Kit you use has detected the correct Mingw version (this should be 4.7, which is located inside the qt installation tools directory).