Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Linux Forums > Linux - Software
User Name
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.


  Search this Thread
Old 01-20-2004, 11:41 AM   #1
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!!!

GCC = cc

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


.SUFFIXES: .ec .c .o

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

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

C_FILES = main.c error.c
EC_FILES = inf/ inf/ inf/ inf/
INF_O_FILES = $(C_FILES:.c=.o) $(

H_FILES = error.h db_err.h DbUpdate_proto.h

INF_PROG = DbUpdate_inf

default: linux

chatr +s enable +b disable $(INF_PROG) > /dev/null 2>&1

clean: clean_inf clean_ora
\rm -f *.jnk *.log core
Old 01-20-2004, 12:37 PM   #2
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!


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 10:21 AM
How to modify or QiangWan Linux - Newbie 1 05-17-2005 11:07 AM
how to get (makefile -f makefile )output into the textview widget in Pygtk sailu_mvn Programming 3 02-28-2005 03:57 AM
generate Makefile from without calling ./configure ? chris78 Programming 2 05-02-2004 12:23 PM
Urgent Urgent !!!! Mozilla Keeps All Your Deleted Emails !!!! odin123 Linux - Software 2 01-31-2004 02:22 AM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:49 PM.

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