Questions tagged [compiler-version]
22 questions
53
votes
4 answers
How are the __cplusplus directive defined in various compilers?
My compiler expands it to 199711L. What does that mean? I read that __cplusplus > 199711L signifies C++11. What are the possible expansions of this macro and what does it signify?

unj2
- 52,135
- 87
- 247
- 375
7
votes
1 answer
How to select an older compiler in Microsoft Visual C++ 2019?
As written here, under "Project Settings" I should be able to specify the compiler to be used for the current project. However, I cannot find this menu entry in Visual Studio 2019.
I have both Visual C++ 2019 and 2013, and would like to use the new…

Pietro
- 12,086
- 26
- 100
- 193
5
votes
3 answers
Compile with java 6 from java 8 JDK installed
I am required to compile my source code with Java 6 for university. I currently have Java 8 JDK installed on my PC (Linux). How do I compile in Java 6?
p.s. I understand I wont be able to use any Java 7 or 8 features.
p.p.s. I realize java 6 source…

hcp
- 51
- 1
- 1
- 4
4
votes
3 answers
Does C# compiler set version or platform constants?
Are there any predefined constants in the C# compiler to detect what version of the platform is being targeted?
I can set a platform in Project options but how can I write single source for .NET 2 and .NET 3.5 ?
Edit: I really want to write some…

H H
- 263,252
- 30
- 330
- 514
3
votes
1 answer
Maven Project on Eclipse revert java compiler version (from 1.8 to 1.5) after update (alt f5)
as mentioned in the title I have this problem:
if I try to edit the compiler version of my Maven Project (by right click on the proj -> Preferences -> Compiler...apply,ok ), after I press alt-f5 (update) i loose all the previous settings and if i…

Giulio Ambrogi
- 198
- 10
2
votes
1 answer
is static library with Objective C compatible with any version of XCode?
I am from c++ background and in c++ world, if I create an static library with any specific version of a compiler, then it is advisable to use same version of compiler for binary which will use this static library.
Is this statement true for…

Sahil Doshi
- 1,073
- 10
- 23
2
votes
0 answers
Crash when too many zero in weights argument in rq function from quantreg library
I am trying to do a quantile regression with the rq function of the 'quantreg' library.
I have a problem because R completely crash when I add the 'weights' argument.
I added a reproducible example here:
library(quantreg)
prof <- seq(1,…

A. Receveur
- 93
- 7
2
votes
2 answers
Unsupported major.minor version 52.0 - while using a lower version to compile. How is it still going bad?
I get this error message when I try to run my program:
Exception in thread “main” java.lang.UnsupportedClassVersionError, Unsupported major.minor version 52.0
I am using Eclipse. I tried going to Windows -> Preferences -> Compiler and changing my…

JoshBreece
- 47
- 1
- 1
- 7
2
votes
3 answers
Technical considerations in dropping support for old compiler versions?
I work on a project that's distributed for free in both source and binary form, since many of our users need to compile it specifically for their system. The necessitates a degree of consideration in maintaining backwards compatibility with older…

Phil Miller
- 36,389
- 13
- 67
- 90
1
vote
1 answer
Java - Make src/main/java compile with java 1.4 and src/test/java compile with 1.5
I have a project which must be compiled only with java 1.4. But I am planning to write some unit tests using mockito. I want a way to specify in pom so that src/main/java compiles with jdk 1.4 but src/test/java compiles with jdk 1.5.
Is there a way…

Rishi
- 13
- 3
1
vote
3 answers
Why does Eclipse complain that the project specifies compiler compliance 1.8 but a JRE 11 is used?
I set an Eclipse project compiler compliance to 1.8 because I want to generate jar files that can be executed in computers with JRE 8 installs.
However, in my development computer I only have JRE 11 installed. I assumed this to be ok because I…

user118967
- 4,895
- 5
- 33
- 54
1
vote
2 answers
Eclipse C++'s compiler version
I'm using the Eclipse IDE for C++ (Eclipse CDT). I want to install the SFML library but I can't find what version of GCC my Eclipse uses.
Note: I have multiple GCC compilers (versions) installed on my computer.
Or how can I set up a different…

GunPointer
- 13
- 1
- 4
1
vote
1 answer
multiple gcc versions in makefile
In my Makefile I have
CC=g++
When I do mgrep gcc, I have several versions listed like:
gnu/gcc/4.2.1
gnu/gcc/4.7.3
etc
I can do a module load to change my gcc version.
Now suppose I want to use multiple versions simultaneously in different…

user2524261
- 109
- 2
- 10
1
vote
1 answer
Choosing newer gcc version for upgrade
I develop C++ applications on CentOS 5.4 and we came across several inconvenient situations with gcc 4.1.2 like inability to debug local variables in class constructor which is a confirmed gcc bug (same problem with scoped variables).
I'm…

jackhab
- 17,128
- 37
- 99
- 136
1
vote
1 answer
Benchmarks of code generated by different g++ versions
I work on a runtime system for an application domain that is very performance sensitive. We go to a lot of effort to maintain backward compatibility with older compiler versions, including avoiding more recently-implemented language constructs, and…

Phil Miller
- 36,389
- 13
- 67
- 90