Quantcast
Channel: QtWebEngine
Viewing all articles
Browse latest Browse all 13965

help : Segmentation fault when using a 3rd library

$
0
0
I am a windows user and new to Qt with mingw32. Now I’m trying to use a library ‘smile’ (which builds up a bayesian network and then do references), I have put everything including .a file and .h file in the root directory and added them in the .pro file (though I don’t know whether I have done it right): QT       += core gui   greaterThan(QT_MAJOR_VERSION, 4): QT += widgets   TARGET = trysmile TEMPLATE = app     SOURCES += main.cpp \         widget.cpp \     buildnetwork.cpp \     filecommu.cpp \     inference.cpp \     para_learn.cpp \     stru_learn.cpp   HEADERS  += widget.h \     libheader.h   FORMS    += widget.ui   DEFINES += NDEBUG   QMAKE_CFLAGS_RELEASE -= -O2 QMAKE_CFLAGS_RELEASE += -O3 QMAKE_CFLAGS_RELEASE += -ffast-math QMAKE_CXXFLAGS_RELEASE -= -O2 QMAKE_CXXFLAGS_RELEASE += -O3 QMAKE_CXXFLAGS_RELEASE += -ffast-math QMAKE_CFLAGS_DEBUG -= -O2 QMAKE_CFLAGS_DEBUG += -O3 QMAKE_CFLAGS_DEBUG += -ffast-math QMAKE_CXXFLAGS_DEBUG -= -O2 QMAKE_CXXFLAGS_DEBUG += -O3 QMAKE_CXXFLAGS_DEBUG += -ffast-math   LIBS += -L$$PWD/ -lsmile PRE_TARGETDEPS += $$PWD/libsmile.a LIBS += -L$$PWD/ -lsmilearn PRE_TARGETDEPS += $$PWD/libsmilearn.a INCLUDEPATH += $$PWD/ DEPENDPATH += $$PWD/ I included “smile.h” and was trying to run a tutorial program, but I received a signal ‘SIGSEGV’ when trying to declare a new variable. BTW the compiler tells me that there are many unused parameters in my program. Is it normal for a well-included library?

Viewing all articles
Browse latest Browse all 13965

Trending Articles