The mysql.h
file from the libmysqlclient-dev
Ubuntu package is located at /usr/include/mysql/mysql.h
.
This is not a standard search path for compilers, however /usr/include
is.
You’d typically use the mysql.h
header in your code like this:
#include <mysql/mysql.h>
If you don’t want to specify the directory offset in your source, you can pass the -I
flag to gcc (If that’s what you are using) to specify an additional include search directory, and then you wouldn’t need to change your existing code.
eg.
gcc -I/usr/include/mysql ...
Related Posts:
- Pause Console in C++ program
- Why the switch statement cannot be applied on strings?
- How to dynamically allocate arrays in C++
- How to convert string to char array in C++?
- How can I convert a std::string to int?
- Why is “using namespace std;” considered bad practice?
- What is a lambda expression in C++11?
- How to convert string to char array in C++?
- ‘was not declared in this scope’ error
- Good input validation loop using cin – C++
- C++ for each, pulling from vector elements
- How do I erase an element from std::vector<> by index?
- Incomplete Type Is Not Allowed
- how to implement quick sort algorithm in C++
- C++ Vector of pointers
- How do I reverse a C++ vector?
- Is there a C++ decompiler?
- What is a dangling pointer?
- undefined reference to WinMain@16 (codeblocks)
- How to reverse an std::string? [duplicate]
- What is the C version of RMI
- Difference between ‘strcpy’ and ‘strcpy_s’?
- What is uintptr_t data type
- const int = int const?
- Undefined reference to vtable
- In C++, what is a virtual base class?
- wntdll.pdb not loaded – Can’t see the exception
- Difference between const reference and normal parameter
- Why am I getting this redefinition of class error?
- unsigned int vs. size_t
- error: expected primary-expression before ‘)’ token (C)
- What does -> mean in C++?
- How to pass optional arguments to a method in C++?
- How to copy a string of std::string type in C++?
- C++ forbids converting a `string` constant to `char*` – Alphabets to Morse converting program
- What is activation record in the context of C and C++?
- Static array vs. dynamic array in C++
- C++ terminate called after throwing an instance of ‘std::out_of_range’ Simple Averaging code
- Error “C++ requires a type specifier for all declarations whilst defining methods”
- How to create a dynamically-allocated array of const objects, but have values assigned to them?
- Why doesn’t std::vector::push_front() exist?
- Fastest way to check if a file exist using standard C++/C++11,14,17/C?
- Invalid use of non-static member function c++
- string subscript out of range error
- push_back vs emplace_back
- No operator << matches these operands
- Returning an empty string : efficient way in c++
- How to find the size of an int[]?
- Append an int to a std::string
- Decimal to hex conversion c++ built-in function
- C++ IDE with repl?
- error: use of deleted function
- Run C++ in command prompt – Windows
- pthread sleep linux
- 2D array vs array of arrays
- C++ error: definition of implicitly-declared
- Already defined in .obj – no double inclusions
- Error: No instance of constructor matches the argument list
- How can I get the list of files in a directory using C or C++?
- RPN Calculator for C++
- What does `Fatal Python error: PyThreadState_Get: no current thread` mean?
- Debug Assertion Failed: _CrtIsValidHeapPointer(block)
- gdb error not in executable format: File format not recognized
- C++ Erase vector element by value rather than by position?
- C++ Class ‘undeclared identifier”
- Destructor for Binary Search Tree
- What is the most popular general purpose C++ framework?
- Adding message to assert
- c++ error: invalid types ‘int[int]’ for array subscript
- What are the different versions of exec used for in C and C++?
- C++ – statement cannot resolve address for overloaded function
- What’s the difference between * and & in C?
- is there is a compiler which convert c++ code into mips assembly language
- term does not evaluate to a function taking 1 arguments
- reading from stdin in c++
- Difference between pic Vs pie
- C++ Templates – LinkedList
- In C++ can constructor and destructor be inline functions?
- What’s the meaning of exception code “EXC_I386_GPFLT”?
- QByteArray to QString
- Bitwise Less than or Equal to
- How to automatically convert strongly typed enum into int?
- Function cannot be referenced as it is a deleted function
- Difference between
and - How to get size of dynamic array in C++ [duplicate]
- What is a nested name specifier?
- ASCII art in C++
- How do you append an int to a string in C++?
- error C2995: function template has already been defined
- Is there a way to compile C++ to C Code?
- enum to string in modern C++11 / C++14 / C++17 and future C++20
- Digit limitation from decimal point in C++
- error: expected unqualified-id before ‘while’|
- error C2039: ‘string’ : is not a member of ‘std’, header file problem
- cmath vs math.h (And similar c-prefixed vs .h extension headers)
- Proper way to pass dynamic arrays to other functions
- How to fix ‘std::logic_error’ what(): basic_string::_M_construct null not valid error?
- Unexpected end of file error
- Struct with template variables in C++
- error: no member function declared in class