Results 1 to 4 of 4

Thread: Linking problem Windows 7 (64 bit) Qwt 6.1.0-rc3 + Qt 5.0.2

  1. #1
    Join Date
    Apr 2013
    Posts
    8
    Thanked 1 Time in 1 Post
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows

    Default Linking problem Windows 7 (64 bit) Qwt 6.1.0-rc3 + Qt 5.0.2

    Hi!

    I am relatively a n00b in compiling under Windows. I followed the instruction to install Qwt-6.1.0-rc3, and apparently it worked. I am now trying to compile a project that makes use of QwtPlot, with the following (messy) .pro file:

    Qt Code:
    1. CONFIG += qwt\
    2. qt
    3. QT += core\
    4. gui
    5.  
    6. greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
    7.  
    8. TARGET = VisualDiscretizerWin
    9. TEMPLATE = app
    10.  
    11. INCLUDEPATH += ../../Dropbox/Utils/CPP/ \
    12. ../../Dropbox/Utils/CPP/tinyxml/
    13.  
    14. SOURCES += main.cpp \
    15. Interval.cpp \
    16. VisualDiscretizerMainWindow.cpp \
    17. VisualDiscretizerDiscretizationWindow.cpp \
    18. ../../Dropbox/Utils/CPP/TextUtils.cpp \
    19. ../../Dropbox/Utils/CPP/tinyxml/xmltest.cpp \
    20. ../../Dropbox/Utils/CPP/tinyxml/tinyxmlparser.cpp \
    21. ../../Dropbox/Utils/CPP/tinyxml/tinyxmlerror.cpp \
    22. ../../Dropbox/Utils/CPP/tinyxml/tinyxml.cpp \
    23. ../../Dropbox/Utils/CPP/tinyxml/tinystr.cpp
    24.  
    25. HEADERS += \
    26. Interval.h \
    27. VisualDiscretizerMainWindow.h \
    28. VisualDiscretizerDiscretizationWindow.h \
    29. ../../Dropbox/Utils/CPP/TextUtils.hh \
    30. ../../Dropbox/Utils/CPP/tinyxml/tinyxml.h \
    31. ../../Dropbox/Utils/CPP/tinyxml/tinystr.h \
    32. "C:/Qwt-6.1.0-rc3/include/qwt_plot.h"
    33.  
    34. FORMS += \
    35. VisualDiscretizer.ui
    To copy to clipboard, switch view to plain text mode 

    I get some warnings during the compiling process (qmake <project-file>.pro / mingw32-make):
    Qt Code:
    1. E:\Research\VisualDiscretizerWin>qmake VisualDiscretizerWin.pro
    2.  
    3. E:\Research\VisualDiscretizerWin>mingw32-make
    4. mingw32-make -f Makefile.Release
    5. mingw32-make[1]: Entering directory 'E:/Research/VisualDiscretizerWin'
    6.  
    7. <snip>
    8.  
    9. release\moc_qwt_plot.cpp:95:6: warning: 'static void QwtPlot::qt_static_metacall
    10. (QObject*, QMetaObject::Call, int, void**)' redeclared without dllimport attribu
    11. te: previous dllimport ignored [-Wattributes]
    12. release\moc_qwt_plot.cpp:136:28: warning: 'QwtPlot::staticMetaObject' redeclared
    13. without dllimport attribute after being referenced with dll linkage [enabled by
    14. default]
    15. release\moc_qwt_plot.cpp:142:20: warning: 'virtual const QMetaObject* QwtPlot::m
    16. etaObject() const' redeclared without dllimport attribute: previous dllimport ig
    17. nored [-Wattributes]
    18. release\moc_qwt_plot.cpp:147:7: warning: 'virtual void* QwtPlot::qt_metacast(con
    19. st char*)' redeclared without dllimport attribute: previous dllimport ignored [-
    20. Wattributes]
    21. release\moc_qwt_plot.cpp:157:5: warning: 'virtual int QwtPlot::qt_metacall(QMeta
    22. Object::Call, int, void**)' redeclared without dllimport attribute: previous dll
    23. import ignored [-Wattributes]
    24. release\moc_qwt_plot.cpp:208:6: warning: 'void QwtPlot::itemAttached(QwtPlotItem
    25. *, bool)' redeclared without dllimport attribute after being referenced with dll
    26. linkage [enabled by default]
    27. release\moc_qwt_plot.cpp:215:6: warning: 'void QwtPlot::legendDataChanged(const
    28. QVariant&, const QList<QwtLegendData>&)' redeclared without dllimport attribute
    29. after being referenced with dll linkage [enabled by default]
    30. g++ -Wl,-s -Wl,-subsystem,windows -mthreads -o release\VisualDiscretizerWin.exe
    31. object_script.VisualDiscretizerWin.Release -lmingw32 -lqtmain -LE:\Libs\Qt\Qt5.
    32. 0.2\5.0.2\mingw47_32\lib -lQt5Widgets -lQt5Gui -lQt5Core -llibEGL -llibGLESv2 -l
    33. gdi32 -luser32 -LC:/Qwt-6.1.0-rc3/lib -lqwt
    34. mingw32-make[1]: Leaving directory 'E:/Research/VisualDiscretizerWin'
    To copy to clipboard, switch view to plain text mode 

    And finally, when I try to run the executable VisualDiscretizerWin.exe in the release sub-folder, I get the dreaded error:

    "VisualDiscretizerWin.exe - Entry Point Not Found
    The procedure entry point __gxx_personality_sj0 could not be located in the dynamic link library libstdc++-6.dll"

    Can you help me? Thanks in advance for your time

  2. #2
    Join Date
    Mar 2011
    Location
    Hyderabad, India
    Posts
    1,882
    Thanks
    3
    Thanked 452 Times in 435 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows
    Wiki edits
    15

    Default Re: Linking problem Windows 7 (64 bit) Qwt 6.1.0-rc3 + Qt 5.0.2

    "VisualDiscretizerWin.exe - Entry Point Not Found
    The procedure entry point __gxx_personality_sj0 could not be located in the dynamic link library libstdc++-6.dll"
    The dll file is not accessable from the release sub-folder, so what you could do is copy the libstdc++-6.dll file to release sub-folder (it can be found in MinGw\bin folder).

    Further you need other dlls, copy all the required dlls to release sub-folder
    When you know how to do it then you may do it wrong.
    When you don't know how to do it then it is not that you may do it wrong but you may not do it right.

  3. #3
    Join Date
    Apr 2013
    Posts
    8
    Thanked 1 Time in 1 Post
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Linking problem Windows 7 (64 bit) Qwt 6.1.0-rc3 + Qt 5.0.2

    Thanks! I copied the libstdc++-6.dll file in the folder, and now it's not giving that error anymore.

    However, it's getting weirder. After I copied the .dll inside the release folder, the executable crashed with no messages (!) every time I tried to run it, even after recompiling everything :-O The current main.cpp file is:

    Qt Code:
    1. // main class for the visual discretizer application
    2.  
    3. // Qt/Qwt classes
    4. #include <QApplication>
    5.  
    6. // local classes
    7. #include "Interval.h"
    8. #include "VisualDiscretizerMainWindow.h"
    9.  
    10. using namespace std;
    11.  
    12. int main(int argc, char* argv[])
    13. {
    14. cout << "Wow, now I am running!" << endl;
    15.  
    16. // create qt application
    17. QApplication app(argc, argv);
    18.  
    19. // associate it to main window
    20. QMainWindow* mainWindow = new QMainWindow;
    21. Ui::VisualDiscretizerMainWindow vdMainWindow;
    22.  
    23. // execute
    24. vdMainWindow.setupUi(mainWindow);
    25.  
    26. // show window
    27. mainWindow->show();
    28.  
    29. // return
    30. return app.exec();
    31. }
    To copy to clipboard, switch view to plain text mode 

    Do you have any advice?

  4. #4
    Join Date
    Mar 2011
    Location
    Hyderabad, India
    Posts
    1,882
    Thanks
    3
    Thanked 452 Times in 435 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows
    Wiki edits
    15

    Default Re: Linking problem Windows 7 (64 bit) Qwt 6.1.0-rc3 + Qt 5.0.2

    Can you use the debugger and see where it is crashing.

    BTW mainWindow is not being deleted!
    When you know how to do it then you may do it wrong.
    When you don't know how to do it then it is not that you may do it wrong but you may not do it right.

Similar Threads

  1. Replies: 2
    Last Post: 10th February 2011, 17:03
  2. Replies: 3
    Last Post: 1st December 2010, 12:24
  3. linking problem under windows
    By grisson in forum General Programming
    Replies: 1
    Last Post: 13th July 2010, 20:11
  4. jom / Windows SDK libs linking problem
    By nooky59 in forum Qt Tools
    Replies: 3
    Last Post: 12th November 2009, 15:58
  5. Problem with linking QT at windows.
    By zygmunt in forum Installation and Deployment
    Replies: 1
    Last Post: 21st October 2008, 22:53

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.