Quantcast
Channel: Active questions tagged gcc - Stack Overflow
Browsing all 21993 articles
Browse latest View live
↧

CMake: The C Compiler is not able to compile a simple test program

I am trying to cross-compile the Azure IoT SDK C for a Mips processor. Cross-compiling an older version of the same SDK using an older version of CMake (2.8.12.2) works just fine, so I doubt it's the...

View Article


gcc -O2 vs. without causes error

When compiling file containing open("FILENAME", O_RDONLY); without -O2 flag everything is fine. But when -O2 is turned on I get:/usr/include/x86_64-linux-gnu/bits/fcntl2.h: In function...

View Article


Making strlcpy available in linux

I'm trying to compile a source code which was originally written for FreeBSD and since strlcpy isn't included in the linux GlibC , I'm now stopped at this stage.GCC has suggested that I can use strncpy...

View Article

cannot open source file "glibconfig.h" (dependency of "gtk/gtk.h") in Studio...

I've configured the task json in Visual Studio Code{"tasks": [ {"type": "shell","label": "gcc build active file","command": "/usr/lib64/ccache/gcc","args":...

View Article

Few basic GCC flag questions

I'm trying to complie and run my C program. The program uses threads.I'm running windows 10 using WSL with Ubuntu terminal. (Also trying it with Ubuntu virtual box)This is my "default" Makefile format...

View Article


Why does GCC compile itself 3 times?

I have compiled GCC from source but I can't seem to fully understand the utility of gcc compiling itself three times.What benefit does this serve ?This answer says:Build new version of GCC with...

View Article

(.text+0x20): undefined reference to `main' collect2: error: ld returned 1...

/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/Scrt1.o: in function _start': (.text+0x20): undefined reference tomain' collect2: error: ld returned 1 exit statusi am facing an...

View Article

Why do these two pointers that should be the same point to different data?

I'm writing a FAT16 driver in GNU C for a hobby operating system, and I have a structure defined as such:struct directory_entry { uint8_t name[11]; uint8_t attrib; uint8_t name_case; uint8_t...

View Article


C++ - Integration of CLIPS (rule engine) [duplicate]

I'm trying to integrate CLIPS into my C++ application (QT-project). I already have included the source and header files to the projects. I'm now trying to compile the downloaded source code to see if...

View Article


ARM cortex-a8: GCC 8.3 vs 6.3: performance drop

After the upgrade of my linux distribution on my BeagleBoneBlack board, I've found that the newer GCC 8.3 gives significantly slower code than former GCC 6.3.With the (unchanging) compile options...

View Article

Is there a gcc/clang flag to validate a C++ program without compiling

Is there a gcc/clang flag to validate a C++ program without compiling it ?In some of our per-commit-checks we only compile the program and pass if it compiles. We don't really need the compiled...

View Article

Why is gcc not detecting given name?

I'm writing a simple console program to compile a gtk3 app for windows.The code gives the compiler the proper "-o" flag to output a file with the given name, "gtktest.exe" in this case.Here is the...

View Article

How does #include work in C++? [duplicate]

I have read from a codeforces blog that if we add #include <bits/stdc++.h> in a C++ program then there is no need to include any other header files. How does #include <bits/stdc++.h> work...

View Article


CPU you selected doesn't support x86-64 instruction set

I want to compile a program which has lots of 32-bit static libraries which I cannot recompile to 64-bit because the lack of makefiles but there are some libraries that I should compile to obtain some...

View Article

Creating main-Function using gcc in x86-Assembly [duplicate]

Following code:.intel_syntax noprefix.text .global _start_start: retcompiles using GCC: gcc -o main -nostartfiles -nostdlib main.SBut this does throw a memory-access-error when calling ./mainSo I...

View Article


How can I compile a program with Intel's Memory Protection Extensions (MPX)...

I am trying to test out Intel's Memory Protection Extensions (MPX) on my Macbook Pro by mirroring this tutorial for Linux. My processor is an Intel Core i5-6267U and it does have the ability to use MPX...

View Article

Makefile compile many programs with main function with one makefile error

Im trying with one Makefile to compile many .c files. I have written all the rules and I want to add a rule that says: execute all the rules who depend on .c files.In reference of : Compile all C files...

View Article


GCC error with -mcpu32 flag, CPU32 compiler needed

I am patching code into my car's ECU. This has a Motorola MC68376 processor, so I'm using the appropriate CPU32 instruction set.I want to continue to write in assembly code so that I can explicitly...

View Article

How to stop 'noreturn' functions disabling '-Wreturn-type' warning with GCC?

When using a macro that might expand to a function with a noreturn attribute, is there a way to stop it from suppressing -Wreturn-type?Simple example:/* Defined in a separate header. */#ifndef NDEBUG#...

View Article

Image may be NSFW.
Clik here to view.

Unable to see elements of std::vector with gcc in VS code

I'm currently using VS Code to learn C++ because it was easy to setup and is much lighter than VS Studio. However, one thing that I'm unable to do is to see the elements of an array (or string, etc),...

View Article
Browsing all 21993 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>