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

MinGW32/64 and GCC: Installing and Upgrading on windows using cmd

I have already installed MinGW32. I want to update MinGW32, GCC, and G++ on the latest available version. I have searched on the internet and overflow but the answers seem to be outdated. One of the...

View Article


C string literal as parameter equals -1 in avr-gcc?

I am developing a software for AVR microcontroller. Saying in fromt, now I only have LEDs and pushbuttons to debug. The problem is that if I pass a string literal into the following function:void...

View Article


libstdc++& libgcc forward compatibility

According to the GCC ABI Policy and Guidelines page I get that they try to maintain forward compatibility but I wonder to what extend this is true or if I'm missing something.I am currently trying to...

View Article

Where is PATH_MAX defined in Linux?

Which header file should I invoke with #include to be able to use PATH_MAX as an int for sizing a string?I want to be able to declare:char *current_path[PATH_MAX];But when I do so my compiler...

View Article

Symbol lookup error (How to link a shared library with another library)

I am running my program on Ubuntu20.04. My program produced the following error when using several Kaldi libraries:symbol lookup error: /home/Documents/xxx/libkaldi-chain.so: undefined symbol:...

View Article


GCC: Random builds causing Segmentation Fault during execution

I'm currently struggle to unterstand a certain behavior which randomly happens after a software build. The software consists of multiple modules and, after building it, it will exit with a segmentation...

View Article

Why does gcc link with '-z now' by default, although lazy binding is the...

man ld has the following to say about -z lazy:...tell the dynamic linker to defer function call resolution to the point when the function is called ... Lazy binding is the default.On the other hand,...

View Article

Installing xgboost to AWS EC2 Linux instance

I have a django project which it's been deployed to Elastic Beanstalk and i have to use xgboost in that. I cannot install xgboost via adding it to my requirements.txt file. I'm trying to build it on...

View Article


Difference between -pthread and -lpthread while compiling

What is the difference between gcc -pthread and gcc -lpthread which is used while compiling multithreaded programs?

View Article


Cannot read sectors from disk in C

I'm using an i686-elf-gcc cross compiler to generate code to run in real-mode.I'm trying to read a sector from my kernel. I know this is the location where my kernel is located, in the second sector,...

View Article

Actual default linker script and settings gcc uses

Where can I find the actual linker script and settings gcc uses?Things I've tried:For concreteness, let's consider a small program: empty.c int main(void){ return 0;}build it statically, and look at...

View Article

CUDA incompatible with my gcc version

I have troubles compiling some of the examples shipped with CUDA SDK.I have installed the developers driver (version 270.41.19) and the CUDA toolkit,then finally the SDK (both the 4.0.17...

View Article

Estimate ELF size based on linker memory length

How much of an overhead does an ARM elf file add to an application's final size? For example, say I reserve 10K in my linker for an application. Now, can I estimate how big the elf would be? I use the...

View Article


g++ much slower on multiple files vs. monolithic single file using Google mock

I'm having a problem that appears to be g++ related. Basically, g++ takes substantially more time to compile a program when it is split into multiple files versus a single monolithic file. In fact, if...

View Article

How to force compiler to generate conditional move by using inline assembly

I've spent several hours trying to convert the following code to inline assembly (GCC) but in vain:int new_low = mid + 1;int new_high = mid - 1;if (middle < key) { low = new_low;}if (!(middle <...

View Article


/RTC alternative for gcc/linux environment

Im using /RTC compilation flag for building my code under windows.Is there equivalent for linux environment, especially gcc compiler?

View Article

Why does GCC emit a repeated `ret`?

In the C++ example below, I define a function that computes the height of the leftmost path of a tree.struct TreeNode { int value{}; TreeNode *l = nullptr; TreeNode *r = nullptr;};int...

View Article


Is it possible to have gcc analyze my code and give me info about it [closed]

I want to write a script that analyzes a C header file, that contains one function declaration, and returns the number of arguments this function has.how can this be done?

View Article

expected primary-expression before ‘)’ token [duplicate]

Why GCC refuses to compile this code, and how to fix it?template<size_t ch>class ChannelsData{ std::array<int, ch> vals;public: template<size_t i> inline int& at() {...

View Article

how to analyze a C header file? [duplicate]

I want to write a script that analyzes a C header file.The header contains a few declarations of functionsThe scrip needs to understand how many arguments each function has, and what are their...

View Article
Browsing all 22059 articles
Browse latest View live


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