![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| High Level Programming Post questions about C, C++, Java, SQL, and other programming languages here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Unable to create alias | mumashankar | UNIX for Dummies Questions & Answers | 3 | 05-01-2008 07:21 AM |
| Warning message while makefile compilation | nsurendiran | UNIX for Dummies Questions & Answers | 0 | 12-04-2007 01:36 AM |
| Issue with makefile compilation | nsurendiran | UNIX for Dummies Questions & Answers | 3 | 12-03-2007 02:00 AM |
| Issue with Makefile compilation | nsurendiran | High Level Programming | 1 | 12-02-2007 08:16 PM |
| about create Makefile | mzp | High Level Programming | 0 | 11-06-2002 11:18 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
|||
|
Hi ,
While trying to compile a PRO*C code on unix using makefile i get the following errors. i am now working on a 10g migration (from 8i) ... these makefile perfectly work in previous version. ld: fatal: file /usr/users/PLAT/cltxm25/ccm_wa/ssd/SSD.Server-cltxm251/SSD.Server/ssdArther/Arther: unknown file type ld: fatal: File processing errors. No output written to Arther *** Error code 1 make: Fatal error: Command failed for target `Arther' Arther is the executable which must be ultimately created. What could be the cause of error ? Below is a code snippet of my makefile Arther: arther.o strings.o Useful.o ld -dy $(COMPOBJS) $(LDSTRING) $(LDFLAGS) -o $(PROC_PREFIX)Arther $(PROC_PREFIX)arther.o $(CODEO)strings.o $(CODEO)Us eful.o $(GETTLV_PREFIX)get_tlv.o $(GETTLV_PREFIX)reschedule_update.o $(GETTLV_PREFIX)put_tlv.o $(GETTLV_PREFIX)complete_updat e.o $(GETTLV_PREFIX)update.o $(GETTLV_PREFIX)rollback_update.o $(PROLDLIBS) $(RDBMSLIBS) -lbase -lgen $(SYSLIBS) strings.o: $(CODEC)strings.c $(CODEH)global.h \ $(CODEH)strings.h $(CC) $(CFLAGS) -g -c $(CODEC)strings.c -o $(CODEO)strings.o arther.o: $(CODEH)global.h \ $(CODEH)strings.h $(CODEH)global.h $(CODEH)arther.h $(PROC) $(PROCPLSFLAGS) $(PROFLAGS) iname=$(PROC_PREFIX)arther.pc include=$(CODEH) $(CC) $(CFLAGS) -g $(PRECOMPPUBLIC) -c $(PROC_PREFIX)arther.c -o $(PROC_PREFIX)arther.o Useful.o: $(CODEH)global.h \ $(CODEH)strings.h $(CODEH)global.h $(CODEH)Useful.h $(PROC) $(PROCPLSFLAGS) $(PROFLAGS) iname=$(CODEC)Useful.pc include=$(CODEH) $(CC) $(CFLAGS) -g $(PRECOMPPUBLIC) -c $(CODEC)Useful.c -o $(CODEO)Useful.o Also what is the use of these varibles $(COMPOBJS) $(LDSTRING) $(LDFLAGS) ?? should i modify these varibles ?? Any help in this regard is highly appreciated. Thanks in Advance Regards, Siva |
| Forum Sponsor | ||
|
|
|
|||
|
Quote:
99% of my makefiles have " -o $@ " so the output file is exactly the same as the rule product. I only use $(LD) to link shared libraries, I use $(CC) or $(CXX) to link applications. |
|
|||
|
fatal: library -lbase: not found
Hi porter,
i had pasted only a portion of my makefile... $(PROC_PREFIX) is defined correctly ... sorry for not mentioning that... i modified my makefile little bit like, LDFLAGS=-o COMPSOBJS32 . After making the changes , i am getting the errors like, ld -dy /opt/SUNWspro/prod/lib/crti.o /opt/SUNWspro/prod/lib/crt1.o /opt/SUNWspro/prod/lib/crtn.o -o /usr/users/PLAT/cltxm25/ccm_wa/ssd/SSD.Server-cltxm251/SSD.Server/ssdArther/Arther /usr/users/PLAT/cltxm25/ccm_wa/ssd/SSD.Server-cltxm251/SSD.Server/ssdArther/arther.o /usr/users/PLAT/cltxm25/ccm_wa/ssd/SSD.COMMON_CODE-cltxm25/SSD.COMMON_CODE/code.o/strings.o /usr/users/PLAT/cltxm25/ccm_wa/ssd/SSD.COMMON_CODE-cltxm25/SSD.COMMON_CODE/code.o/Useful.o /usr/users/PLAT/cltxm25/ccm_wa/ssd/ssdGettlv-cltxm25/ssdGettlv/get_tlv.o /usr/users/PLAT/cltxm25/ccm_wa/ssd/ssdGettlv-cltxm25/ssdGettlv/reschedule_update.o /usr/users/PLAT/cltxm25/ccm_wa/ssd/ssdGettlv-cltxm25/ssdGettlv/put_tlv.o /usr/users/PLAT/cltxm25/ccm_wa/ssd/ssdGettlv-cltxm25/ssdGettlv/complete_update.o /usr/users/PLAT/cltxm25/ccm_wa/ssd/ssdGettlv-cltxm25/ssdGettlv/update.o /usr/users/PLAT/cltxm25/ccm_wa/ssd/ssdGettlv-cltxm25/ssdGettlv/rollback_update.o -l clntsh `cat /u01/app/oracle/product/10.2.0/lib32/ldflags` -lthread -lbase -lgen -lmqm -lmqmcs -lmqmzse -lthread -ldl -lsocket -lnsl ld: fatal: library -lbase: not found ld: fatal: library -lmqm: not found ld: fatal: library -lmqmcs: not found ld: fatal: library -lmqmzse: not found ld: fatal: File processing errors. No output written to /usr/users/PLAT/cltxm25/ccm_wa/ssd/SSD.Server-cltxm251/SSD.Server/ssdArther/Arther *** Error code 1 make: Fatal error: Command failed for target `Arther' Any help in this regard is Appreciated... Siva |
|
|||
|
You need an -Ldirectory for the paths to the MQseries libraries.
|
|
|||
|
That is awful if you need the "-o" in LDFLAGS. The -o option is a standard option and preceedes the output file designation, this works for ld, cc, c89, gcc, CC, etc.
LDFLAGS, CFLAGS and CXXFLAGS should contain things like optimatizations, code generation options, environment options etc. One of the few things that should not really go in there is "-o". Looks like you started with a very poor makefile. |
|||
| Google The UNIX and Linux Forums |
| Thread Tools | |
| Display Modes | |
|
|