473,513 Members | 2,319 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

compiling problems

Good day Everyone,

I am a still very new at learning C and I have thrown myself in the
deep end. I started with a simple program and kept widening the scope.
This has taught me many things about C and some, I must admit, have not
really sunk in yet. Still, I push on. Now I am taken a library of C
programs that were designed to read HDF files. I work on a Unix server
and in Mandrake10. The program below is most likely broken but I cannot
solve any problem unitl I get pass my current problem in compiling. All
the codes that I need: *.c and *.h are located in directory given in
the compilation command:

cc -g msgpps_functions.c -I/data/proj/safworks/MSG_PPS_COMP/c_codes

And I get the following oputput that baffles me:

/home/tmp/ccAn0IYi.o(.text+0x67f): In function `readHDF':
/data/proj/safworks/MSG_PPS_COMP/c_codes/msgpps_functions.c:197:
undefined reference to `initHlHdf'
/home/tmp/ccAn0IYi.o(.text+0x694):/data/proj/safworks/MSG_PPS_COMP/c_codes/msgpps_functions.c:201:
undefined reference to `readHL_NodeList'
/home/tmp/ccAn0IYi.o(.text+0x6cc):/data/proj/safworks/MSG_PPS_COMP/c_codes/msgpps_functions.c:207:
undefined reference to `selectNode'
/home/tmp/ccAn0IYi.o(.text+0x6fc):/data/proj/safworks/MSG_PPS_COMP/c_codes/msgpps_functions.c:212:
undefined reference to `fetchMarkedNodes'
/home/tmp/ccAn0IYi.o(.text+0x70d):/data/proj/safworks/MSG_PPS_COMP/c_codes/msgpps_functions.c:214:
undefined reference to `getNode'
/home/tmp/ccAn0IYi.o(.text+0x87b):/data/proj/safworks/MSG_PPS_COMP/c_codes/msgpps_functions.c:243:
undefined reference to `freeHL_NodeList'
collect2: ld returned 1 exit status

Now, I have included the code but not the dependencies -- thought that
that would be too much. I would really like to know why this
compilation problem arose. All of the functions mentioned above are
declared in one or another of the dependencies in the path given and
the #include files.

Appreciate the help,

Sheldon

************************************************** ********************************************
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#include <read_vhlhdf.h>
#include <read_hlhdf.h>
#include <hlhdf.h>
#include <sys/types.h>
#include <dirent.h>
#include <vhlhdf.h>

#define ROW 1215
#define COL 1215
#define Auxdatadir "/data/proj/safworks/sheldon/MSG_PPS_COMP/data/aux/"
#define Region "ibla_57n20e"
#define Date 200512

static int inithdf = 1; // Är 1 om initHlHdf ej har anropats, 0
annars. This routine must be run
int readHDF(float** , char *hdfname, char *fieldname);

// Variable Declaration
char Filename[] =
"/data/proj/safworks/sheldon/MSG_PPS_COMP/data/aux/test_array.dat";
char Reprodir[100];
char Physdata[100];
//************************************************** ************************************************** *****
struct hdfstruct {
float** latitude;
float** longitude;
float** landuse;
float** fractofland;
float** sunangle;
float** viewingangle;
};

int main(void) {

struct hdfstruct hdfdata;
FILE *fp = NULL;
double** array;
int i, j, num, stat;
int dataprecision = 4;
unsigned char** tmp;
double count;
char* strp;
char Latfile[150];
char Lonfile[150];
char hdfname[] =
"/data/proj/safworks/pps_v11/import/AUX_data/remapped/physiography.ibla_35n00e.hdf";
char latfile[150];
// Putting the file strings together for lat and long files
strcpy(Latfile,Auxdatadir);
strcat(Latfile,Region);
strcat(Latfile,"_lat.data");
strcpy(Lonfile,Auxdatadir);
strcat(Lonfile,Region);
strcat(Lonfile,"_lon.data");
strcpy(latfile,Auxdatadir);
strcat(latfile,Region);
strcat(latfile,"_latlon.h5");

printf("\n%s\n\n", Latfile);
printf("%s\n\n", Lonfile);

// allocate memory with error checking for lon and lat files
hdfdata.latitude = calloc(ROW,sizeof(float *));
hdfdata.longitude = calloc(ROW,sizeof(float *));
hdfdata.landuse = calloc(ROW,sizeof(float *));
hdfdata.fractofland = calloc(ROW,sizeof(float *));
hdfdata.sunangle = calloc(ROW,sizeof(float *));
hdfdata.viewingangle = calloc(ROW,sizeof(float *));

if(hdfdata.latitude == NULL ||
hdfdata.longitude == NULL ||
hdfdata.landuse == NULL ||
hdfdata.fractofland == NULL ||
hdfdata.sunangle == NULL ||
hdfdata.viewingangle == NULL) { // Memory for the ROWS
fprintf(stderr, "Failed to allocate memory");
return EXIT_FAILURE;
}
for (i = 0; i < ROW; i++) {
hdfdata.latitude[i] = calloc(COL,sizeof(float));
hdfdata.longitude[i] = calloc(COL,sizeof(float));
hdfdata.landuse[i] = calloc(COL,sizeof(float));
hdfdata.fractofland[i] = calloc(COL,sizeof(float));
hdfdata.sunangle[i] = calloc(COL,sizeof(float));
hdfdata.viewingangle[i] = calloc(COL,sizeof(float));
if(hdfdata.latitude == NULL ||
hdfdata.longitude == NULL ||
hdfdata.landuse == NULL ||
hdfdata.fractofland == NULL ||
hdfdata.sunangle == NULL ||
hdfdata.viewingangle == NULL) { // Memory for the COLS
fprintf(stderr, "Failed to allocate memory");
return EXIT_FAILURE;
}
}
// Reading the hdf data into the arrays
stat = readHDF(hdfdata.latitude,latfile,"/LAT");
if (stat == 0) {
fprintf(stderr, "Failed reading latitude hdf");
return EXIT_FAILURE;
}

if((tmp=calloc(ROW,sizeof(float *))) == NULL) { // Memory for the
ROWS
fprintf(stderr, "Failed to allocate memory");
return EXIT_FAILURE;
}

for (i = 0; i < ROW; i++) {
if((tmp[i]=calloc(COL,sizeof(float))) == NULL) { // Memory for the
COLS
fprintf(stderr, "Failed to allocate memory");
return EXIT_FAILURE;
}
}

// Opening and reading lon and lat files
printf("Opening lat file: %s\n",Latfile);
if ((fp = fopen(Latfile, "rb")) == NULL) {
fprintf(stderr, "Error opening file %s in read mode.\n", Latfile);
fclose(fp);
goto fail;
}
else
printf("File opened successfully.\n\n");

printf("Reading said file.\n\n");
if (ROW*COL*4 != fread(tmp, sizeof(unsigned char), ROW*COL*4, fp)) {
fprintf(stderr, "Error reading file: %s\n", Latfile);
fclose(fp);
goto fail;
}
else {
printf("File read successfully.\n\n");
fclose(fp);
}

// allocate memory with error checking test array
if((array=calloc(ROW,sizeof(double *))) == NULL) { // Memory for the
ROWS
fprintf(stderr, "Failed to allocate memory");
return EXIT_FAILURE;
}

for (i = 0; i < ROW; i++) {
if((array[i]=calloc(COL,sizeof(double))) == NULL) { // Memory for
the COLS
fprintf(stderr, "Failed to allocate memory");
return EXIT_FAILURE;
}
}

// display read array for debuging
printf("Printing array\n");
for (i = 0; i < 5; i++) {
printf("latitudes[%d,%d] = \t%f\n", i,j, hdfdata.latitude[i,j]);
}

fail:
if(array) {
for (i = 0; i < ROW; i++) {
free(array[i]);
}
free(array);
}
return EXIT_FAILURE;
}

int readHDF(float **arp, char *hdfname, char *fieldname) {

HL_NodeList *nodelist = NULL; // These are take from read_vlhdf.h
where some explanation is given
HL_Node *cloudproduct; // These are pointers to structures
HL_Node *dataset;
HL_CompoundTypeAttribute *attr; // pointer to structure
int i, xsize, ysize;
int dataprecision = sizeof(float);

if (inithdf) {
initHlHdf();
inithdf = 0;
}

nodelist = readHL_NodeList(hdfname);
if (!nodelist) {
fprintf(stderr, "Error reading hdf-file: %s\n", hdfname);
goto error;
}

if (!selectNode(nodelist, fieldname)) {
fprintf(stderr, "Dataset in %s was not found in %s.\n",fieldname,
hdfname);
goto error;
}

fetchMarkedNodes(nodelist); // gets the data from selected dataset

cloudproduct = getNode(nodelist, fieldname);

if (!cloudproduct) {
fprintf(stderr, "Error reading data from %s\n", hdfname);
goto error;
}
for (i = 0; i < cloudproduct->compoundDescription->nAttrs; i++) {
attr = cloudproduct->compoundDescription->attrs[i];
if(0 == strcmp(attr->attrname, "xsize")) {
xsize = *((int *)&cloudproduct->data[attr->offset]);
} else if (0 == strcmp(attr->attrname,"ysize")) { // checking to
see if there is such an attribute
ysize = *((int *)&cloudproduct->data[attr->offset]); // casting
from binary to int
}
}

if (xsize != COL || ysize != ROW) {
if (xsize <= 0 || ysize <= 0) {
fprintf(stderr, "Error: hdf-file has undefined size.\n");
goto error;
} else {
fprintf(stderr,
"Warning: hdf-file has unexpected size: %d×%d\n",
xsize, ysize);
}
}

memcpy(arp, cloudproduct->data, ROW * COL * dataprecision); // This
converts the data from binary to float

error: {
if (nodelist) freeHL_NodeList(nodelist);
if (arp) free(arp);
return (0);
}
return (1);
}

Oct 28 '06 #1
9 2181
Sheldon wrote:
Good day Everyone,

I am a still very new at learning C and I have thrown myself in the
deep end. I started with a simple program and kept widening the scope.
This has taught me many things about C and some, I must admit, have not
really sunk in yet. Still, I push on. Now I am taken a library of C
programs that were designed to read HDF files. I work on a Unix server
and in Mandrake10. The program below is most likely broken but I cannot
solve any problem unitl I get pass my current problem in compiling. All
the codes that I need: *.c and *.h are located in directory given in
the compilation command:

cc -g msgpps_functions.c -I/data/proj/safworks/MSG_PPS_COMP/c_codes

And I get the following oputput that baffles me:

/home/tmp/ccAn0IYi.o(.text+0x67f): In function `readHDF':
/data/proj/safworks/MSG_PPS_COMP/c_codes/msgpps_functions.c:197:
undefined reference to `initHlHdf'
/home/tmp/ccAn0IYi.o(.text+0x694):/data/proj/safworks/MSG_PPS_COMP/c_codes/msgpps_functions.c:201:
undefined reference to `readHL_NodeList'
/home/tmp/ccAn0IYi.o(.text+0x6cc):/data/proj/safworks/MSG_PPS_COMP/c_codes/msgpps_functions.c:207:
undefined reference to `selectNode'
/home/tmp/ccAn0IYi.o(.text+0x6fc):/data/proj/safworks/MSG_PPS_COMP/c_codes/msgpps_functions.c:212:
undefined reference to `fetchMarkedNodes'
/home/tmp/ccAn0IYi.o(.text+0x70d):/data/proj/safworks/MSG_PPS_COMP/c_codes/msgpps_functions.c:214:
undefined reference to `getNode'
/home/tmp/ccAn0IYi.o(.text+0x87b):/data/proj/safworks/MSG_PPS_COMP/c_codes/msgpps_functions.c:243:
undefined reference to `freeHL_NodeList'
collect2: ld returned 1 exit status

