Questions tagged [compiler-options]

Compiler-options are parameters that are being passed to the compiler and that affect the compilation process or its resulting product.

Modern compilers have a large set of options that can be used to somehow change the way the code is compiled. Usually those options are passed as command-line flags.

Example for Java:

javac -target 1.5 -bootclasspath jdk1.5.0\lib\rt.jar \ -extdirs "" OldCode.java

More information about particular options can be found on compiler vendor's websites, to name a few:

244 questions
2
votes
1 answer

Typescript configuration: is module setting case sensitive?

I've got a question coming from the following two tsconfig.json files, they're in the same project, one extends the other: Parent { "compilerOptions": { "experimentalDecorators": true, "skipLibCheck": true, "module": "ESNext" } …
funder7
  • 1,622
  • 17
  • 30
2
votes
0 answers

Is there a way to prevent variables from being more aligned than their minimum required alignment?

Problems caused by insufficient memory alignment can often seem to appear at random, since things can be correctly aligned by coincidence until you change something unrelated. Is there a compiler flag or some other way to bring all of these problems…
2
votes
0 answers

how to make skipLibCheck ignore only d.ts in dependencies but not our own d.ts file?

as title some library are just poorly typed and throw error everywhere which is why I want to skip the library type however, I don't want to skip checking on my own d.ts file because the compiler won't throw errors upon implicit any type and type…
Acid Coder
  • 2,047
  • 15
  • 21
2
votes
1 answer

MS C++ (CL) compiled executable does not work on Windows 2000

Possible Duplicate: Issue using Visual Studio 2010 compiled C++ DLL in Windows 2000 Similar to these questions:  Can I use Visual Studio 2010's C++ compiler with Visual Studio 2008's C++ Runtime Library?  Can VS2010 create native executable file…
David R Tribble
  • 11,918
  • 5
  • 42
  • 52
2
votes
0 answers

Clarification required on gcc option -mcmodel=medium

While compiling one of our dependent tool, a long list relocation error is showing up while linking: SomeLibrary.a(SomeObject.o)(.text._bla_bla_bla): error: relocation overflow collect2: error: ld returned 1 exit status cook: command g++: exit…
Foobar-naut
  • 111
  • 3
  • 11
2
votes
2 answers

Compiled object in different directory using cl compiler options

Working in Windows environment I'm stuck with the following problem: I'd like to tell the cl compiler to compile (without linking) some source file, putting it in the specified directory, as following: cl /c /FeOBJDIR\ source.cpp Unfortunately, the…
Andrea Loforte
  • 117
  • 1
  • 10
2
votes
1 answer

NVCC fails with the error ""_GLIBCXX_MATH_H" is not defined"

I'm compiling a CUDA program - a simple and innocuous one. Regardless of how far I simplify it or remove some of the code or the include files, nvcc tells me: In file included from /usr/local/cuda/bin/..//include/crt/common_functions.h:271:0, …
einpoklum
  • 118,144
  • 57
  • 340
  • 684
2
votes
1 answer

Setting the C standard flag enables GNU extensions

If I do: set_property(TARGET tgt PROPERTY C_STANDARD 99) in a CMakeLists.txt and the C compiler is gcc, I get a -std=gnu99 flag rather than -std=c99. Why? And how do I enforce a -std=c99?
einpoklum
  • 118,144
  • 57
  • 340
  • 684
2
votes
1 answer

cmake using corrext c++ standard when checking for header files

I'm building a project using cmake which uses Google's dense hash maps. I need to check that the corresponding header file is present. I therefore added set (CMAKE_CXX_STANDARD 11) INCLUDE…
hivert
  • 10,579
  • 3
  • 31
  • 56
2
votes
1 answer

What is this gcc compiler option? (-lGL -lGLU -lglut)

I am developing GTK program in C and I have a makefile that I am stuck what this compiler option this is. Any ideas? I am sorry this is a question style, but I am really stuck.
Ian Sonic
  • 191
  • 1
  • 10
2
votes
2 answers

How can I define a function with a parameter dependent on a symbol debug?

I defined with -D compiler option a symbol debug: -DDEBUG_VALUE. I would like a function in which the presence of a parameter depends on the definition or less of the symbol debug flag. Namely if DEBUG_VALUE is defined, I have my_function(int…
Nick
  • 1,439
  • 2
  • 15
  • 28
2
votes
2 answers

Compile a Windows Forms application using csc.exe

In his book Erik Brown writes the following code and compiles it from the command-line: csc MyForm.cs [assembly: System.Reflection.AssemblyVersion("1.1")] namespace MyNamespace { public class MyForm : System.Windows.Forms.Form { …
Asaf
  • 3,067
  • 11
  • 35
  • 54
2
votes
1 answer

Issues with building PROC application using Oracle 10g 64 bit

I am trying to build my PRO* C application in 32 bit mode using Oracle 10g 64 bit on Solaris SPARC platform. Can someone tell me what settings has to be made in order to successfully compiler and create an executable? Currently when I switch my…
Jegan Kunniya
  • 986
  • 3
  • 17
  • 27
2
votes
1 answer

Detect UB like Rust

Two simplified examples: #include #include #include class Object{}; void use1(Object * o) { (void)(o); } void use2(std::string & s) { (void)(s); } int f1() { Object * object_ptr{ nullptr }; { …
vladon
  • 8,158
  • 2
  • 47
  • 91
2
votes
1 answer

printing all includes when compiling with GDB

I compile my C++ code using gcc (4.6.3), and want the compiler to print all the includes it uses. In MS VS it is done simply by adding a /showIncludes flag, and the output looks like this: 1> File.cpp 1> including file : A.h 1> including file : …
DuduArbel
  • 1,100
  • 1
  • 12
  • 25