Quantcast
Channel: MySQL Forums - Connector/C++
Viewing all articles
Browse latest Browse all 527

error: 'EXAMPLE_FUNCTION' was not declared in this scope (no replies)

$
0
0
Greetings all. This is my first post on the forum.

I'm trying to learn how to use C++ and MySQL together. To that end, I have dusted off my C++ reference and installed Code::Blocks and the MySQL Connector/C++ on my Debian Wheezy (64-bit) system. Unfortunately, things are not going well, and I was hoping some kind soul could point me in the right direction.

I installed Code::Blocks from the Debian repo.
I then downloaded the GA binary release mysql-connector-c++-1.1.3-linux-debian6.0-x86-64bit.tar.gz from mysql.com, extracted it, and placed the contents of the lib and include folders into my /usr/local/include and /usr/local/lib folders respectively.
Noticing that the examples are missing from the binary release, I also grabbed the source archives, so I could take a look at the examples.
On to Code::Blocks. I created a new console application project, "MySQLTest", using the GNU GCC Compiler, and replaced the "Hellow World" code it gave me in main.cpp with the code from standalone_example.cpp

- and now I'm stuck at this error:
error: 'EXAMPLE_FUNCTION' was not declared in this scope
cout << "(" << EXAMPLE_FUNCTION << ") on line " << __LINE__ << endl;

Where is EXAMPLE_FUNCTION being declared? Or am I supposed to replace that with something else? No amount of searching the Internet has helped me find a step-by-step guide on getting this up and running, so some help would be greaty appreciated!

- Scott

Viewing all articles
Browse latest Browse all 527

Trending Articles