MySQL Forums
Forum List  »  Connector/C++

Source compile and install in Ubuntu 9.10
Posted by: Mike Schmidt
Date: January 15, 2010 04:20PM

I just installed Ubuntu 9.10 server, then installed a bunch of gcc build tools and toolchains and boost and cmake and all that jazz. I'm honestly not sure of all of it. I'm trying to experiment with using mysql with C++ rather than the old familiar php route. I'm sure that some of what I've done has been a really ugly and destructive hack, but I haven't been able to find any documentation to suggest anything better, so I'll put it here to either help others or to plead for a better solution.

My experience:

>sudo cmake .
worked
>sudo make clean
worked
>sudo make
failed three different times:
1. .../mysql_art_resultset.cpp: snprintf was not declared in this scope
2. .../mysql_resultbind.cpp: printf was not declared in this scope
3. .../test/unit/classes/resultsetmetadata.cpp: printf was not declared in this scope
On each occasion, I edited the source and added an "#include <cstdio>" to the top of the matching header file, after the "#ifndef..." of course.
This worked to successfully build the target, then
>sudo make install
also worked successfully.
I then compiled a tutorial and it compiled, using the connector, without complaint.

I'm using gcc 4.4.1 as supplied by Ubuntu.

Now my executable can't find the damn .so file. Why are there always so many details to take care of?!?!? Frustrating.

Options: ReplyQuote


Subject
Views
Written By
Posted
Source compile and install in Ubuntu 9.10
7435
January 15, 2010 04:20PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.