Skip to main content
Advice
0 votes
2 replies
85 views

Using vcpkg on Windows 11, I installed GSL (GNU Scientific Library) with vcpkg install gsl. Then I did set INCLUDE=E:\<mypath>\vcpkg\installed\x64-windows\include;%INCLUDE% set LIB=E:\<mypath&...
Raymond's user avatar
  • 183
1 vote
1 answer
68 views

I am currently working with a project that generates its compiler- and linkerflags by reading a configuration file. The resulting linker-flags of interest are: -Wl,--defsym=__MPLAB_BUILD=1${...
user44791's user avatar
0 votes
0 answers
33 views

If I go to the "Project settings/configuration properties/C/C++/Command line" menu in the Visual Studio 2022 editor, how can I edit the compiler flags? I would like to remove one. I also ...
Fox1942's user avatar
  • 376
0 votes
0 answers
37 views

I've cross-compiled a small "hello world" app for my cortex-a72 CPU using -finstrument-functions flag (for debugging) in such way : "aarch64-linux-gnu-g++ -o0 -finstrument-functions ...
Kobip's user avatar
  • 114
-1 votes
1 answer
143 views

The following code gives drastically different results when compiling with any optimization flags vs without: #include <iostream> #include <cstdint> // trailing zero count for __uint128_t ...
dsa's user avatar
  • 27
3 votes
1 answer
207 views

Suppose I have a CMake project which produces a CPU-intensive application. When I build binaries for execution on a given machine, or for performance benchmarking, I would like them to be maximally, ...
einpoklum's user avatar
  • 137k
2 votes
1 answer
111 views

Compiling this C program with gcc 11.4.0 and -Werror=traditional-conversion raises an error: short int f(short int x); short int f(short int x) { return x; } int main(void) { short int a = 0;...
jarufi's user avatar
  • 23
0 votes
1 answer
66 views

I'm trying to train a pymc model (version 4.4.0) on a Mac. My model is fairly complex and it seems like the current level of complexity is causing the compiler some issues because I'm getting this ...
Jed's user avatar
  • 2,138
-1 votes
1 answer
160 views

I pass compiler flags by setting CMAKE_CXX_FLAGS via command line as: $ CC=my_llvm/clang CC=my_llvm/clang++ \ cmake -DCMAKE_AR=my_llvm/llvm-ar -DCMAKE_LD=my_llvm/lld \ -DCMAKE_CXX_FLAGS=--target=...
pmor's user avatar
  • 6,757
-1 votes
1 answer
119 views

I have a class that varies according to a compilation flag. I would like to instantiate both the versions of the class in the same scope. my_class.h #ifndef MY_CLASS_H #define MY_CLASS_H #ifdef ...
Francesco Vezzi's user avatar
2 votes
2 answers
251 views

I have the following code: #include <iostream> char add(char a, int b) { return a + b; } int main(void) { long long a = 100000000; long long b = 20; int x = add(a, b); ...
Noah's user avatar
  • 43
1 vote
1 answer
518 views

GCC offers a number of options related to instruction scheduling in the compiler flags. An overview of what this means is on the GCC Wiki for "Instruction Scheduling", but this is well out ...
Greg Kennedy's user avatar
0 votes
2 answers
429 views

I am writing a CXX+CUDA project, and I'm compiling using nvcc, with CXX compiler of icpc. I want to add different compilation flags for icpc for different files. In CXX standalone this is possible ...
Amit's user avatar
  • 39
3 votes
1 answer
215 views

CMake has a set of variables named CMAKE_<LANG>_FLAGS (CMAKE_CXX_FLAGS, CMAKE_Fortran_FLAGS etc.) which are used when building command-lines for compiling targets with the compilers for those ...
einpoklum's user avatar
  • 137k
1 vote
1 answer
433 views

I am making a game in c++ with sdl2, and I am currently compiling the program with g++ using the following flags: DEBUG_FLAGS = -g -Og -DDEBUG RELEASE_FLAGS = -O3 -DNDEBUG -mwindows -s I want the ...
Invader88's user avatar

15 30 50 per page
1
2 3 4 5
34