unable to compile mysql source [closed] - c++

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
Am trying to compile mysql client library source
source paclage\client\mysql.cc
i used gcc and g++ both
g++ -o mysql.cc mysql.cc
so whenever i compile it always gives error
In file included from mysql.cc:33:0:
client_priv.h:20:23: fatal error: my_global.h: No such file or directory
compilation terminated.
although my_global.h already exists , i moved it to the root folder of mysql.cc but same error , i did everything with it , but same error that library not found , i copied code of my_global.h and paste it in client_priv.h after that when i compile it says other libraries missing which were listed in client_priv.h ........ so help its quite confusing

You should follow official guide
Running gcc is not enough because there are lot of environment settings to be set, eg LIB paths, include paths etc.
They are using CMake to prepare build for you.
UPDATE:
If you want to compile program which will use mysql client library follow this guide.

Related

For a C++ project using VSCode on Windows, I get a compilation error while including the CPR lib (which is installed with vcpkg) [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 3 days ago.
Improve this question
The CPR lib is well installed using vcpkg however the including doesn't seem to work:
#include <cpr/cpr.h>
So in the compiler (G++) it says "no such file or directory".
I tried to copy the include folder in my sources folder and call the cpr.h file, it kinda worked but I needed to call api.h and then async.h etc which didn't work.

Where do you usually install debug versions of libaries you build from sources? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 years ago.
Improve this question
Where do you usually install debug versions of libaries you build from sources, e.g. under /usr/local/debug, something else?
Consider a software library you use for your developing program. If you need to go into the library's source code under debugger, you need the library build without optimizations and with debug symbol generated. On the other hand, to normally run your application or estimate a performance you usually use 'release' build of the library, such builds are typically installed under /usr/local (default prefix).
thx
There is no standard answer to this.
If we assume that ${project} is the name of the relevant project - e.g llvm or jpeglib or whatever, then:
You can store the files locally in your home directory (~/${project}/...). I use the pattern /usr/local/${project}-debug/... on my home machine. At work, I have my files in /work/${project}/target-dir - where target-dir is the name of the embedded platform I built it for - since my work involves building for a variety of different platforms, and I don't want to rebuild every time.
Of course, this also means that you have to modify the linker path to take this path ahead of the "normal" install directory. Not a big problem, just add a -L~/${project}/lib or whatever you decided on. And when you run things, you may need to use LD_LIBRARY_PATH=...:${LD_LIBRARY_PATH} to ensure the correct shared library files are picked up.

I am not able to open this .a file and don't know how to use it [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question appears to be off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself.
Closed 8 years ago.
Improve this question
Here is the link: https://github.com/eyetribe
I tried to run this tet-cpp-client and in the output I am getting Gazeapilib.a file, and when I am trying to open it, it's giving me error that I can't open that file.
I want to know how to open this file, and what is the data of this file and how it can be used further in any program? I have not much knowledge about it so please help me to solve this error.
I am running this program in Ubuntu using cmake software.
The .a file is a library file which contains the definitions of the functions in the library that you compiled. It is not a standalone program and must be linked with other code to make a program. You must pass this library file to the linker after building your program.

Creating an sqlite3.lib file / using sqlite3 in Visual Studios [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question appears to be off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself.
Closed 8 years ago.
Improve this question
I can't for the life of my get this code to compile. I have it running fine on all other computers, but I had to switch to a windows machine and I am attempting to add sqlite3 back to the included header files and it is nothing short of a nightmare.
I have downloading the proper files, installed it correctly, the header file is being found in Visual Studios, but I am getting a ton of unresolved externals. I found that I need to create the .lib file myself and then I should be all set. I went ahead and tried using the LIB.exe included within Visual Studios on the .def file ( I have the .def, .dll, .c, and .exe file), and I get the error that it is unable to open sqlite3.lib. Am I using the wrong command or something? I have spent hours looking it up and I believe I am doing it correctly.
My command is LIB /DEF:sqlite3.def
Should I be using something else? I do not have any object files, just the def file.
The suggested way of using the SQLite library is to embed it directly in your application, i.e., download the amalgamation source code, and just add the sqlite3.c and .h files to your project in the sample place where you have the other source files.

common.h: no such file or directory : Ubuntu [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 5 years ago.
Improve this question
I am trying to compile a program(in OpenGL) in Ubuntu, but I am receiving this error
fatal error: common.h: No such file or directory
I am not sure on which package I need to install for this.
common.h is not part of any package. I suspect you took the code out of some project or a tutorial that was part of a whole set of programs. And common.h is a header common to all those projects.
If you arrive at this page, it's possibly because your going through the 'Introduction to Operating Systems' book and tried to copy the code from the intro chapter directly and compile. At least, that's why I ended up here. This won't work, and will throw the above error.
It's best to download the code directly from the source and compile what they give you. Enjoy!