CUDA version X complains about not supporting gcc version Y - what to do?
The question is about a specific combination of versions but is relevant more generally.I've just dist-upgraded from Kubuntu 12.04 to 14.04. Now, when I want to compile CUDA code (with CUDA 6.5), I...
View Article$gcc problemMatcher only ever shows the first error or warning
I have a Visual Studio Code C project based on CMake, compiled using gcc. I've created a custom task for building the project, and have specified $gcc for its problemMatcher property.However, when I...
View ArticleHow to static link SDL library with gcc?
When i do this (dynamic link), all is ok:$ gcc -o beta.bin ./game.c -lSDL -lSDLmainBut when i try to static link:$ gcc -static -o beta.bin ./game.c -lSDL -SDLmainthere is a linker...
View ArticleIssue with GCC profiling when executing script: profiling:/build:Cannot...
I am setting up an external software package and I am linking it to my code. Compiling my code does not throw any error, but when I am executing the code, the following error is thrown when the code...
View ArticleUsing the boost::asio::co_spawn function across multiple modules can trigger...
When I use co_spawn across multiple modules and enable optimization levels O2 or O3, I encounter a linker error during the linking phase. It appears that the compiler discards some symbols it deems...
View Articlelinux, setuid when user id does not exists
In gcc, as root user, I call setuid system call with invalid user id (3009). errno variable is 0 (successful).When the program is running, in another session I execute ps command and I see the value of...
View ArticleCargo build failed with = note: collect2: fatal error: cannot find 'ld'
I was trying to build my rust project on Ubuntu and got the following error: = note: collect2: fatal error: cannot find 'ld' compilation terminated.error: linking with `cc` failed: exit status: 1Ubuntu...
View Article$gcc problemMatcher doesn't show all errors or warnings
I have a Visual Studio Code C project based on CMake, compiled using gcc. I've created a custom task for building the project, and have specified $gcc for its problemMatcher property.However, when I...
View ArticleDigit separator for literals in C
I have been able to use the digit-separator ' in my C projects thus far. They have all been compiled with the MSVC compiler with no problems.I have just changed to using the GCC compiler instead, which...
View ArticleHow can I suppress "unused parameter" warnings in C?
For instance:Bool NullFunc(const struct timespec *when, const char *who){ return TRUE;}In C++ I was able to put a /*...*/ comment around the parameters. But not in C of course, where it gives me the...
View ArticleSTM32 ARM GCC Toolchain CMake target_compile_features no known features for...
Our project is using STM32 GCC ARM Toolchain, using STM32 CMake toolchain file (gcc-arm-none-eabi.cmake) which sets the CMAKE_C_COMPILER_ID and CMAKE_CXX_COMPILER_ID to GNU.When lines like this are...
View ArticleVS Code. How to compile a given list of files?
There are several files in the project directory that need to be compiled using GCC. I want to create a tasks.json file that lists these files, so that I can use it in different compilation tasks. I...
View ArticleBest way to ensure compatibility of C/C++ structs between AArch64 and Arm32
IntroductionI am looking for advice on the best way to guarantee a particular layout in memory of a data struct to be passed from one CPU to another. In my case, the sending CPU is AArch64, and the...
View ArticleUsing Linker Symbol from C++ code as a fixed constant (NOT relocated) in a...
Sorry if the title is not very clear. I am using MinGW with GCC 6.3.0 to build a x86 32-bit DLL on Windows (so far). I'll spare you the details why I need hacky offsets amongst its sections accessible...
View Articlemsvc cannot initialize rvalue reference from value [duplicate]
MSVC (std:c++14) is complaining when initializing an rvalue reference using non-static data member of a prvalue (returned by function call).The code is as follows (or see Compiler Explorer):struct R...
View Articlesys/user time & childs sys/user time in linux
Based on example 8.31 of APUE, suppose the following code. This example shows user/sys time of a process and also user/sys times of child processes for each command (passed as argvs)#include...
View ArticleError loading LAS files into my R Session using lidR on MacOS (M1)
I would like to call up or load a LAS file (Laser Point file) in my R project. My code works on a Windows 10 computer but gives an error on a on a Mac Book, M1, 2020. My code looks like this:# Install...
View ArticleInstalled Raylib but it's not showing up in c drive
enter image description hereUsing "C:\msys64\mingw64\bin\gcc.exe" instead so I am unable to use Raylib header file. Installer said it was being installed in C:\raylib folder but after installation is...
View ArticleIncrease Stack Size on Windows (GCC)
Is there a way to increase the stack size of a Windows application at compile/link time with GCC?
View ArticleDifferences in symbol export between gcc and msvc for implictely define...
I have a class Bar which holds a vector of a non-copyable class Foo:struct Foo { Foo(int &a) : m_a(a){} int &m_a;};struct CORE_EXPORT Bar { std::vector<Foo> f;};When I compile this code...
View Article