g++11 update in netbeans(windows)

Sep 16, 2016 at 5:45am
closed account (N8RzwA7f)
Hi all,

I use Netbeans 8.1 and windows 7 (hate 10).
I updated g++ to the latest version by typing in the command prompts:

mingw-get update
mingw-get upgrade

I then changed the settings of a netbeans project (under project properties)

build, c++ compiler, c++ standard => c++11
build, c++ compiler, addtional options -> -std=c++11


I get the same errors as this guy here (pastebin link)
http://stackoverflow.com/questions/39535875/mingw-update-compile-with-std-c11

and tried the suggested change of -std=c++11 to -std=gnu++11 ,
that did not work.
thanks for the help!
Last edited on Sep 17, 2016 at 12:12am
Sep 16, 2016 at 7:12am
Check the names of the binaries from your folders. It is probably g++.



mingw-get ... is that the original mingw (and MSYS)? There is a fork: mingw-w64 and MSYS2, and there is some other GCC Windows port too (CodeBlocks-page might list it). Better maintained ...
Sep 16, 2016 at 5:04pm
closed account (N8RzwA7f)
(this reply was irrelevant since trying more). still stuck though

Last edited on Sep 17, 2016 at 12:13am
Sep 16, 2016 at 6:16pm
Why do you change any names?

The name of the binary is g++. Keep it as it is. Use it.
build, linker , tool -> g++
build, c++ compiler, tool -> g++

build, c++ compiler, addtional options -> -std=c++11

That does sound like the only option that you have to do/change/set.
Sep 16, 2016 at 7:32pm
closed account (N8RzwA7f)
(this reply was irrelevant since trying more). still stuck though

Last edited on Sep 17, 2016 at 12:13am
Sep 16, 2016 at 7:37pm
You have not actually told which version of g++ you do have now.
g++ --version
Sep 16, 2016 at 7:39pm
closed account (N8RzwA7f)
it says 5.3.0 ?

Sep 16, 2016 at 7:55pm
closed account (N8RzwA7f)
the compiler does not complain about newer header files such as <type-traits> or <chrono>
and some older such as <cstdlib> and <vector>
but complained about <string> and <iostream>

the errors I got were a tooltip : in file included from ..
and then in the debug section: a lot of 'does not name a type' errors.

thanks for any help!
Sep 16, 2016 at 7:59pm
Which should be fine.


The iostream and string are not "older headers". Latest standard has them. Therefore,
complaints about

Too vague. If a compiler gives an error message, then you have to know the exact message. We are not psychics, so you have to tell the exact message to us too.
Sep 16, 2016 at 8:18pm
closed account (N8RzwA7f)
it underlines in red: #include <string>
above main ,and
the errors I got were a tooltip : in file included from ..
and then in the debug section: a lot of 'does not name a type' errors:

c:\mingw\include\sys/stat.h:173:14: error: '_dev_t' does not name a type
struct _stat __struct_stat_defined( _off_t, time_t );
^
c:\mingw\include\sys/stat.h:173:14: error: '_ino_t' does not name a type
struct _stat __struct_stat_defined( _off_t, time_t );
^
c:\mingw\include\sys/stat.h:173:14: error: '_mode_t' does not name a type
struct _stat __struct_stat_defined( _off_t, time_t );
^
c:\mingw\include\sys/stat.h:173:14: error: '_dev_t' does not name a type
struct _stat __struct_stat_defined( _off_t, time_t );
^
c:\mingw\include\sys/stat.h:173:14: error: '_off_t' does not name a type
struct _stat __struct_stat_defined( _off_t, time_t );
^
c:\mingw\include\sys/stat.h:180:13: error: '_dev_t' does not name a type
struct stat __struct_stat_defined( _off_t, time_t );

there were more similar errors.
hope you can help
Last edited on Sep 16, 2016 at 8:20pm
Sep 16, 2016 at 8:57pm
closed account (N8RzwA7f)
Also
when I had the following #include files at the top

#include <type_traits>
#include <chrono>
#include <cstdlib>
#include <vector>
#include <ratio>

#include <iostream>
#include <string>
#include <array>
#include <iterator>

the compiler complaints that the iostream file is allready included?
but when I comment out the iostream file, it gives tthe same error with string even though the program compiled before without complaints??
Sep 16, 2016 at 10:32pm
closed account (N8RzwA7f)
anyone?
Topic archived. No new replies allowed.