Getting an error when I enable c++14 features

CodeLite installation/troubleshooting forum
Josh_727
CodeLite Curious
Posts: 4
Joined: Sun Jan 06, 2019 6:06 pm
Genuine User: Yes
IDE Question: C++
Contact:

Getting an error when I enable c++14 features

Post by Josh_727 » Mon May 13, 2019 12:12 am

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====

User avatar
eranif
CodeLite Plugin
Posts: 5863
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

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

Post by eranif » Mon May 13, 2019 9:18 am

This is not really a CodeLite issue but more of a MinGW issue.
Make sure you have read the HOW TO POST thread

Josh_727
CodeLite Curious
Posts: 4
Joined: Sun Jan 06, 2019 6:06 pm
Genuine User: Yes
IDE Question: C++
Contact:

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

Post by Josh_727 » Thu May 16, 2019 7:39 am

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?

User avatar
eranif
CodeLite Plugin
Posts: 5863
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

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

Post by eranif » 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)
Make sure you have read the HOW TO POST thread

Josh_727
CodeLite Curious
Posts: 4
Joined: Sun Jan 06, 2019 6:06 pm
Genuine User: Yes
IDE Question: C++
Contact:

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

Post by Josh_727 » Fri May 17, 2019 1:10 am

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.

Post Reply