LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-20-2004, 12:41 PM   #1
rmhaddad
LQ Newbie
 
Registered: Jan 2004
Location: Bay Area, CA, USA
Posts: 11

Rep: Reputation: 0
URGENT: help with Makefile


Hello all,

I have this Makefile (see the bottom of this message) that works fine in Unix, but is giving me problems in Linux. The message that I keep getting is:

/home/informix/bin/esql -O -o DbUpdate_inf -I. -I/home/informix/incl/esql -I/homes/rogerh/dbupdate/inflib/rel6.1 main.o error.o inf/DbUpdate.o inf/db_err.o inf/DbUpdate_6.o inf/create_procedure.o -L /homes/rogerh/dbupdate/inflib/rel6.1 -ldb_genlib -lm
/usr/bin/ld: cannot find -ldb_genlib
collect2: ld returned 1 exit status
make: *** [linux] Error 1


Although db_genlib.a is found in ${IDSDBLIB}/inflib/rel6.1
(IDSDBLIB is defined, verified and all that. ls -l ${IDSDBLIB}/inflib/rel6.1/db_genlib.a produces the right file with read/write permissions to all).
And it's driving me nuts.. I tried copying the library (db_genlib.a) to the current directory and typing -l./db_genlib, still didn't work. Tried all combinations (db_genlib, db_genlib.a).

What is missing here?!

Thank you so much!!!
RH


EXEC_PATH=/home/rmhaddad/work/bin
ESQLC = ${INFORMIXDIR}/bin/esql
GCC = cc

INC = -I. -I${INFORMIXDIR}/incl/esql -I${IDSDBLIB}/inflib/rel6.1
INF_DB_LIB = -L ${IDSDBLIB}/inflib/rel6.1 -ldb_genlib -lm

FLAGS = -O

.SUFFIXES:
.SUFFIXES: .ec .c .o

.ec.c:
@echo
${ESQLC} $(FLAGS) -e $(INC) $*.ec
mv `basename $*.c` $*.c
@echo

.c.o:
@echo
${GCC} $(SP_FLG) -c $(FLAGS) $(INC) $< -o $*.o
@echo

C_FILES = main.c error.c
EC_FILES = inf/DbUpdate.ec inf/db_err.ec inf/DbUpdate_6.ec inf/create_procedure.ec
INF_O_FILES = $(C_FILES:.c=.o) $(EC_FILES:.ec=.o)
INF_TMP_FILES = $(EC_FILES:.ec=.c)

H_FILES = error.h db_err.h DbUpdate_proto.h

INF_PROG = DbUpdate_inf

default: linux

linux: $(INF_TMP_FILES) $(H_FILES) $(INF_O_FILES)
$(ESQLC) $(FLAGS) $(SP_FLG) -o $(INF_PROG) $(INC) $(INF_O_FILES) $(INF_DB_LIB)
chatr +s enable +b disable $(INF_PROG) > /dev/null 2>&1

clean: clean_inf clean_ora
\rm -f *.jnk *.log core
\rm -f $(INF_PROG) $(INF_O_FILES) $(INF_TMP_FILES)
 
Old 01-20-2004, 01:37 PM   #2
rmhaddad
LQ Newbie
 
Registered: Jan 2004
Location: Bay Area, CA, USA
Posts: 11

Original Poster
Rep: Reputation: 0
Found the problem in the gcc man page. The library name should be prefix with 'lib'.

So if you have a line: -ldb_genlib

the the filename should be: libdb_genlib.a

Thanks to all!
RH
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
boot sector and lilo collapse !!!!! URGENT URGENT URGEN !!!!! frelihm Linux - Software 21 12-02-2009 11:21 AM
How to modify makefile.in or makefile.am QiangWan Linux - Newbie 1 05-17-2005 12:07 PM
how to get (makefile -f makefile )output into the textview widget in Pygtk sailu_mvn Programming 3 02-28-2005 04:57 AM
generate Makefile from Makefile.in without calling ./configure ? chris78 Programming 2 05-02-2004 01:23 PM
Urgent Urgent !!!! Mozilla Keeps All Your Deleted Emails !!!! odin123 Linux - Software 2 01-31-2004 03:22 AM


All times are GMT -5. The time now is 09:39 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration