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

How to link to an older version math library?

I'm about to release a library (.so) to my client. However, my client's platform is a very old debian(9.1 released on 2017). My libray only works with >= glibc-2.27. I managed to run program by the...

View Article


Qt Kits: two gcc versions; compiles but does not find libgomp.so.1,...

I want build an application on a CENTOS7 computer which requires a higher gcc version as provided by default. Since I do not have sudo rights, I build all dependencies (such as gcc) in my home...

View Article


How to make a string appears at the beginning of the compiled binary executable?

Using GCC and C++11 on both Windows and Debian for armhf.I need to check the version string of an executable to see if my app have to update itself.My "Version string" is made in this way:#define...

View Article

Compile ncftp client for 32 bit target [closed]

System details- Linux Kernel Release(2.6.18-164.el5), Machine Hardware Architecture(i686)I have to compile ncftp client source code on 64 bit architecture to create 32 bit binaries. I don't have admin...

View Article

Linking a compiled assembly and C file with ld

I have compiled these programs: BITS 16 extern _main start: mov ax, 07C0h add ax, 288 mov ss, ax mov sp, 4096 mov ax, 07C0h mov ds, ax mov si, text_string call print_string jmp $ text_string db...

View Article


SYNTAX: what is the correct way to do a forward declaration for a c function?

I am currently tasked with getting code from one device to run on another and have a snippet of the functionality which means I need to shut down or feed the interfaces that are not being fed due to...

View Article

why g++ shows "gets()" not declared ,even after including

#include <cstdio> #include <cstring> #include <iostream> using namespace std; int main() { char str[30]; gets(str); } when i use gets () function compiler gives me the following...

View Article

Change default compiler in make

In my Ubuntu machine, I have a makefile, and I want to compile the project to a different compiler then the default gcc compiler. I read a lot about it, and I tried different methods, including:Adding...

View Article


Compiler error using WCONTINUED option for waitpid()

I am working on an exercise to understand how signals work on a POSIX OS, but I can't figure out how to compile the example. Here is the code that I'm trying to compile:/* file sig_ex3.c: This is a...

View Article


Why my /usr/local/ directory doesn't contain enough c header files like...

(edited according to comments)I'm trying to compile and install gcc-4.6 from source on a Ubuntu 18.04. But it reports errors that indicates I don't have enough headers in /usr/include/ directory. For...

View Article

DllMain not called in cygwin-gcc compiled program

I'm trying to build a DLL with cygwin, but from DbgView, no output is observed:#include <windows.h> __declspec(dllexport) BOOL APIENTRY DllMain( HMODULE hModule, DWORD ul_reason_for_call, LPVOID...

View Article

How do I generate single header for library PCRE2?

How can I generate a single header for library PCRE2? I have included a Minimal, Reproducible Example that demonstrates the problem but for some reason, it will not build correctly. I suspect the order...

View Article

Lambda capture, initializers and nested struct

Could someone explain what is happening here (GCC 7.3):#include <thread> #include <iostream> struct A { struct B {}; }; int main() { int var = 0; std::thread([c=A::B(), var](){ }); //...

View Article


Assembling MULS instruction on ARM with gcc and as

I have the following instruction in an assembly file:MULS R0, R0, R2 This assembles fine using gcc (gcc -o prog pros.s) and the program works. When I use as to assemble (as -o prog.o pros.s) I get:Rd...

View Article

Improve C Build Time on Windows (gcc 3.4.5)

I am programming on an older tech stack and I'd like to improve compile times. I've seen an application called ccache but it looks like it only runs on Unix systems. Is there any other way to improve...

View Article


Where are C header files in gcc 7?

On a linux server which has an old version of gcc (4.4.7), I built gcc 7.4.0 from source code and installed it in a directory within the home.Now I'm not sure how to use it. The directory includes some...

View Article

How to compile and dump assembly for a c library (string.h)?

For a school project I have to do a large amount of string manipulation in assembly. Since this is a pain to do I was trying to come up with innovative ways to use already programmed string operations....

View Article


cmake - preprocess entire project and store output in file

i have a huge arm-none-eabi (gcc) cmake project.i would like to run the entire project and abort after the preprocessor.so example:if i have 500 headers and 600 source files, i would like to get 1100...

View Article

Why is a switch not optimized the same way as chained if else in c/c++?

The following implementation of square produces a series of cmp/je statements like I would expect of a chained if statement:int square(int num) { if (num == 0){ return 0; } else if (num == 1){ return...

View Article

Translate VS inline assembler to GCC inline assembler

I find this C code with inline assembler code:ReadFromCMOS (unsigned char array []) { unsigned char tvalue, index; for(index = 0; index < 128; index++) { _asm { cli /* Disable interrupts*/ mov al,...

View Article
Browsing all 22093 articles
Browse latest View live


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