Hello people ,
I'm learning how to using the libconfig library with C++, but I faced a problem, that I want to add the linker command to my makefile source, but I didn't know how!
Here is the part of the libconfig manual that gives the information about the command line
"The C++ API classes are defined in the namespace `libconfig', hence the following
statement may optionally be used:
using namespace libconfig;
To link with the library, specify `-lconfig++' as an argument to the linker."
The libconfig library is available in a folder relative to the source file: "libconfig-1.3.2\libconfig.h++".
Actually I don't know how necessary doing this linking stuff is, anyway when I compile I'm getting the following error:
E:/Projects/Netbeans/Deposit/Depositmain.cc:44: undefined reference to `libconfig::Config::~Config()'
E:/Projects/Netbeans/Deposit/Depositmain.cc:44: undefined reference to `libconfig::Config::~Config()'
This error appears only when I try to define an element in the Config object, like:
Config cfg;
but without such a line, no problems appear!
I'm using netbeans for editing, and MinGW for compiling. So please people tell me what file I should open and where I should add the command line, or tell me that the problem is not because of linking.
Thank you in advance for any efforts, even for only reading ;-)