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

GCC Linker : how to generate a report of per file contribution on output...

Recently I meet a problem when trying to link my program. It report .text can't fit in specified memory region. Obviously the source code grows too large to be linked in limited memory region.What I...

View Article


What is the difference between long int and long long int? [duplicate]

I am using gcc version 5.4.0 20160609, 64 bit. When I tried to find the size of long int and long long int using sizeof operator it shows the size as 8 for both long int and long long int. Then What is...

View Article


Why am I getting `undefined reference to xxx` errors when all libraries and...

First of all, I appreciate that this is a long post, but I've been stuck on this problem for days now and would really like to get some help. Essentially I am trying to use the redland rdf libraries...

View Article

gcc 7.3 128-bit unsigned integer operation

I'm confused with the usage of 128-bit integer. Please look at the test code:uint128_t test_data = 0x00000000FFFFFFFF0101010101010101; uint64_t test_data_h = test_data >> 64; uint64_t test_data_l...

View Article

Why fgets() doesn't read after the first element?

I am trying to do this programming project in the book i study: Write a program that sorts a series of words entered by the user:Enter word: fooEnter word: barEnter word: bazEnter word: quuxEnter...

View Article


Image may be NSFW.
Clik here to view.

How to show warnings in VSCode editor for a .cpp file?

Is it possible to tweak VSC somehow to see GCC warnings in the text editor? Refer to the screenshot below - it shows only errors in the editor.I'm using 1.43.2 version with C/C++ extension 0.26.3...

View Article

fatal error: Python.h: No such file or directory

I am trying to build a shared library using a C extension file but first I have to generate the output file using the command below:gcc -Wall utilsmodule.c -o Utilc After executing the command, I get...

View Article

Undefined Reference to vTable for constructor and destructor [duplicate]

I have a virtual base class, called AbstractHeap. AbstractHeap has a virtual function, "comp". It also has a (non-virtual) constructor and destructor that should be used by all derived classes, which...

View Article


Setting stack size in cmake with gcc

I am building a C++ project on Linux using gcc 9.2 and cmake 3.15, and I need to increase the default stack size. I found many answers before, but none of them seems to workset(CMAKE_EXE_LINKER_FLAGS...

View Article


How to set gcc 9.0 as default in ubuntu?

I installed GCC 9.3.0 in ubuntu, in a local directory. Which gcc --> data/softwares/gcc-9.3.0/bin/gcc gcc --version --> gcc (GCC) 9.3.0While installing some software's, it is taking default...

View Article

How to suppress GCC compiler warning: inline variables are only available...

I am using an inline global variable which works well for the purpose of it.class MyClass { public: void Func() { } } inline MyClass myClass; // global inline variable Above works well for my purpose...

View Article

Can I use "no_caller_saved_registers" or "interrupt" attribute to write a...

Hi I'm a learner of x86_64 kernel and trying to follow a beginner book to write a simple one.With the chapter of task switch, the author used assembly to push and pop the execution registers. However,...

View Article

Arm G++ compiler with optimizations enabled breaks interrupt handler

I have an application where an interrupt is enabled and inside the handler that the MCU vendor provides for it, I call a static function that's inside a class and requires a single argument, this...

View Article


GCC : can not compile the example in Unqualified Names section of standard

In ISO C++ N4849, [expr.prim.id.unqual] paragraph 2, there is an example:void f() { float x, &r = x; [=] { decltype(x) y1; // y1 has type float decltype((x)) y2 = y1; // y2 has type float...

View Article

Image may be NSFW.
Clik here to view.

C program still misses some output after flushing IO buffer

The following C program misses some output even after flushing the IO buffer.#include <stdio.h> #include <unistd.h> void fork2() { printf("(L0 %d) ", getpid()); fflush(stdout); fork();...

View Article


linking succeeds with clang but not gcc (-llzma on Debian bullseye amd64)

On Debian bullseye (testing), with these xz/lzma-related packages installed: ii liblzma-dev:amd64 5.2.4-1+b1 amd64 ii liblzma5:amd64 5.2.4-1+b1 amd64 ii lzma-dev 9.22-2.1 all Clang generates a working...

View Article

std::call_once throws std::system_error (Unknown error -1)

I was using the C++ OpenCL wrapper and I was wondering why my program crashed. I discovered any call to std::call_once was throwing an error.#include <mutex> int main() { static std::once_flag f;...

View Article


C++11: How to alias a function?

If I have a class Foo in namespace bar:namespace bar { class Foo { ... } }; I can then:using Baz = bar::Foo; and now it is just like I defined the class in my namespace with the name Baz.Is it possible...

View Article

How to link to pistache in Eclipse C++

I fail to link the pistache library in Eclipse C++ on my Ubuntu machine. I already make this reference:Properties > C/C++ Build > Settings > Tool SettingsUnder GCC C++ Linker > Libraries...

View Article

Overriding header search order for nvcc

I have a CUDA project that uses Thrust. Thrust comes with the CUDA Toolkit but I'd like to use a more recent version I've checked out.I invoke nvcc with -isystem=/path/to/thrust but the underlying...

View Article
Browsing all 21994 articles
Browse latest View live


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