Now, I have included the code but not the dependencies -- thought that
that would be too much. I would really like to know why this
compilation problem arose. All of the functions mentioned above are
declared in one or another of the dependencies in the path given and
the #include files.
[...]
The #include files contain declarations of the functions
you're trying to use, but almost certainly don't contain the
actual "meat" of those functions. The actual implementations
of the functions are probably found in a library that is part
of this HDF package you've acquired. The declarations in the
#include files describe selectNode() et al. so that you can
compile the various modules of your program, but when you link
the compiled modules together you must tell the linker where
it can find those external functions. You probably need to add
something to the compiler's command line to inform it where the
function bodies can be found; it might be as simple as "-lhdf"
or it might be more involved. Check the documentation for the
HDF package and for your compiler.

It's really the same with the standard C library functions:
If you look inside the <stdio.hfile you will find descriptions
of printf() and fclose() and so on, but not the actual bodies of
those functions. They come from "elsewhere," but since these
are "standard" functions intended to be available to all C
programs, the C compiler and linker already know where to look
for them and don't need to be told. Your HDF package is an add-
on of some kind, and the compiler needs to be told about it.

--
Eric Sosman
es*****@acm-dot-org.invalid
Oct 28 '06 #2
Sheldon wrote:
Good day Everyone,

I am a still very new at learning C and I have thrown myself in the
deep end. I started with a simple program and kept widening the scope.
This has taught me many things about C and some, I must admit, have not
really sunk in yet. Still, I push on. Now I am taken a library of C
programs that were designed to read HDF files. I work on a Unix server
and in Mandrake10. The program below is most likely broken but I cannot
solve any problem unitl I get pass my current problem in compiling. All
the codes that I need: *.c and *.h are located in directory given in
the compilation command:

