help-gplusplus
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

help in linking


From: address@hidden
Subject: help in linking
Date: 11 Apr 2007 07:15:05 -0700
User-agent: G2/1.0

hello all,
I am just having lot of trouble in compiling stuff on my MACOSX but
which in turn works fine on my Ubuntu. So i really dont understand
whats different in my setup for the paths .
Its like i have a makefile as:

CC=/usr/bin/g++
CPPFLAGS=-c -g -I/usr/local/Coral/include -I.
LDFLAGS=-L/usr/local/Coral/lib -lcoral -lpcap -lhashtab -lz
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)

It includes complilation for hash functions and a custom software
files.

But when i try to make it give me error as :
/usr/bin/g++ -c -g -I/usr/local/Coral/include -I. 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


I have tried changing the compiler to g++ and using the -lstdc++ flag
but every time it gives me an error can someone help me with this.
What should i used here.


Thanks a lot



reply via email to

[Prev in Thread] Current Thread [Next in Thread]