K, two questions for people:
1. Can make files me used to detect what operating system is being used? I'm thinking of auto-detecting so that you can have differy\t flags used for say Linux and another set for Cygwin. If this can't be done, I see a couple post in the DoT section about a configure file to do something similiar? Could this be adapted? I'm uncertain as to how this works.
2. I've been compiling for some time with gcc, though my code used to work properly in g++. I don't get any compile warnings, but during the linking with g++ I get this:
I have this declared in my channels.h, which is included in channels.c
extern char *const pc_displays[MAX_COLORS];
The array in defined in color.c as such:
char *const pc_displays[MAX_COLORS] = { /* etc */ };
Dunno what the deal is with this, and I can't seem to find any specific reference to this issue in a couple c++ books I got. Any ideas?
1. Can make files me used to detect what operating system is being used? I'm thinking of auto-detecting so that you can have differy\t flags used for say Linux and another set for Cygwin. If this can't be done, I see a couple post in the DoT section about a configure file to do something similiar? Could this be adapted? I'm uncertain as to how this works.
2. I've been compiling for some time with gcc, though my code used to work properly in g++. I don't get any compile warnings, but during the linking with g++ I get this:
Quote:
o/channels.o(.text+0xfb8): In function `do_showchannels':
/home/mud/darkwars/dwadmins/src/channels.c:508: undefined reference to `pc_displays'
o/channels.o(.text+0x141a): In function `do_setchannel':
/home/mud/darkwars/dwadmins/src/channels.c:642: undefined reference to `pc_displays'
Where I do not get it with gcc. I know that c++ handles const pointers differently.o/channels.o(.text+0xfb8): In function `do_showchannels':
/home/mud/darkwars/dwadmins/src/channels.c:508: undefined reference to `pc_displays'
o/channels.o(.text+0x141a): In function `do_setchannel':
/home/mud/darkwars/dwadmins/src/channels.c:642: undefined reference to `pc_displays'
I have this declared in my channels.h, which is included in channels.c
extern char *const pc_displays[MAX_COLORS];
The array in defined in color.c as such:
char *const pc_displays[MAX_COLORS] = { /* etc */ };
Dunno what the deal is with this, and I can't seem to find any specific reference to this issue in a couple c++ books I got. Any ideas?