I created a C file in Eclipse on Windows and then used Cygwin to navigate to the directory. I called gcc on the C source file and a.exe was produced. How ... |
I'm trying to use GDB to debug (to find an annoying segfault). When I run:
gdb ./filename
from the command line, I get the following error:
This GDB was configured as "i686-pc-linux-
gnu"..."/path/exec": not ...
|
I'm having a lot of trouble building a 'middleman' logger - the intention is to place it on the path above an item in /usr/bin and capture everything going to and ... |
I'm trying to create an object file which can be useable in any computer. So what I did was create bunch of functions and placed them in a .c file. Used ... |
I want to compile an application with debug information using gcc and gdb. When I do the following, the debug (.dSYM) files are generated correctly:
gcc -ggdb src/test.c -o build/test
If I, however, ... |
I'm getting the following error when trying to compile my program:
calling fdopen: Bad file descriptor
I've read this might be a problem related to including a precompiled header in one of ... |
I want to print my whole file compilation options on make in my console on build.
For example on compiling test1.c test2.c test3.c using make
should print like
cc -g -O1 ...
|
|
I want to supply the shared libs along with my program rather than using the target system's due to version differences:
ldd says my program uses these shared libs:
linux-gate.so.1 => (0xf7ef0000)(made ... |
Let's say I have a source file, say helper.c, which gets compiled into an object library (helper.a). Now, this uses functionality from many system libraries, so currently when I want ... |
I am trying to run the C files downloaded from here as follows :
gcc main.c docs_file.txt ksg_file.txt
However, I receive the following error:
/usr/bin/ld:docs_file.txt: file format not recognized; treating as linker ...
|
I tried to compile sigintr.c in DD-WRT/src/router/rflow with arm-linux-gcc. The problem I encountered is:
sigintr.o: In function siginterrupt':
sigintr.c:(.text+0x88): undefined reference to_sigintr'
... |
Hey, as an exercise to learn more precisely how c programs work and what minimum level of content must exist for a program to be able to use libc, ive taken ... |
Is is possible to put something at the top of the C source file, like
// GCC_OPTIONS=-g,-Wall
that will add those options automatically to gcc every time you compile this file?
|
Possible Duplicate:
Why Am I Getting Link Errors When Calling Function in Math.h?
Hello, I have a problem in C (gcc), when I compile a program ... |
This my program where it takes 10 integers and finds out if even or odd and stores them in respective files.I use gcc.
#include<stdio.h>
int main()
{
int a,i;
FILE *fp1,*fp2,*fp3;
fp1=fopen("data","w");
for(i=0;i<10;i++)
{
scanf("%d",&a);
putw(a,fp1);
}
fclose(fp1);
fp1=fopen("data","r");
fp2=fopen("even","w");
fp3=fopen("odd","w");
while((a=getw(fp1))!=EOF)
if(a%2==0)
putw(a,fp2);
else
putw(a,fp3);
fclose(fp1);
fclose(fp2);
fclose(fp1);
return 0;
}
I get this after entering ... |
i'm new on gcc compiler.
My friend wrote this script (graphic filter) for me but i can't use it because i receive some error.
I have 2 directory and a C file:
-dir- include ...
|
I'm trying to build a shared library in Cygwin using an i686-elf cross-compiler. The code is very simple:
int add(int a, int b) {
return a + b;
}
void _init() ...
|
I have a set of C files to compile using gcc and make. The build process works fine.
I want to know if I can obtain - during compilation - one C ... |
How much effect does having multiple files or compiled libraries vs. throwing everything (>10,000 LOC) into one source have on the final binary? For example, instead of linking a Boost library ... |
How to create a shared object file from a static library? I am using Cygwin.
Is the following syntax correct?
gcc -shared -o libexample.so libexample.a
|
So we have for example ffmpeg that can be compiled into > than 4 libraries. Is it possible using GCC to compile\collect not into .a or .so libraries but into some ... |
So I try to compile ffmpeg as I described here after this patch I started seeing .l.bc files but no .swc files. So how to use alchemy completion ... |
I'm using MPLAB C32. I want to map my peripherals in streams, in order to do something like:
FILE* uart2 = fopen("UART2", 9600, param2, param3);
or just
FILE* uart2 = fopen("UART");
and then use ... |
Hello Stack Overflow Community,
i am working on a c project to interleave multiple c programs into one binary, which can run the interleaved programs as treads or forks for benchmarking purposes.
Therefore ... |
Here's the deal. I've had two identical global variables in two different .c files, they weren't declared as extern. So each .c file should have seen its own variable, right?
But I ... |
Duplicate identifiers are simply ignored by the archiver and also by the linker. They are detected only if the source or object files are passed directly to gcc, which considers multiple ... |
I have a directory called "aos" in which i have the results of the make, namely .o file and .a file.
My test case file in a directory called "test1" which is ... |
I have worked on a project where I was using g++ to compile C code in files that end in .c. The reason is that I'm told that g++ has better ... |
OK, I just began learning C language, and I read a lot of people suggest to use MinGW as a compiler. I downloaded, installed it and set it correctly (I think) ... |
I have the following structure:
Source_code/build/unix/Makefile
Source_code/code/Lib/src/lib1/a.c
The -fprofile-arcs and -ftest-coverage options are mentioned in the gcc compilation option. It successfully generates the a.gcda and a.gcno files. And when given the following option gcov ... |
How do I generate a.out file format with gcc on x86 architectures ?
With nasm I can do this easily with -f flag, for example:
[user@host]$ nasm -f aout start.asm
[user@host]$ objdump -a ...
|
|
Hi,everyone I'm using gcc to compile a program with a thirdpart framework. but i find some precompile in *.h file of framework like this #include So, when i compile my program,gcc will return some error to tell that cann't find the path DKFramework. then my question is how to let gcc know DKFramework equal to which dir, how can i ... |
Hello All! When I compile my c++ program using the Linux gcc compiler and the make file listed below, I get a whole bunch of additional diagnostics files saved on disk (presumably generated by the omp.h). Does anyone know how to suppress this (a flag?). Thanks a lot! Serguei *** I am sorry for posting this in a wrong forum *** ... |
|
Just a follow up post on a strange and very difficult problem I finally cracked, yet in actual fact it was very simple. I'd written a 11000+ line program that was on a single file. It compiled and ran successfully on a Linux system and when I tried installing it on another Unix system while it compiled fine it would not ... |
I don't know why I couldn't compile this testcase. Here is the command line.. --snip-- gcc -o conftest -g -O2 -L/usr/local/mysql/lib -L/usr/local/mysql/lib -L/usr/local/ssl/lib -L/usr/local/ssl/lib -L/usr/local/lib -L/usr/local/lib -lmysqlclient -lz -lcrypt -lnsl_r -lm conftest.c -lmysqlclient -liconv -lssl -lcrypto -lcurl -lssl -lcrypto -lm -lcurl -lssl -lcrypto --snip-- but a far simpiler command line is --snip-- gcc -o conftest -g -O2 -L/usr/local/mysql/lib -lmysqlclient conftest.c -lmysqlclient ... |
CC = /usr/bin/gcc GCCFLAGS = -c -Wall ROOTDIR = . SRCDIR = $(ROOTDIR)/src OBJDIR = $(ROOTDIR)/obj VPATH = src:obj:include OBJ = $(OBJDIR)/assess.o $(OBJDIR)/frequency.o $(OBJDIR)/blockFrequency.o \ $(OBJDIR)/cusum.o $(OBJDIR)/runs.o $(OBJDIR)/longestRunOfOnes.o \ $(OBJDIR)/serial.o $(OBJDIR)/rank.o $(OBJDIR)/discreteFourierTransform.o \ $(OBJDIR)/nonOverlappingTemplateMatchings.o \ $(OBJDIR)/overlappingTemplateMatchings.o $(OBJDIR)/universal.o \ $(OBJDIR)/approximateEntropy.o $(OBJDIR)/randomExcursions.o \ $(OBJDIR)/randomExcursionsVariant.o $(OBJDIR)/linearComplexity.o \ $(OBJDIR)/dfft.o $(OBJDIR)/cephes.o $(OBJDIR)/matrix.o \ $(OBJDIR)/utilities.o $(OBJDIR)/generators.o $(OBJDIR)/genutils.o assess: $(OBJ) $(CC) -o $@ $(OBJ) -lm $(OBJDIR)/assess.o: $(SRCDIR)/assess.c defs.h ... |
|