- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Re: Linking C++ program to a C++ library
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-21-2006 07:40 AM
тАО12-21-2006 07:40 AM
g++ admacct.cpp /usr/lib64/mysql/libmysqlclient_r.so.15
mv a.out /var/www/cgi-bin/admacct.cgi
Does anyone have a clue about how to set up the include path for compiling C++ programs. I'm searching the documentation at:
http://dev.mysql.com/doc/refman/5.1/en/index.html
Any clue greatly appriciated.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-22-2006 01:21 AM
тАО12-22-2006 01:21 AM
Re: Linking C++ program to a C++ library
#Include
that I can guess. I have not been able to find any of the source files for mysql clients. I'm sure these would all have that include statement in them.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-22-2006 01:53 AM
тАО12-22-2006 01:53 AM
SolutionThat's not the right syntax to link against a shared library, though it probably should work. You should use "-lmysqlclient_r", but you probably also need a "-lz" and possibly a few others.
Assuming that you're using the standard MySQL client library, the include file you want is probably mysql.h, but it might be under /usr/include/mysql instead of just /usr/include.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-22-2006 02:30 AM
тАО12-22-2006 02:30 AM
Re: Linking C++ program to a C++ library
The .h includes are located in /usr/include/mysql
I used quotes instead of the left and right brackets and it worked !!
#include "/usr/include/mysql/mysql.h"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-22-2006 02:31 AM
тАО12-22-2006 02:31 AM