answersLogoWhite

0


Best Answer

To include mysql.h you must first locate the mysql header file and its associated libmysql library file and DLL. If you don't have them, you must download them from the MySQL website, on the Downlads (GA) page (GA = generally available). Download and save the Windows version which includes everything (around 208MB). Once downloaded, proceed with the installation of MySQL. Choose the Developer Default, Full installation, or customise what you need.

To include mysql.h, you must specify the path to the file in Project Properties (ALT+F7) in the VC++ Directories > Include Directories. By default, this file resides in "<program files>\MySQL\Connector C 6.0.2\include". Do this for all configuration types (debug, release, etc) and for all projects that require MySQL.

Thereafter you can include mysql.h in any file that requires it:

#include <mysql.h>

You must also link with the appropriate library files. They can be found in "<program files>\MySQL\Connector C 6.0.2\lib", with separate folders for the debug and optimised (release) versions of each. Specify the appropriate folder in your Project Properties > VC++ Directories > Library Directories for each build type.

Finally, specify the required libraries in the Project Properties > Linker > Input > Additional Dependencies.

Note that prior to VS2010, include and library directories are assigned globally rather than per project, per build type. For earlier versions, look in Tools > Options > Projects and Solutions > VC++ Directories instead. For the library, you must include the lib folder only (not the debug or opt folders). And in the Project Properties, you must include the appropriate debug or opt path in your linker's Additional Dependencies (e.g., debug\libmysql.lib for debug builds and opt\libmysql.lib for release builds).

User Avatar

Wiki User

11y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How do you include mysql.h file to vc plus plus?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

What is vc plus plus plus plus?

7


Do I need syllabus for vc plus plus?

No.


How do you retrieve and display system time in VC plus plus?

#include&lt;iostream&gt; #include&lt;time.h&gt; #include&lt;string.h&gt; #include&lt;sys/timeb.h&gt; int main() { _tzset(); char buff[128]; _strtime_s (buff, 128); std::cout &lt;&lt; "\Time: " &lt;&lt; buff[0]; }


What is Microsoft visual c plus plus 2005 redistributable?

A redistributable file(not just an MS VC++ 2005 redistributable) is a file that the software vendor allows you to redistribute along with derivative works that you provide using their software. Most redistributables are DLL's, which are shared libraries. The software product depends on these libraries, and derivative work that you write, such as programs using that compiler, also depend on these libraries. In terms of C++, examples are the run-time library and the class libraries for Microsoft Foundation Classes. The file is "redistributable" because the license you have permits you to bundle that file with your product, usually contained within an installer package. You need to very carefully read the license agreement, and make sure you know exactly what is considered "redistributable", and what is not. An example of a non-redistributable file would be a debug version of the run-time library. Usually, Microsoft redistributables are contained in a REDIST directory created when you install the product but, again, read the license agreement.


Who discovered MS Visual C plus plus 6.0?

Nobody discovered MS VC++ 6.0. It was developed by Microsoft (hence the abbreviation MS) and was first released by them in 1998. It has been superseded several times since then, with VC++ version 7 (2002), 7.1 (2003), 8 (2005), 9 (2008), 10 (2010) and now version 11 (2012).

Related questions

What is vc plus plus plus plus?

7


Do I need syllabus for vc plus plus?

No.


How do you retrieve and display system time in VC plus plus?

#include&lt;iostream&gt; #include&lt;time.h&gt; #include&lt;string.h&gt; #include&lt;sys/timeb.h&gt; int main() { _tzset(); char buff[128]; _strtime_s (buff, 128); std::cout &lt;&lt; "\Time: " &lt;&lt; buff[0]; }


What are the softwares created by using vc plus plus?

Virtually every major application by Microsoft is developed using VC++, including Windows itself.


How do you download vc?

I think it can be downloaded via a TORRENT file. Search it in thepiratebay.org


Is microsoft visual c plus plus the same as visual c plus plus?

Yes. Microsoft Visual C++ is the correct name, but it is often abbreviated to MSVC++ or just VC++. They are all the same.


Virtual container in sdh answer in ppt file?

when we add LPOH to the to c's then the new thing is called VC(vertual container in sdh).


Is the word tuna v vc or vc v?

vc v


How do you download c plus plus free?

There are several free C++ development suites. One is Microsoft's Express editions. http://www.microsoft.com/express/vc/


Where can I find visual c plus plus tutorials for complete novices?

There are plenty of books on the subject. VC++ for Dummies and SAMS Teach Yourself VC++ in 21 Days should certainly be on your bookshelf, but SAMS Teach Yourself C++ in 24 Hours would be the best place to start. Get familiar with the generic language before trying to get familiar with specific implementations, especially VC++ which is a decidedly non-standards-compliant implementation. Other books you should have include The C++ Programming Language by Bjarne Stroustrup (4th Edition) and The C++ Standard Library by Nicolai M. Josuttis (2nd Edition).


What is Microsoft visual c plus plus 2005 redistributable?

A redistributable file(not just an MS VC++ 2005 redistributable) is a file that the software vendor allows you to redistribute along with derivative works that you provide using their software. Most redistributables are DLL's, which are shared libraries. The software product depends on these libraries, and derivative work that you write, such as programs using that compiler, also depend on these libraries. In terms of C++, examples are the run-time library and the class libraries for Microsoft Foundation Classes. The file is "redistributable" because the license you have permits you to bundle that file with your product, usually contained within an installer package. You need to very carefully read the license agreement, and make sure you know exactly what is considered "redistributable", and what is not. An example of a non-redistributable file would be a debug version of the run-time library. Usually, Microsoft redistributables are contained in a REDIST directory created when you install the product but, again, read the license agreement.


What is the fine for ca vc 21655.8?

VC 21655.8