tagged [gcc]

How to compile a static library in Linux?

How to compile a static library in Linux? I have a question: How to compile a static library in Linux with `gcc`, i.e. I need to compile my source code into a file named out.a. Is it sufficient to sim...

28 Dec at 13:0

Do I need to compile the header files in a C program?

Do I need to compile the header files in a C program? Sometimes I see someone compile a C program like this: `gcc -o hello hello.c hello.h` As I know, we just need to put the header files into the C p...

2 Sep at 10:31

"Agreeing to the Xcode/iOS license requires admin privileges, please re-run as root via sudo." when using GCC

"Agreeing to the Xcode/iOS license requires admin privileges, please re-run as root via sudo." when using GCC While attempting to compile my C program, running the following command: Returns: > Agreei...

26 Sep at 18:39

Nintendo DS homebrew with Ada?

Nintendo DS homebrew with Ada? Note: I know very little about the GCC toolchain, so this question may not make much sense. Since GCC includes an Ada front end, and it can emit ARM, and devKitPro is ba...

29 Sep at 05:59

gcc: undefined reference to

gcc: undefined reference to I would like to compile this. Running this gives error ``` /tmp/ccxMLBme.o: In function `main': program.c:(.text+0x18): undefined reference to `avpicture_get_size' collect2...

26 Sep at 06:46

Disable all gcc warnings

Disable all gcc warnings I'm working on a project that will read compiler error messages of a particular variety and do useful things with them. The sample codebase I'm testing this on (a random open-...

21 Sep at 03:6

How to include header files in GCC search path?

How to include header files in GCC search path? I have the following code in a sample file: However, this code is located in various folders within /home/me/development/skia (whic

8 Nov at 12:40

Change GCC version used by bjam

Change GCC version used by bjam I am trying to build a library (luabind) with bjam. I came across an error and it seems like the problem is that I need to compile with gcc 4.2, but the default on this...

25 Aug at 11:34

How to use/install gcc on Mac OS X 10.8 / Xcode 4.4

How to use/install gcc on Mac OS X 10.8 / Xcode 4.4 I have install Mountain Lion (Mac OS X 10.8) and now gcc doesn't seem to be available anymore. I've also installed Xcode 4.4 so there is no more /De...

19 Feb at 21:32

How to update GCC in MinGW on Windows?

How to update GCC in MinGW on Windows? I'm used to manually install GCC from source before on Ubuntu and it was a painful process. So I really don't want to do repeat this process. Currently, I have M...

12 Mar at 10:46

Where is the <conio.h> header file on Linux? Why can't I find <conio.h>?

Where is the header file on Linux? Why can't I find ? > [How to implement getch() function of C in Linux?](https://stackoverflow.com/questions/3276546/how-to-implement-getch-function-of-c-in-linux) ...

29 May at 16:35

How can I compile without warnings being treated as errors?

How can I compile without warnings being treated as errors? The problem is that the same code that compiles well on Windows, is unable to compile on [Ubuntu](https://en.wikipedia.org/wiki/Ubuntu_%28op...

7 Aug at 19:46

How to disable GCC warnings for a few lines of code

How to disable GCC warnings for a few lines of code In Visual C++, it's possible to use [#pragma warning (disable: ...)](https://msdn.microsoft.com/en-us/library/2c8f766e.aspx). Also I found that in G...

15 Nov at 22:41

How to compile a 32-bit binary on a 64-bit linux machine with gcc/cmake

How to compile a 32-bit binary on a 64-bit linux machine with gcc/cmake Is it possible to compile a project in with `cmake` and `gcc` on a system? It probably is, but how do I do it? When I tried it t...

30 Aug at 21:35

how to install gcc on windows 7 machine?

how to install gcc on windows 7 machine? I have MinGW on my windows 7 machine. I wish to install and use complete gcc for C compiler. I found there is no single pre-compiled ready-made installation fi...

18 Jun at 08:16

Using GCC to produce readable assembly?

Using GCC to produce readable assembly? I was wondering how to use [GCC](http://en.wikipedia.org/wiki/GNU_Compiler_Collection) on my C source file to dump a mnemonic version of the machine code so I c...

1 May at 04:13

Removing trailing newline character from fgets() input

Removing trailing newline character from fgets() input I am trying to get some data from the user and send it to another function in gcc. The code is something like this. However, I find that it has a...

14 Mar at 06:23

How can I link to a specific glibc version?

How can I link to a specific glibc version? When I compile something on my Ubuntu Lucid 10.04 PC it gets linked against glibc. Lucid uses 2.11 of glibc. When I run this binary on another PC with an ol...

26 Oct at 17:14

What is a file with extension .a?

What is a file with extension .a? I downloaded this: [https://github.com/mongodb/mongo-c-driver](https://github.com/mongodb/mongo-c-driver) And now I'm trying to use it inside my C program, but I don'...

26 Nov at 17:19

How do I fix "for loop initial declaration used outside C99 mode" GCC error?

How do I fix "for loop initial declaration used outside C99 mode" GCC error? I'm trying to solve [the 3n+1 problem](http://uva.onlinejudge.org/external/1/100.pdf) and I have a `for` loop that looks li...

30 Oct at 19:35

Setting per-file flags with automake

Setting per-file flags with automake Is there a way set flags on a per-file basis with automake? In particular, if I have a c++ project and want to compile with -WAll all the files except one for whic...

29 Sep at 17:36

Compile error: "g++: error trying to exec 'cc1plus': execvp: No such file or directory"

Compile error: "g++: error trying to exec 'cc1plus': execvp: No such file or directory" When I compile C/C++ program with `popen` in `php`... I got this error: but if I run php code in shell.. it work...

16 Jul at 23:49

How to include static library in makefile

How to include static library in makefile I have the following makefile I am trying to include the `./libmine` library within `CXXFLAGS`, but it seems like it is not the right way to include a static ...

5 Jul at 13:6

How to specify new GCC path for CMake

How to specify new GCC path for CMake My OS is centos which has a default gcc in path `/usr/bin/gcc`. But it is old, I need a new version of gcc. So I install a new version in a new path `/usr/local/b...

29 Mar at 02:16

How to fix linker error "cannot find crt1.o"?

How to fix linker error "cannot find crt1.o"? I have a virtual Debian system which I use to develop. Today I wanted to try llvm/clang. After installing clang I can't compile my old c-projects (with gc...

24 Sep at 18:5