2 messages in com.mysql.lists.plusplusCompile Error| From | Sent On | Attachments |
|---|---|---|
| Torr...@marleyct.spx.com | 09 Jun 2005 15:23 | |
| Chris Frey | 09 Jun 2005 15:40 |
| Subject: | Compile Error![]() |
|---|---|
| From: | Torr...@marleyct.spx.com (Torr...@marleyct.spx.com) |
| Date: | 06/09/2005 03:23:18 PM |
| List: | com.mysql.lists.plusplus |
Well, hopefully this one goes through, this is my '3rd' e-mail address that I've subscribed so maybe 3rd time is the charm hehe.
RH9 GCC 3.2.2 MySQL++ 1.7.40 (attempting to change from 1.7.9)
Getting compile errors, I'm pretty sure it's a result of my Makefile, but being that I'm at a loss as to what I need to change to make it work I was hoping to get some help. I've compiled from tgz and installed 1.7.40 to default locations (appearing to be /usr/include/) I attempted to change the file using the prior file as a model, so far no luck, I've included the Makefile and the compile error below, any help or pointers would be greatly appreciated.
----- Makefile -----
CC = g++ PROF = -Wall -O -g NOCRYPT = C_FLAGS = $(PROF) $(NOCRYPT) -ggdb -export-dynamic L_FLAGS = $(PROF) -L/usr/include/mysql -L. -rdynamic #I_FLAGS = -I/usr/include/sqlplus -I/usr/include/mysql I_FLAGS = -I/usr/include -I/usr/include/mysql #LIBS = -ldl -lcrypt -lpthread -lsqlplus LIBS = -ldl -lcrypt -lpthread -lmysqlpp OUR_LIBS = -lState -lUtility -lDb -lCommand -lObject -lCombat DIRS = state utility SQL command object combat
O_FILES = Covenstead.o Eden.o Socket.o Player.o
default: eden
%.d: %.cpp $(SHELL) -ec '$(CC) -MM $(C_FLAGS) $< > $@'
-include $(O_FILES:.o=.d)
%.o: %.cpp $(CC) $(C_FLAGS) -c $< -o $@
eden: $(O_FILES) for dir in ${DIRS}; do \ (cd $$dir; ${MAKE} sharedlib); \ done $(CC) $(O_FILES) $(L_FLAGS) $(OUR_LIBS) $(LIBS) -export-dynamic -o Eden mv Eden .. mv *.a ../lib
clean: rm -f *.[oda] ./state/*.[oda] ./SQL/*.[oda] ./utility/*.[oda] \ rm -f ./SQL/*.[oda] ./command/*.[oda] ./object/*.[oda] \ rm -f ./combat/*.[oda] \ rm -f ../lib/*.a rm -f ../Eden
--------- END OF FILE -----------
--------- Compile Error ---------
g++ -Wall -Wno-deprecated -O -g -I/usr/include -I/usr/include/mysql -c DatabaseControl.cpp DatabaseControl.cpp: In constructor `DatabaseControl::DatabaseControl()': DatabaseControl.cpp:42: invalid use of undefined type `struct Connection' DatabaseControl.h:17: forward declaration of `struct Connection' DatabaseControl.cpp:43: invalid use of undefined type `struct Connection' DatabaseControl.h:17: forward declaration of `struct Connection' DatabaseControl.cpp:45: parse error before `er' DatabaseControl.cpp: In member function `std::map<std::string, Command*, std::less<std::string>, std::allocator<std::pair<const std::string, Command*> > > DatabaseControl::getCommands()': DatabaseControl.cpp:57: `Query' undeclared (first use this function) DatabaseControl.cpp:57: (Each undeclared identifier is reported only once for each function it appears in.) DatabaseControl.cpp:57: parse error before `=' token DatabaseControl.cpp:58: `query' undeclared (first use this function) DatabaseControl.cpp:60: `Result' undeclared (first use this function) DatabaseControl.cpp:60: parse error before `=' token DatabaseControl.cpp:61: `Row' undeclared (first use this function) DatabaseControl.cpp:64: `it' undeclared (first use this function) DatabaseControl.cpp:64: `res' undeclared (first use this function) DatabaseControl.cpp:66: `row' undeclared (first use this function) .....SNIP....(all pretty much the same stuff for about 150-200 lines just reverencing different things)
------ END OF FILE -----
Torry Crass
PERSONAL MESSAGE




