Hello everybody
This one goes for those using CodeBlocks (but not only)
So, I have this GUI project and I want to create a shared library then include it in the project. The final solution will be the executable of the GUI project and the DLL of the shared library. If I remove the DLL, the executable would fail.
What is what I do?
1.) I have my GUI project almost finished but there are some function that I want to store in a DLL (don't ask me why, just learning C++).
2.) I create a new Shared Library project in CodeBlocks and it creates for me a file called main.cpp (by default). It contains some functions that I replace by my functions.
3.) Now I compile and build the file. The result is a DLL file, an .A file and a .DEF file.
Now is when I am lost.
What I know is that the DLL should be in the same directory as the executable of my main project. I know that the .A file should be added to the main project's (the GUI project) Linker Settings list.
I also know that I have to include a .h (header) file of the Shared Library project into my GUI project. I don't have that file, the functions of my library are inside the .CPP file of the shared library. I feel like I miss something at this point. After studying the source code of other shared libraries (like curl) I realized that there is no .cpp file but some .make an .in files. I am using Windows. Could you help me a little, please? Thanks again!