cc -g msgpps_functions.c -I/data/proj/safworks/MSG_PPS_COMP/c_codes

And I get the following oputput that baffles me:

/home/tmp/ccAn0IYi.o(.text+0x67f): In function `readHDF':
/data/proj/safworks/MSG_PPS_COMP/c_codes/msgpps_functions.c:197:
undefined reference to `initHlHdf'
<snip>
collect2: ld returned 1 exit status

Now, I have included the code but not the dependencies -- thought that
that would be too much. I would really like to know why this
compilation problem arose. All of the functions mentioned above are
declared in one or another of the dependencies in the path given and
the #include files.
Your compilation succeeded. Look at the error message closely, and
you'll see that the error is with ld. So your code compiled okay, but
the link step failed. If you have code for all of the functions, say
in
a file named foo.c, then you can probably build an executable
by simply addind foo.c as an argument to the compile line. That
is less appropriate than building libfoo.a and using "-lfoo" to
tell the linker about the other functions.

Including a declaration in a header file allowed your compilation
to succeed. Now you just to tell the linker where to find the
code.

--
Bill Pursell

Oct 28 '06 #3

Bill Pursell skrev:
Sheldon wrote:
Good day Everyone,

I am a still very new at learning C and I have thrown myself in the
deep end. I started with a simple program and kept widening the scope.
This has taught me many things about C and some, I must admit, have not
really sunk in yet. Still, I push on. Now I am taken a library of C
programs that were designed to read HDF files. I work on a Unix server
and in Mandrake10. The program below is most likely broken but I cannot
solve any problem unitl I get pass my current problem in compiling. All
the codes that I need: *.c and *.h are located in directory given in
the compilation command:

