/usr/lib/x86_64-linux-gnu/libdl.so:-1: error: error adding symbols: DSO missing from command line



  • Hello everyone,

    While compling my Qt code I am getting this error..can anyone tell what is this error and what i need to do?

    error: /home/ubuntu/bin/julius-4.2.2/SimpleJulius/.//libjulius.a(plugin.o): undefined reference to symbol 'dlclose@@GLIBC_2.2.5'
    /usr/lib/x86_64-linux-gnu/libdl.so:-1: error: error adding symbols: DSO missing from command line
    error: collect2: error: ld returned 1 exit status

    My code is as follows,

    #-------------------------------------------------
    #
    # Project created by QtCreator 2016-10-28T11:51:01
    #
    #-------------------------------------------------
    
    QT       += core gui
    
    greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
    
    TARGET = SimpleJulius
    TEMPLATE = app
    
    LIBS += -lpg
    
    SOURCES += main.cpp\
            juliuswidget.cpp
    
    HEADERS  += juliuswidget.h \
        julius/juliuslib.h \
        julius/callback.h \
        julius/config.h \
        julius/jconf.h \
        julius/julius.h \
        julius/recog.h \
        julius/acconfig.h \
        julius/beam.h \
        julius/define.h \
        julius/extern.h \
        julius/global.h \
        julius/graph.h \
        julius/jfunc.h \
        julius/misc.h \
        julius/multi-gram.h \
        julius/plugin.h \
        julius/search.h \
        julius/trellis.h \
        julius/useropt.h \
        julius/wchmm.h
    
    unix:!macx: LIBS += -L$$PWD/./ -ljulius
    
    INCLUDEPATH += $$PWD/.
    DEPENDPATH += $$PWD/.
    
    unix:!macx: PRE_TARGETDEPS += $$PWD/./libjulius.a
    
    
    

    .h file

    #ifndef JULIUSWIDGET_H
    #define JULIUSWIDGET_H
    
    #include <QWidget>
    #include <QPushButton>
    #include <QDebug>
    #include <QVBoxLayout>
    #include <QFile>
    #include <QTextEdit>
    #include <QDir>
    
    
    extern "C" {
    
    #include "julius/juliuslib.h"
    
    }
    
    class Juliuswidget : public QWidget
    {
        Q_OBJECT
    
    public:
        Juliuswidget(QWidget *parent = 0);
        ~Juliuswidget();
    
    private:
        QPushButton *m_Startbtn;
        QVBoxLayout *m_MainLyt;
    
    
    
    public slots:
        void VstartRecordingAudio();
    };
    
    #endif // JULIUSWIDGET_H
    
    

    .cpp file

    #include "juliuswidget.h"
    
    Juliuswidget::Juliuswidget(QWidget *parent)
        : QWidget(parent)
    {
        m_Startbtn=  new QPushButton("Start Recording");
        m_MainLyt =new QVBoxLayout;
    
        m_MainLyt->addWidget(m_Startbtn);
    
        this->setLayout(m_MainLyt);
    
        connect(m_Startbtn,SIGNAL(clicked()),this,SLOT(VstartRecordingAudio()));
    }
    
    
    void Juliuswidget::VstartRecordingAudio()
    {
        qDebug()<<"Started Recording"<<endl;
    
        QFile* file = new QFile();
        QDir::setCurrent("/home/ubuntu/bin/julius-4.2.2/SampleTest");
        file->setFileName("julian.jconf");
    
        file->open(QIODevice::ReadWrite);
    
        QString strFile1(file->readAll());
        QByteArray b_Array= strFile1.toLatin1();
        file->close();
    
        char *JconfFile=b_Array.data();
    //    qDebug()<<"file loaded is"<<JconfFile<<endl;
        Jconf *jconf=j_config_load_file_new(JconfFile);
        qDebug()<<"jconf file is"<<jconf<<endl;
    }
    
    Juliuswidget::~Juliuswidget()
    {
    
    }
    

    Thanks


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.