List:MySQL++« Previous MessageNext Message »
From:Ina J. Date:March 14 2012 1:40pm
Subject:Library including problem
View as plain text  

I've been using MySQL++ 3.1.0 for a while now and it has been worked great!
But, I have realized, my includes are a mess and when I try to change
those, a bunch of warnings shows up with g++. I'm using 64bit Ubuntu 10.04,
but I have to port my program for i386 FreeBSD and that's where I ran in to

My MySQL++ 3.1.0 library lies at /usr/include/ and at /usr/lib/. I had some
kind of problems, when I compiled it by myself and succeeded only with
those paths. I had to compile it by myself, because I have a table with 71

I made an example code to represent the problem. My makefile is as follows:

### M A K E F I L E ###

#Compiler options
CCFLAGS=-std=c++98 -Wall -pedantic -Wextra -g -pthread

#MySQL libs
INC = -I/usr/include/mysql -I/usr/include/mysql++
LIB = -Bsymbolic-functions -rdynamic -L/usr/lib/mysql++ -lmysqlclient

#Objects, made from sources

#The compiled program

all: $(MAIN) $(SRC)

    $(CC) $(CCFLAGS) $(INC) -c -o  $@ $<

$(MAIN): $(OBJ)
    $(CC) $(CCFLAGS) $(LIB) -o $@ $(OBJ)

    rm -f  $(MAIN) $(OBJ)

-I arguments are pointing to the /usr/X locations. And here is the code,
which produces the errros:

//MySQL++ includes
#include <mysql++.h>
#include <ssqls.h>
#include <connection.h>
#include <query.h>

int main()
    return 1;

Library including problemIna J.14 Mar
  • Re: Library including problemIna J.14 Mar
    • Re: Library including problemJonathan Wakely14 Mar