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====
Getting an error when I enable c++14 features
-
- CodeLite Curious
- Posts: 4
- Joined: Sun Jan 06, 2019 6:06 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
- eranif
- CodeLite Plugin
- Posts: 6375
- 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
This is not really a CodeLite issue but more of a MinGW issue.
Make sure you have read the HOW TO POST thread
-
- CodeLite Curious
- Posts: 4
- Joined: Sun Jan 06, 2019 6:06 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
- eranif
- CodeLite Plugin
- Posts: 6375
- 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
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)
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
-
- 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
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.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)