MySQL Lists are EOL. Please join:

List:MySQL++« Previous MessageNext Message »
From:Chris Frey Date:June 9 2005 10:40pm
Subject:Re: Compile Error
View as plain text  
There have been some changes in the library, notably:

	- there is now a namespace 'mysqlpp' that holds all mysql++ stuff
	- operator["blah"] has been changed to lookup_by_name("blah")
	- exceptions are now always derived from some form of
		std::exception

You will need to update your application appropriately.

Check out the docs in the tarball or at http://tangentsoft.net/mysql++/doc/

- Chris


On Thu, Jun 09, 2005 at 05:23:40PM -0500, Torry.Crass@stripped wrote:
> 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
Thread
Compile ErrorTorry.Crass10 Jun
  • Re: Compile ErrorChris Frey10 Jun