Page 1 of 1

Getting an error when I enable c++14 features

Posted: Mon May 13, 2019 12:12 am
by Josh_727
If I enable c++14 features I keep getting an error and it wont compile.
I go here... Right click on ProjectFolder > Settings > Global Settings > C++ Compiler Options
(I check the flags "Enable all compiler warnings [-Wall], and the flag Enable C++14 Features)


Then when i try to compile it fails and gives me this info in the build log...


C:\Windows\system32\cmd.exe /C C:/MinGW/bin/mingw32-make.exe -j8 SHELL=cmd.exe -e -f Makefile
"----------Building project:[ Project_1 - Debug ]----------"
mingw32-make.exe[1]: Entering directory 'C:/Users/open/Desktop/Sams_teach_yourself_c++/Sams_tutorials/Project_1'
C:/MinGW/bin/g++.exe -c "C:/Users/open/Desktop/Sams_teach_yourself_c++/Sams_tutorials/Project_1/main.cpp" -std=c++14 -Wall -g -O0 -Wall -o ./Debug/main.cpp.o -I. -I.
In file included from c:\mingw\lib\gcc\mingw32\8.2.0\include\c++\cstdio:42,
from c:\mingw\lib\gcc\mingw32\8.2.0\include\c++\ext\string_conversions.h:43,
from c:\mingw\lib\gcc\mingw32\8.2.0\include\c++\bits\basic_string.h:6391,
from c:\mingw\lib\gcc\mingw32\8.2.0\include\c++\string:52,
from c:\mingw\lib\gcc\mingw32\8.2.0\include\c++\bits\locale_classes.h:40,
from c:\mingw\lib\gcc\mingw32\8.2.0\include\c++\bits\ios_base.h:41,
from c:\mingw\lib\gcc\mingw32\8.2.0\include\c++\ios:42,
from c:\mingw\lib\gcc\mingw32\8.2.0\include\c++\ostream:38,
from c:\mingw\lib\gcc\mingw32\8.2.0\include\c++\iostream:39,
from C:/Users/open/Desktop/Sams_teach_yourself_c++/Sams_tutorials/Project_1/main.cpp:1:
c:\mingw\include\stdio.h:788:34: error: '__off64_t' does not name a type; did you mean '__time64_t'?
typedef union { __int64 __value; __off64_t __offset; } fpos_t;
^~~~~~~~~
__time64_t
mingw32-make.exe[1]: *** [Debug/main.cpp.o] Error 1
mingw32-make.exe: *** [All] Error 2
Project_1.mk:97: recipe for target 'Debug/main.cpp.o' failed
mingw32-make.exe[1]: Leaving directory 'C:/Users/open/Desktop/Sams_teach_yourself_c++/Sams_tutorials/Project_1'
Makefile:4: recipe for target 'All' failed
====1 errors, 0 warnings====

Re: Getting an error when I enable c++14 features

Posted: Mon May 13, 2019 9:18 am
by eranif
This is not really a CodeLite issue but more of a MinGW issue.

Re: Getting an error when I enable c++14 features

Posted: Thu May 16, 2019 7:39 am
by Josh_727
eranif wrote: Mon May 13, 2019 9:18 am This is not really a CodeLite issue but more of a MinGW issue.
I suppose im just not that well versed with codelite, but how do you know this issue is more attributed to mingw? Is it something that can only be corrected outside the editor?

Re: Getting an error when I enable c++14 features

Posted: Thu May 16, 2019 11:52 am
by eranif
It is simple (tat least o me):
The error you are getting is from the compiler (g++) which is part of the MinGW on Windows. CodeLite is an IDE, not a compiler.
You will probably get this error regardless of the environment you are using (CodeLite, CMD terminal etc)

Re: Getting an error when I enable c++14 features

Posted: Fri May 17, 2019 1:10 am
by Josh_727
eranif wrote: Thu May 16, 2019 11:52 am It is simple (tat least o me):
The error you are getting is from the compiler (g++) which is part of the MinGW on Windows. CodeLite is an IDE, not a compiler.
You will probably get this error regardless of the environment you are using (CodeLite, CMD terminal etc)
something must be rotten in dnmark then because I just reinstalled mingw and it did not fix the problem. I might have to try contacting the instructor on udemy. Thanks.