Printable Version of Topic

Click here to view this topic in its original format

Linuxhelp _ Programming in Linux _ Makefile Problem W/ Cc And F77 Compiler

Posted by: Coriolis Jun 10 2005, 11:02 AM

Greetings!

I am running some legacy code (originally written for DEC UNIX, source code in C and Fortran) on my LINUX box (Redhat Enterprise 3). It seems to run fine without any problems.

However, I am now in need of making modifications to the code, but I can't seem to compile the code successfully.

I am using the makefile that was originally used for compiling on the UNIX, and am executing the command as follows (the main routine is called pcjoint.c):

make -f Makepcjoint

The report I get is as follows:

Compiling pcjoint.o due to pcjoint.c modification
cc -c -O -lg2c -lc -ltermcap -I/usr/local/track/trackpc/../include pcjoint.c
cc: -lg2c: linker input file unused because linking not done
cc: -lc: linker input file unused because linking not done
cc: -ltermcap: linker input file unused because linking not done
f77 -o pcjoint pcjoint.o -L/usr/local/track/trackpc/../lib -lfile_pcjoint -O -lg2c -lc -ltermcap


Although the makefile successfully creates an executable called pcjoint, it is only half the size of the original executable (compiled on UNIX) and changes I make to the source code (obvious things like adding/modifying print statements) do not "stick"!

I'm very confused about this.

Regarding the "linker input file" messages above. I know this did not show up when I used to compile this code (many, many years ago) on the old UNIX box. I'm guessing there's a compiler problem, but I don't have the background to figure this out myself.

Can someone help me out?

I'm somewhat of a novice in C programming, just enough to be dangerous wink.gif

Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)