SOLVED: Need assistance compiling package

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Andrew Robinson wrote:
I'm trying to build palm-db-tools. The build used to work on FC4, but fails as you see on FC6. Is there a flag or something that would get me around this particular problem?

Thanks!

Andrew Robinson

[root@proteus palm-db-tools]# make

make -C libsupport; make -C libpalm; make -C libflatfile; make -C flatfile; make[1]: Entering directory `/data/Downloads/Pilot-DB/palm-db-tools/libsupport' g++ -ansi -pedantic -g -O2 -Wall -Werror -Wno-deprecated -I. -I.. -DHAVE_CONFIG_H -c csvfile.cpp
cc1plus: warnings being treated as errors
../libsupport/infofile.h:33: warning: ‘class DataFile::InfoFile::Parser’ has virtual functions but non-virtual destructor ../libsupport/infofile.h:38: warning: ‘class DataFile::InfoFile::ConfigParser’ has virtual functions but non-virtual destructor ../libsupport/infofile.h:48: warning: ‘class DataFile::InfoFile::DatabaseParser’ has virtual functions but non-virtual destructor ../libsupport/infofile.h:58: warning: ‘class DataFile::InfoFile::TypeParser’ has virtual functions but non-virtual destructor ../libsupport/infofile.h:68: warning: ‘class DataFile::InfoFile::PDBPathParser’ has virtual functions but non-virtual destructor
make[1]: *** [csvfile.o] Error 1

Solution: I needed to add destructor's for the classes. I needed to convert this

class Parser
{
public:
    virtual void parse(int linenum, std::vector< std::string> array) = 0;
};

To this:

class Parser
{
public:
    virtual void parse(int linenum, std::vector< std::string> array) = 0;
    virtual ~Parser () {}
};

Now either the version of g++ was more forgiving in FC4 or there was a default setting that allowed this error to pass that has since changed. Anyway, adding destructors to all the complaining classes allowed the application to compile.

Andrew


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux