Help : Segmentation fault when using a 3rd library
-
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 guigreaterThan(QT_MAJOR_VERSION, 4): QT += widgets
TARGET = trysmile
TEMPLATE = appSOURCES += main.cpp
widget.cpp
buildnetwork.cpp
filecommu.cpp
inference.cpp
para_learn.cpp
stru_learn.cppHEADERS += widget.h
libheader.hFORMS += 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-mathLIBS += -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?
-
Hi and welcome to devnet,
Please don't post the same thread in multiple sub-forums, one is enough
"Duplicate":http://qt-project.org/forums/viewthread/37473/