Доброго времени суток!
Пытаюсь использоват библиотеку DOTCONF++ library.
Столкнулся с проблемой.
Поступаю так, пишу код:
#include "dotconfpp.h"
class MyConf : public DOTCONFDocument
{
public:
MyConf(DOTCONFDocument::CaseSensitive _cs):DOTCONFDocument(_cs){};
};
int
main ()
{
MyConf conf(DOTCONFDocument::CASEINSENSITIVE);
return 0;
}
Собираю все вместе:
g++ -Wall -I./ -c myconfpp.cc mempool.cc dotconfpp.cc
g++ -o myconfpp myconfpp.o mempool.o dotconfpp.o
Все прекрасно!
Поступаю иначе, в принципе тот же код, но dotconfpp использую в качестве
библиотеки:
#include <dotconf++/dotconfpp.h>
class MyConf : public DOTCONFDocument
{
public:
MyConf(DOTCONFDocument::CaseSensitive _cs):DOTCONFDocument(_cs){};
};
int
main ()
{
MyConf conf(DOTCONFDocument::CASEINSENSITIVE);
return 0;
}
Выполняю
g++ -Wall -I/usr/local/include -c myconfpp.cc
g++ -L/usr/local/lib -o myconfpp myconfpp.o -ldotconfpp
И получаю сообщение об ошибке:
myconfpp.o(.gnu.linkonce.r._ZTI6MyConf+0x8): undefined reference to
`typeinfo for DOTCONFDocument'
Ошибку дает строчка:
MyConf conf(DOTCONFDocument::CASEINSENSITIVE);
Подскажите, что я не правильно деаю?