cc -g msgpps_functions.c -I/data/proj/safworks/MSG_PPS_COMP/c_codes

And I get the following oputput that baffles me:

/home/tmp/ccAn0IYi.o(.text+0x67f): In function `readHDF':
/data/proj/safworks/MSG_PPS_COMP/c_codes/msgpps_functions.c:197:
undefined reference to `initHlHdf'
<snip>
collect2: ld returned 1 exit status

Now, I have included the code but not the dependencies -- thought that
that would be too much. I would really like to know why this
compilation problem arose. All of the functions mentioned above are
declared in one or another of the dependencies in the path given and
the #include files.

Your compilation succeeded. Look at the error message closely, and
you'll see that the error is with ld. So your code compiled okay, but
the link step failed. If you have code for all of the functions, say
in
a file named foo.c, then you can probably build an executable
by simply addind foo.c as an argument to the compile line. That
is less appropriate than building libfoo.a and using "-lfoo" to
tell the linker about the other functions.

Including a declaration in a header file allowed your compilation
to succeed. Now you just to tell the linker where to find the
code.

--
Bill Pursell
Thanks Guys,

Now I have a direction, at least.
I have to look at the Makefile and see if I can figure out how to use
it.
Unfortunately, the documentation is very poor and almost non-existent.

/Sheldon

