gcc,g++,lstdc++, ld error
gcc,g++,lstdc++, ld error
- Subject: gcc,g++,lstdc++, ld error
- From: "amit hetawal" <email@hidden>
- Date: Wed, 11 Apr 2007 12:08:00 -0400
Hello all,
I have a make file which looks like :
CC=/usr/bin/gcc
CPPFLAGS=-c -g -I/usr/local/Coral/include
-I/Users/hetawal/coral-3.7.5-public/custom
LDFLAGS=-L/usr/local/Coral/lib -lcoral -lpcap -lhashtab -lz -lstdc++
OBJECTS=coral_test.o \
recycle.o \
lookupa.o \
hashtab.o
TARGET=coral
$(TARGET): $(OBJECTS)
$(CC) -g -o $(TARGET) $(OBJECTS) $(LDFLAGS)
coral_test.o: coral_test.c Makefile
$(CC) $(CPPFLAGS) coral_test.c
clean:
rm -rf $(OBJECTS) $(TARGET)
I am always getting an error as :
/usr/bin/gcc -c -g -I/usr/local/Coral/include
-I/Users/hetawal/coral-3.7.5-public/custom coral_test.c
coral_test.c: In function 'removeall':
coral_test.c:68: warning: comparison between pointer and integer
coral_test.c: In function 'getStatusValue':
coral_test.c:76: warning: pointer targets in passing argument 1 of
'strlen' differ in signedness
coral_test.c:99: warning: comparison between pointer and integer
coral_test.c: In function 'insert':
coral_test.c:114: warning: pointer targets in passing argument 1 of
'strlen' differ in signedness
coral_test.c: In function 'process_packet':
coral_test.c:164: warning: pointer targets in assignment differ in signedness
coral_test.c:165: warning: pointer targets in assignment differ in signedness
coral_test.c:167: warning: pointer targets in passing argument 1 of
'strcpy' differ in signedness
coral_test.c:168: warning: pointer targets in passing argument 1 of
'strcat' differ in signedness
coral_test.c:169: warning: pointer targets in passing argument 1 of
'strcat' differ in signedness
coral_test.c:171: warning: pointer targets in passing argument 1 of
'strcpy' differ in signedness
coral_test.c:172: warning: pointer targets in passing argument 1 of
'strcat' differ in signedness
coral_test.c:173: warning: pointer targets in passing argument 1 of
'strcat' differ in signedness
coral_test.c:187: warning: assignment makes pointer from integer without a cast
coral_test.c:188: warning: assignment makes pointer from integer without a cast
coral_test.c: In function 'main':
coral_test.c:341: warning: pointer targets in passing argument 1 of
'strlen' differ in signedness
/usr/bin/gcc -g -o coral coral_test.o recycle.o lookupa.o hashtab.o
-L/usr/local/Coral/lib -lcoral -lpcap -lhashtab -lz -lstdc++
/usr/bin/ld: Undefined symbols:
__Unwind_Resume
collect2: ld returned 1 exit status
make: *** [coral] Error 1
i have tried changing the gcc to g++ and now it gives me error as:
/usr/bin/g++ -c -g -I/usr/local/Coral/include
-I/Users/hetawal/coral-3.7.5-public/custom coral_test.c
coral_test.c: In function 'void removeall(htab*)':
hashtab.h:162: error: too many arguments to function 'word hfirst()'
coral_test.c:67: error: at this point in file
coral_test.c:68: error: ISO C++ forbids comparison between pointer and integer
hashtab.h:152: error: too many arguments to function 'word hdel()'
coral_test.c:69: error: at this point in file
hashtab.h:192: error: too many arguments to function 'word hnbucket()'
coral_test.c:70: error: at this point in file
coral_test.c: In function 'int getStatusValue(ub1*, ub1*, htab*, int)':
coral_test.c:76: error: invalid conversion from 'ub1*' to 'const char*'
coral_test.c:76: error: initializing argument 1 of 'size_t
strlen(const char*)'
hashtab.h:120: error: too many arguments to function 'word hfind()'
coral_test.c:84: error: at this point in file
hashtab.h:120: error: too many arguments to function 'word hfind()'
coral_test.c:84: error: at this point in file
hashtab.h:120: error: too many arguments to function 'word hfind()'
coral_test.c:88: error: at this point in file
coral_test.c:89: error: invalid conversion from 'void*' to 'ub1*'
hashtab.h:120: error: too many arguments to function 'word hfind()'
coral_test.c:97: error: at this point in file
coral_test.c:98: error: invalid conversion from 'void*' to 'ub1*'
coral_test.c:99: error: ISO C++ forbids comparison between pointer and integer
coral_test.c: In function 'int insert(htab*, ub1*, ub1*, int, int)':
coral_test.c:114: error: invalid conversion from 'ub1*' to 'const char*'
coral_test.c:114: error: initializing argument 1 of 'size_t
strlen(const char*)'
hashtab.h:133: error: too many arguments to function 'word hadd()'
coral_test.c:123: error: at this point in file
hashtab.h:120: error: too many arguments to function 'word hfind()'
coral_test.c:125: error: at this point in file
hashtab.h:152: error: too many arguments to function 'word hdel()'
coral_test.c:126: error: at this point in file
hashtab.h:133: error: too many arguments to function 'word hadd()'
coral_test.c:127: error: at this point in file
coral_test.c: In function 'void process_packet(coral_iface_t*,
coral_pkt_result_t*, htab*)':
coral_test.c:164: error: invalid conversion from 'char*' to 'ub1*'
coral_test.c:165: error: invalid conversion from 'char*' to 'ub1*'
coral_test.c:167: error: invalid conversion from 'ub1*' to 'char*'
coral_test.c:167: error: initializing argument 1 of 'char*
strcpy(char*, const char*)'
coral_test.c:168: error: invalid conversion from 'ub1*' to 'char*'
coral_test.c:168: error: initializing argument 1 of 'char*
strcat(char*, const char*)'
coral_test.c:169: error: invalid conversion from 'ub1*' to 'char*'
coral_test.c:169: error: initializing argument 1 of 'char*
strcat(char*, const char*)'
coral_test.c:171: error: invalid conversion from 'ub1*' to 'char*'
coral_test.c:171: error: initializing argument 1 of 'char*
strcpy(char*, const char*)'
coral_test.c:172: error: invalid conversion from 'ub1*' to 'char*'
coral_test.c:172: error: initializing argument 1 of 'char*
strcat(char*, const char*)'
coral_test.c:173: error: invalid conversion from 'ub1*' to 'char*'
coral_test.c:173: error: initializing argument 1 of 'char*
strcat(char*, const char*)'
coral_test.c:187: error: invalid conversion from 'short unsigned int' to 'ub1*'
coral_test.c:188: error: invalid conversion from 'short unsigned int' to 'ub1*'
coral_test.c: In function 'int main(int, char**)':
hashtab.h:76: error: too many arguments to function 'htab* hcreate()'
coral_test.c:235: error: at this point in file
hashtab.h:76: error: too many arguments to function 'htab* hcreate()'
coral_test.c:236: error: at this point in file
hashtab.h:162: error: too many arguments to function 'word hfirst()'
coral_test.c:322: error: at this point in file
coral_test.c:326: error: invalid conversion from 'void*' to 'ub1*'
coral_test.c:341: error: invalid conversion from 'ub1*' to 'const char*'
coral_test.c:341: error: initializing argument 1 of 'size_t
strlen(const char*)'
hashtab.h:133: error: too many arguments to function 'word hadd()'
coral_test.c:347: error: at this point in file
hashtab.h:192: error: too many arguments to function 'word hnbucket()'
coral_test.c:350: error: at this point in file
hashtab.h:162: error: too many arguments to function 'word hfirst()'
coral_test.c:352: error: at this point in file
hashtab.h:192: error: too many arguments to function 'word hnbucket()'
coral_test.c:357: error: at this point in file
make: *** [coral_test.o] Error 1
So i really dont know what should i use to get this working ..
I have it working fine on my Ubuntu system but on MAC things just dont
seem to work for me ..
Please help
_______________________________________________
Do not post admin requests to the list. They will be ignored.
X11-users mailing list (email@hidden)
This email sent to email@hidden