Shockburner
July 13th, 2009, 07:59 PM
Hi,
I'm pretty new to Ubuntu, just a few weeks in.
Anyways I have been unsuccessfully trying to compile a program called “galfit” which was written in C. Whenever I try to compile it I get several errors (listed below) that seem to be relate to my C complier or gcc. I have already installed “build-essential” and I have the latest version of gcc. Galfit is a relativity old program and and it is possible that my version of gcc is too new. When I compile galfit (using “make”) it does create a binary, however it does not work properly. Does anybody have any ideas how to solve my problem?
EDIT: I have successfully compiled this program on a computer at work which has some version of redhat and GCC 3.4.6 but not on my Ubuntu :( .
galfit.c: In function ‘blank_img’:
galfit.c:284: warning: format ‘%d’ expects type ‘int’, but argument 3 has type ‘int *’
galfit.c:284: warning: format ‘%d’ expects type ‘int’, but argument 4 has type ‘int *’
galfit.c:284: warning: format ‘%d’ expects type ‘int’, but argument 5 has type ‘int *’
galfit.c:284: warning: format ‘%d’ expects type ‘int’, but argument 6 has type ‘int *’
read_input.c: In function ‘checkpar’:
read_input.c:130: warning: format ‘%s’ expects type ‘char *’, but argument 4 has type ‘char (*)[1025]’
read_input.c:150: warning: format ‘%s’ expects type ‘char *’, but argument 4 has type ‘char (*)[10]’
nrutil.c: In function ‘nrerror’:
nrutil.c:37: warning: ignoring return value of ‘system’, declared with attribute warn_unused_result
outmodel.c: In function ‘outmodel’:
outmodel.c:92: warning: format not a string literal and no format arguments
keypoll.c: In function ‘keypoll’:
keypoll.c:27: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result
fourier.c: In function ‘fourier_pars’:
fourier.c:18: warning: format ‘%c’ expects type ‘char *’, but argument 3 has type ‘char (*)[10]’
edgedisk.c: In function ‘edgedisk’:
edgedisk.c:150: warning: incompatible implicit declaration of built-in function ‘fminf’
bending.c: In function ‘bending_pars’:
bending.c:18: warning: format ‘%c’ expects type ‘char *’, but argument 3 has type ‘char (*)[10]’
initcurses.c: In function ‘initcurses’:
initcurses.c:65: warning: ignoring return value of ‘system’, declared with attribute warn_unused_result
initcurses.c: In function ‘port_search’:
initcurses.c:112: warning: format ‘%s’ expects type ‘char *’, but argument 4 has type ‘char (*)[200]’
initcurses.c:103: warning: ignoring return value of ‘system’, declared with attribute warn_unused_result
initcurses.c:120: warning: ignoring return value of ‘system’, declared with attribute warn_unused_result
I'm pretty new to Ubuntu, just a few weeks in.
Anyways I have been unsuccessfully trying to compile a program called “galfit” which was written in C. Whenever I try to compile it I get several errors (listed below) that seem to be relate to my C complier or gcc. I have already installed “build-essential” and I have the latest version of gcc. Galfit is a relativity old program and and it is possible that my version of gcc is too new. When I compile galfit (using “make”) it does create a binary, however it does not work properly. Does anybody have any ideas how to solve my problem?
EDIT: I have successfully compiled this program on a computer at work which has some version of redhat and GCC 3.4.6 but not on my Ubuntu :( .
galfit.c: In function ‘blank_img’:
galfit.c:284: warning: format ‘%d’ expects type ‘int’, but argument 3 has type ‘int *’
galfit.c:284: warning: format ‘%d’ expects type ‘int’, but argument 4 has type ‘int *’
galfit.c:284: warning: format ‘%d’ expects type ‘int’, but argument 5 has type ‘int *’
galfit.c:284: warning: format ‘%d’ expects type ‘int’, but argument 6 has type ‘int *’
read_input.c: In function ‘checkpar’:
read_input.c:130: warning: format ‘%s’ expects type ‘char *’, but argument 4 has type ‘char (*)[1025]’
read_input.c:150: warning: format ‘%s’ expects type ‘char *’, but argument 4 has type ‘char (*)[10]’
nrutil.c: In function ‘nrerror’:
nrutil.c:37: warning: ignoring return value of ‘system’, declared with attribute warn_unused_result
outmodel.c: In function ‘outmodel’:
outmodel.c:92: warning: format not a string literal and no format arguments
keypoll.c: In function ‘keypoll’:
keypoll.c:27: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result
fourier.c: In function ‘fourier_pars’:
fourier.c:18: warning: format ‘%c’ expects type ‘char *’, but argument 3 has type ‘char (*)[10]’
edgedisk.c: In function ‘edgedisk’:
edgedisk.c:150: warning: incompatible implicit declaration of built-in function ‘fminf’
bending.c: In function ‘bending_pars’:
bending.c:18: warning: format ‘%c’ expects type ‘char *’, but argument 3 has type ‘char (*)[10]’
initcurses.c: In function ‘initcurses’:
initcurses.c:65: warning: ignoring return value of ‘system’, declared with attribute warn_unused_result
initcurses.c: In function ‘port_search’:
initcurses.c:112: warning: format ‘%s’ expects type ‘char *’, but argument 4 has type ‘char (*)[200]’
initcurses.c:103: warning: ignoring return value of ‘system’, declared with attribute warn_unused_result
initcurses.c:120: warning: ignoring return value of ‘system’, declared with attribute warn_unused_result