Oct 28 '06 #4
Sheldon wrote:
>
I am a still very new at learning C and I have thrown myself in
the deep end. I started with a simple program and kept widening
the scope. This has taught me many things about C and some, I must
admit, have not really sunk in yet. Still, I push on. Now I am
taken a library of C programs that were designed to read HDF files.
I work on a Unix server and in Mandrake10. The program below is
most likely broken but I cannot solve any problem unitl I get pass
my current problem in compiling. All the codes that I need: *.c
and *.h are located in directory given in the compilation command:

cc -g msgpps_functions.c -I/data/proj/safworks/MSG_PPS_COMP/c_codes
.... snip ...
>
Now, I have included the code but not the dependencies -- thought
that that would be too much. I would really like to know why this
compilation problem arose. All of the functions mentioned above
are declared in one or another of the dependencies in the path
given and the #include files.

************************************************** ***************
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
To start with, all the following #includes are non-standard and
unknown to us. We deal only with standard C here.
#include <read_vhlhdf.h>
#include <read_hlhdf.h>
#include <hlhdf.h>
#include <sys/types.h>
#include <dirent.h>
#include <vhlhdf.h>

#define ROW 1215
#define COL 1215
#define Auxdatadir "/data/proj/safworks/sheldon/MSG_PPS_COMP/data/aux/"
#define Region "ibla_57n20e"
#define Date 200512

static int inithdf = 1; // Är 1 om initHlHdf ej har anropats, 0
annars. This routine must be run
This illustrates why you should not use // comments in any code
posted to the newsgroup. First, it wraps, and becomes invalid
source. Second, it is not even a legal comment in the most
portable C systems, such as those that adhere to the C90 standard.

Just use proper /* .... */ comments.
int readHDF(float** , char *hdfname, char *fieldname);

// Variable Declaration
char Filename[] =
"/data/proj/safworks/sheldon/MSG_PPS_COMP/data/aux/test_array.dat";
char Reprodir[100];
char Physdata[100];
//************************************************** ************************************************** *****
Also, to avoid line wrap in usenet, limit your line length to 72
chars. 65 is better.
struct hdfstruct {
float** latitude;
float** longitude;
float** landuse;
float** fractofland;
float** sunangle;
float** viewingangle;
};

