Re: GCC compiler



On Sat, 28 Apr 2007 22:20:08 -0300
"Iuri Sampaio" <iuri.sampaio@xxxxxxxxx> wrote:

Hi,



I tried to compile a C source code, using make command:



The Makefile script is:



BINDIR = ./

LIBDIR = /foo/im/lib/Linux24

INCLUDE = /foo/im/include



CC = gcc

CFLAGS = -g -I$(INCLUDE)

LIBS = $(LIBDIR)/libim.a $(LIBDIR)/libim.so \
-lm -L/usr/X11R6/lib -lX11

You are linking against libim twice, once static and once dynamic, what you may
mean is

LIBS = -L$(LIBDIR) -lim -lm -L/usr/X11R6/lib -lX11




OBJS = rotation.c

BIN = rotation



$(BIN): $(OBJS)

$(CC) $(CFLAGS) -o $(BIN) $(OBJS) $(LIBS)



install: $(BIN)

mv $(BIN) $(BINDIR)



clean:

rm -f $(BIN) *.o *~







but then I got this error message when I run make



iuri@server1:~/mat056/AULA28.03.07$ make

gcc -g -I../im2_6_linux24/im/include/ -o quantizacao quantizacao.c
../im2_6_Linux24/im/lib/Linux24/libim.a
../im2_6_Linux24/im/lib/Linux24/libim.so -lm -L/u\

sr/X11R6/lib -lX11

quantizacao.c:1:16: error: im.h: No such file or directory

quantizacao.c: In function 'main':

quantizacao.c:12: warning: incompatible implicit declaration of built-in
function 'malloc'


Seems like you are not including stdlib.h so malloc is not defined

quantizacao.c:22: error: 'IM_TIF' undeclared (first use in this function)

quantizacao.c:22: error: (Each undeclared identifier is reported only once

quantizacao.c:22: error: for each function it appears in.)

make: *** [quantizacao] Error 1

HYPERLINK
"mailto:iuri@server1:~/mat056/AULA28.03.07$"iuri@server1:~/mat056/AULA28.03.
07$

I can see it’s missing the im.h of my gcc lib. Does anyone know how to solve
this problem? Even apt-get any lib that has im.h?


what is im.h supposed to be a part of? If you don't know, than where did you
get the code and what's its intent?

There is no debian package that contains im.h or libim.a or libim.so
Only reference I found is national language support for AIX which is a
proprietary UNIX by IBM



Regards,

iuri sampaio


No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.467 / Virus Database: 269.6.1/778 - Release Date: 4/27/2007
1:39 PM




Relevant Pages

  • Re: Making C better (by borrowing from C++)
    ... If you want to use gcc source code you have to put YOUR ... application under the GPL you have to pay BIG bucks to Red Hat. ... When did you last see RedHat employees or shareholders posting here advocating RedHat? ...
    (comp.lang.c)
  • Re: GCC compiler
    ... I tried to compile a C source code, ... The Makefile script is: ... I can see it’s missing the im.h of my gcc lib. ...
    (Debian-User)
  • Re: large files: when ubiquitous?
    ... You don't need to malloc any ... The point of this particular subthread is that gcc is ... have written some broken code, ... And now you complain about gcc being so smart, ...
    (comp.os.linux.development.system)
  • conflicting types for malloc
    ... I cannot install mpack error "conflicting types for malloc" ... checking for gcc... ... checking whether the C compiler is a cross-compiler... ...
    (comp.os.linux.setup)
  • Re: ping source code
    ... > I was reading through original source code of ping for some insight ... a non-standard dialect or the source code is broken. ... I ran it through gcc and it ... > Ping code compile with gcc? ...
    (comp.lang.c)