hyperrealm / libconfig

C/C++ library for processing configuration files
https://hyperrealm.github.io/libconfig/
GNU Lesser General Public License v2.1
1.1k stars 359 forks source link

Libconfing undefined reference #232

Closed nethriis closed 1 year ago

nethriis commented 1 year ago

Hello I'm starting a project with libconfig in cpp (so libconfig++) I have installed it by downloading tarball in this libconfig last release. I did./configure then make and finally make install with the rights permissions. I have found the rights libs in /usr/local/lib : libconfig++.a libconfig++.la libconfig++.so libconfig++.so.11 libconfig++.so.11.1.0 and other libs for libconfig in C

When I compile my program without any libconfig function with -lconfig++ flag, my program compilation work with no errors. But when I add libconfig::Config cfg with libconfig++ include I have this error : /usr/bin/ld: /tmp/ccgsZCb2.o: in function__static_initialization_and_destruction_0(int, int)': main.cpp:(.text+0x25a): undefined reference to libconfig::Config::Config()' /usr/bin/ld: main.cpp:(.text+0x275): undefined reference tolibconfig::Config::~Config()' collect2: error: ld returned 1 exit status`

nethriis commented 1 year ago

so long !