int main(void) {
.... snip code ...

I suggest you follow the above suggestions and repost. In general
you should avoid creating routines that are too long. Break your
system down into simpler functions that do simple things, and
return information.

When you have something that can be compiled with:

gcc -W -Wall -ansi -pedantic

you are most of the way there. Read the links below.

--
Some informative links:
<news:news.announce.newusers
<http://www.geocities.com/nnqweb/>
<http://www.catb.org/~esr/faqs/smart-questions.html>
<http://www.caliburn.nl/topposting.html>
<http://www.netmeister.org/news/learn2quote.html>
<http://cfaj.freeshell.org/google/>
Oct 28 '06 #5

CBFalconer skrev:
Sheldon wrote:

I am a still very new at learning C and I have thrown myself in
the deep end. I started with a simple program and kept widening
the scope. This has taught me many things about C and some, I must
admit, have not really sunk in yet. Still, I push on. Now I am
taken a library of C programs that were designed to read HDF files.
I work on a Unix server and in Mandrake10. The program below is
most likely broken but I cannot solve any problem unitl I get pass
my current problem in compiling. All the codes that I need: *.c
and *.h are located in directory given in the compilation command:

cc -g msgpps_functions.c -I/data/proj/safworks/MSG_PPS_COMP/c_codes
... snip ...

Now, I have included the code but not the dependencies -- thought
that that would be too much. I would really like to know why this
compilation problem arose. All of the functions mentioned above
are declared in one or another of the dependencies in the path
given and the #include files.

************************************************** ***************
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>

To start with, all the following #includes are non-standard and
unknown to us. We deal only with standard C here.
#include <read_vhlhdf.h>
#include <read_hlhdf.h>
#include <hlhdf.h>
#include <sys/types.h>
#include <dirent.h>
#include <vhlhdf.h>

#define ROW 1215
#define COL 1215
#define Auxdatadir "/data/proj/safworks/sheldon/MSG_PPS_COMP/data/aux/"
#define Region "ibla_57n20e"
#define Date 200512

static int inithdf = 1; // Är 1 om initHlHdf ej har anropats, 0
annars. This routine must be run

This illustrates why you should not use // comments in any code
posted to the newsgroup. First, it wraps, and becomes invalid
source. Second, it is not even a legal comment in the most
portable C systems, such as those that adhere to the C90 standard.

Just use proper /* .... */ comments.
int readHDF(float** , char *hdfname, char *fieldname);

// Variable Declaration
char Filename[] =
"/data/proj/safworks/sheldon/MSG_PPS_COMP/data/aux/test_array.dat";
char Reprodir[100];
char Physdata[100];
//************************************************** ************************************************** *****

Also, to avoid line wrap in usenet, limit your line length to 72
chars. 65 is better.
struct hdfstruct {
float** latitude;
float** longitude;
float** landuse;
float** fractofland;
float** sunangle;
float** viewingangle;
};

int main(void) {
... snip code ...

I suggest you follow the above suggestions and repost. In general
you should avoid creating routines that are too long. Break your
system down into simpler functions that do simple things, and
return information.

When you have something that can be compiled with:

gcc -W -Wall -ansi -pedantic

you are most of the way there. Read the links below.

--
Some informative links:
<news:news.announce.newusers
<http://www.geocities.com/nnqweb/>
<http://www.catb.org/~esr/faqs/smart-questions.html>
<http://www.caliburn.nl/topposting.html>
<http://www.netmeister.org/news/learn2quote.html>
<http://cfaj.freeshell.org/google/>
Thanks! Your advice is really helpful. I need to find out from where
some of the dependent files are located before I can continue with
this. Will "clean up" my code.

/Sheldon

Oct 28 '06 #6
In article <45***************@yahoo.com>,
CBFalconer <cb********@maineline.netwrote:
....
>To start with, all the following #includes are non-standard and
unknown to us. We deal only with standard C here.
The really funny part is that, in any other newsgroup, if people posted
responses that said "I don't understand; I have no idea what you're
talking about; I can't help you.", it would be considered the ultimate
in ridiculous and people would, quite rightly, wonder what the poster
was smoking.

Yet, here, for some reason, it is not only acceptable, but common.
gcc -W -Wall -ansi -pedantic
The usual crippleware options.

Oct 28 '06 #7

Kenny McCormack skrev:
In article <45***************@yahoo.com>,
CBFalconer <cb********@maineline.netwrote:
...
To start with, all the following #includes are non-standard and
unknown to us. We deal only with standard C here.

The really funny part is that, in any other newsgroup, if people posted
responses that said "I don't understand; I have no idea what you're
talking about; I can't help you.", it would be considered the ultimate
in ridiculous and people would, quite rightly, wonder what the poster
was smoking.

Yet, here, for some reason, it is not only acceptable, but common.
gcc -W -Wall -ansi -pedantic

The usual crippleware options.
I put together a make file and found out where some of my dependent
files are placed. after some work, it worked smoothly.
Still - and this might sound really silly but here goes - what does the
options -W and -Wall mean?
I looked these up but it does not seem to be a part of cc. Is unigue to
gcc?

Oct 30 '06 #8
"Sheldon" <sh******@gmail.comwrites:
[...]
>In article <45***************@yahoo.com>,
CBFalconer <cb********@maineline.netwrote:
[...]
gcc -W -Wall -ansi -pedantic
[...]
>
I put together a make file and found out where some of my dependent
files are placed. after some work, it worked smoothly.
Still - and this might sound really silly but here goes - what does the
options -W and -Wall mean?
I looked these up but it does not seem to be a part of cc. Is unigue to
gcc?
"cc" is a common name for C compilers in general, particularly on
Unix-like systems. We can't guess which compiler you're referring to.
On some systems, "cc" is an alias for "gcc".

Yes, all the options "-W", "-Wall", "-ansi", and "-pedantic" are
specific to gcc. Some compilers may have options with the same name;
they're likely to mean the same thing *if* they're copied from gcc,
otherwise they could have some different meaning.

<OT>
In gcc, "-W" and "-Wall" enable certain sets of warning messages,
"-ansi" tells it to conform to the C90 standard, and "-pedantic" tells
it to be more diligent about reporting certain errors. See the gcc
documentation for details (you should be able to find it on the web).
</OT>

--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <* <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
Oct 30 '06 #9
Keith Thompson said:

<snip>
<OT>
In gcc, "-W" and "-Wall" enable certain sets of warning messages,
"-ansi" tells it to conform to the C90 standard, and "-pedantic" tells
it to be more diligent about reporting certain errors. See the gcc
documentation for details (you should be able to find it on the web).
The traditional (but non-canonical) interpretations are:

-W : give me all the warnings please
-Wall : no, ALL the warnings please
-ansi : no really, I honestly want ALL the warnings
-pedantic: yeah, AND the rest
-Wformat-nonliteral -Wcast-align -Wpointer-arith -Wbad-function-cast
-Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations -Winline
-Wundef -Wnested-externs -Wcast-qual -Wshadow -Wconversion -Wwrite-strings
-Wno-conversion -ffloat-store -O2 : look, I really mean it, okay?
</OT>
Um, quite so.

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at above domain (but drop the www, obviously)
Oct 30 '06 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
6874
by: Andres Rosado-Sepulveda | last post by:
Hello, I'm having trouble compiling PHP 4.3.4 on Solaris 8. This is the error message it is showing: -- start -- Undefined first referenced symbol ...
11
3166
by: Arturo DiDonna | last post by:
Hello everyone. I am trying to compile someone else code and I am stuck with compilation problems using the g++ 3.3 compiler. Basically, when compiling the following code, I get this error...
0
3037
by: David W. Fenton | last post by:
Today I was working on a hideous old app that I created a long time ago that does a lot of showing/hiding/resizing of fields on one of the forms. I had used constants to store reference values for...
4
1681
by: -Michelle- | last post by:
Hi I am using A2003 on XP. The client has A2000. So I have ensured that I have developed based on A2000 and compiled as such. I have found that in a number of cases now, I have used (what I...
3
4973
by: Dmitri Shvetsov | last post by:
Hi All, Did somebody have a problem compiling some solution in VS2003? I get the error every time that some files are locked and are using by another process. I repeat compiling again and again...
2
2100
by: Erik | last post by:
Hi Everyone, I'm having real problems compiling some source for eVC4++. The errors I am getting are below: It all seems to be centred around winsock. If I move the afsock.h reference to before...
3
2307
by: Ryan Riehle | last post by:
Hi All! Trying to upgrade to Apache 2.0.49 and getting compile errors related to mod_auth_pgsql, any clue?: make: Entering directory `/usr/src/httpd-2.0.49'...
2
1528
by: nospam | last post by:
Hi Newbie asp questions: I have problems running new website when its uploaded. It compiles nicely when running on my local machine, but when compiling on the server i get the error:
0
1446
by: phoolimin | last post by:
Dear all, I am trying to embed python into another scripting language, to do this I need to solve a number of problems on importing or compiling python script. First let me state what exactly I...
8
2183
by: WebSnozz | last post by:
I have an application written in C that does a lot of low level stuff. It does a lot of things like casting from void*'s. I want to create a new GUI for it in either C# or MC++, but reuse the...
0
7559
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7123
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7542
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5701
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5100
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3248
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3237
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
811
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
470
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.