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
0
votes
1 answer

MIXED_STR_LEN_ARG with gfortran

I have a program in mixed C++/Fortran, in which a C++ character is given as argument for a Fortran function. The code is compiling and working with ifort compiler, using the option -mixed_str_len_arg, which specifies the position of the hidden…
0
votes
1 answer

Use QT creator on Linux to compile a portaudio based C code

I found a sample C code that uses portaudio. To be able to compile the code I had to copy a header file and a library file on my working folder. So in my folder I have the following 3 files: - main.c - myheader.h - libportaudio.a In Linux I use…
TJ1
  • 7,578
  • 19
  • 76
  • 119
0
votes
0 answers

Generate csmith programs without printf

I'am trying to generate csmith programs without any printf inside. I tried to apply -E -DNO_PRINTF to a generated program but it seem as GCC doesn't have an argument to link files and then apply the preprocessing pass. So how to tell csmith to avoid…
jcnm
  • 83
  • 1
  • 6
0
votes
3 answers

GCC 4.1.2 compiler or similar compiler for windows pc

I am in need of GCC 4.1.2 compiler for windows.I don't know much about compilers.If gcc compiler is not available for windows then, are there any similar compilers for windows? Any one please help me out.
dinesh
  • 5
  • 1
  • 3
0
votes
1 answer

I am having trouble compiling and running my C program. What are the commands?

I am having trouble compiling and running my C program. What are the commands? My code is: #include int main(){ printf("Hello World!\n"); exit(0); } I tried compiling with gcc -o hello.c only to be unsuccessful. I am using a Mac…
missyj
  • 47
  • 1
  • 1
  • 7
0
votes
2 answers

Compiler options for C# projects

I can't seem to find where to put compiler options (specifically /doc) for my project. This question and this question both say they are in Project > Properties > Build tab, but I do not see any build tab (see below). I can only assume this was…
einsteinsci
  • 1,137
  • 1
  • 8
  • 22
0
votes
1 answer

gcc -fno-stack-protector for linking not work

My gcc version : gcc version 4.8.2 (Ubuntu 4.8.2-19ubuntu1) the following is my makefile all : main.o utility.o …
zongyuwu
  • 325
  • 1
  • 3
  • 8
0
votes
2 answers

error with the mex command -g (no optimization)

I am trying to mex a file in a script. The C file which has to be mexed is generated in one of the previous steps of the script before it is mexed. When I use the below line in the script, everything works fine and the script runs successfully. mex…
Arun Kumar
  • 103
  • 13
0
votes
1 answer

Structure packing duplicity

I am writing code to a specification which defines structures without packing, for example: struct LASHeader_1p2 { char FileSig[4]; //= "LASF"; // 4 unsigned __int16 FileSource; // 2 6 unsigned…
0
votes
1 answer

gcc std option and linker option in code

I switch between so many projects and IDEs a lot. They run each project with default options of IDE. For example g++ test.cpp I know make file can solve the problem. But it is not IDE friendly way. I am thinking if there is any way to impose…
barej
  • 1,330
  • 3
  • 25
  • 56
0
votes
0 answers

g++ option E to join local header files only

the following option g++ main.cpp -E will join all headers and renders macros. It does generate over 10MB output for me. I just need to render includes and not macros. And also I need to limit rendering includes to local files #include…
barej
  • 1,330
  • 3
  • 25
  • 56
0
votes
1 answer

Is it possible to have compiler specific code sections in scala

I have a situation where, I need to certain functionality that is available in Spark library version 1.1.0, But I have two different platforms I need to run this application one. One uses Spark 1.1.0 and the other uses Spark 0.9.1. The functionality…
Ramdev
  • 375
  • 1
  • 3
  • 12
0
votes
3 answers

Add /MT compile flag to project

I have VisualStudio 2012 and I a trusted third party told me I have to add the /MT compile flag to one C# project, so I can use a library which is not necessarily installed on the target system. I did not find where/how to set this flag in VS.
Alexander
  • 19,906
  • 19
  • 75
  • 162
0
votes
1 answer

Compiling and Llnking to used modules in external directory Compaq Fortran command prompt

I've already asked a similar question, here: Linking to modules in external directory Compaq Visual Fortran command prompt And I thought that the first answer was correct (that is, in the manual they say you can simply specify the path name before…
Charles
  • 947
  • 1
  • 15
  • 39
0
votes
0 answers

Data alignment compiler option

I had next code: #include #include #include #include #include int main() { char a = 'A'; unsigned int b = 1000; char* arr = (char*)malloc(sizeof(a)); memcpy(arr, &a, sizeof(a)); …
synacker
  • 1,722
  • 13
  • 32