Results 1 to 4 of 4

Thread: QWT Error: Symbol(s) not found for architecture x86_64

  1. #1
    Join Date
    Feb 2017
    Posts
    2
    Thanks
    1
    Qt products
    Qt5
    Platforms
    MacOS X

    Default QWT Error: Symbol(s) not found for architecture x86_64

    Hello Everyone,

    I am having trouble compiling the following code below:

    cpp file:

    Qt Code:
    1. #include <QApplication>
    2. #include <qwt_plot.h>
    3. #include <qwt_plot_curve.h>
    4. #include <qwt_plot_grid.h>
    5. #include <qwt_symbol.h>
    6. #include <qwt_legend.h>
    7.  
    8. int main(int argc, char *argv[])
    9. {
    10. QApplication a(argc, argv);
    11.  
    12. QwtPlot plot;
    13. plot.setTitle( "Plot Demo" );
    14. plot.setCanvasBackground( Qt::white );
    15. plot.setAxisScale( QwtPlot::yLeft, 0.0, 10.0);
    16. plot.insertLegend( new QwtLegend() );
    17.  
    18. QwtPlotGrid *grid = new QwtPlotGrid();
    19. grid->attach( &plot );
    20.  
    21. QwtPlotCurve *curve = new QwtPlotCurve();
    22. curve->setTitle( "Pixel Count" );
    23. curve->setPen( Qt::blue, 4 ),
    24. curve->setRenderHint( QwtPlotItem::RenderAntialiased, true );
    25.  
    26. QwtSymbol *symbol = new QwtSymbol( QwtSymbol::Ellipse,
    27. QBrush( Qt::yellow ), QPen( Qt::red, 2 ), QSize( 8, 8 ) );
    28. curve->setSymbol( symbol );
    29.  
    30. QPolygonF points;
    31. points << QPointF( 0.0, 4.4 ) << QPointF( 1.0, 3.0 )
    32. << QPointF( 2.0, 4.5 ) << QPointF( 3.0, 6.8 )
    33. << QPointF( 4.0, 7.9 ) << QPointF( 5.0, 7.1 );
    34. curve->setSamples( points );
    35.  
    36. curve->attach( &plot );
    37.  
    38. plot.resize( 600, 400 );
    39. plot.show();
    40.  
    41. return a.exec();
    42. }
    To copy to clipboard, switch view to plain text mode 

    Project File:

    Qt Code:
    1. TEMPLATE = app
    2. TARGET = IPtest
    3. INCLUDEPATH += /Users/asnapolitano/Qt/5.8/ios/mkspecs/common/uikit .
    4.  
    5. # Input
    6. SOURCES += plottest.cpp
    7.  
    8. # Add QWT:
    9. QT += widgets
    10. CONFIG += c++14
    11. CONFIG += qwt
    12. INCLUDEPATH += "/usr/local/qwt-6.1.3/include"
    13. LIBS += -L/usr/local/qwt-6.1.3/lib -lqwt
    To copy to clipboard, switch view to plain text mode 
    When I ran make on the project, I get the following error: symbol(s) not found for architecture x86_64.
    A segment of the compilation output suggests that the qwt classes are not being detected:

    Compilation Segment:

    Qt Code:
    1. Undefined symbols for architecture x86_64:
    2. "QwtPlotGrid::QwtPlotGrid()", referenced from:
    3. _main in plottest.o
    4. "QwtPlotItem::setRenderHint(QwtPlotItem::RenderHint, bool)", referenced from:
    5. _main in plottest.o
    6. "QwtPlotItem::attach(QwtPlot*)", referenced from:
    7. _main in plottest.o
    8. "QwtPlotItem::setTitle(QString const&)", referenced from:
    9. _main in plottest.o
    10. "QwtPlotCurve::setSamples(QVector<QPointF> const&)", referenced from:
    11. _main in plottest.o
    12. "QwtPlotCurve::setPen(QColor const&, double, Qt::PenStyle)", referenced from:
    13. _main in plottest.o
    14. "QwtPlotCurve::setSymbol(QwtSymbol*)", referenced from:
    15. _main in plottest.o
    16. "QwtPlotCurve::QwtPlotCurve(QString const&)", referenced from:
    17. _main in plottest.o
    18. "QwtPlot::insertLegend(QwtAbstractLegend*, QwtPlot::LegendPosition, double)", referenced from:
    19. _main in plottest.o
    20. "QwtPlot::setAxisScale(int, double, double, double)", referenced from:
    21. _main in plottest.o
    22. "QwtPlot::setCanvasBackground(QBrush const&)", referenced from:
    23. _main in plottest.o
    24. "QwtPlot::setTitle(QString const&)", referenced from:
    25. _main in plottest.o
    26. "QwtPlot::QwtPlot(QWidget*)", referenced from:
    27. _main in plottest.o
    28. "QwtPlot::~QwtPlot()", referenced from:
    29. _main in plottest.o
    30. "QwtLegend::QwtLegend(QWidget*)", referenced from:
    31. _main in plottest.o
    32. "QwtSymbol::QwtSymbol(QwtSymbol::Style, QBrush const&, QPen const&, QSize const&)", referenced from:
    33. _main in plottest.o
    34. ld: symbol(s) not found for architecture x86_64
    35. clang: error: linker command failed with exit code 1 (use -v to see invocation)
    36. make: *** [IPtest.app/Contents/MacOS/IPtest] Error 1
    37. 10:49:44: The process "/usr/bin/make" exited with code 2.
    38. Error while building/deploying project IPtest (kit: Desktop Qt 5.8.0 clang 64bit)
    39. When executing step "Make"
    To copy to clipboard, switch view to plain text mode 
    I have no idea where to go from here. Any help will be greatly appreciated.

    Many Thanks,
    Anderson
    Last edited by asnapolitano; 1st February 2017 at 20:35. Reason: missing [code] tags

  2. #2
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,230
    Thanks
    302
    Thanked 864 Times in 851 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: QWT Error: Symbol(s) not found for architecture x86_64

    Looks like you haven't installed / built a 64-bit version of Qwt.
    <=== The Great Pumpkin says ===>
    Please use CODE tags when posting source code so it is more readable. Click "Go Advanced" and then the "#" icon to insert the tags. Paste your code between them.

  3. The following user says thank you to d_stranz for this useful post:

    asnapolitano (1st February 2017)

  4. #3
    Join Date
    Feb 2017
    Posts
    2
    Thanks
    1
    Qt products
    Qt5
    Platforms
    MacOS X

    Default Re: QWT Error: Symbol(s) not found for architecture x86_64

    Thank you d_straz, and sorry about my original post's format. Will definitely make sure to incorporate CODE tags in my future posts. Anyways, I think I have installed a 64 bit version of qwt downloaded from the page: https://sourceforge.net/projects/qwt/files/qwt/6.1.3/. Is there any other way to make sure qwt was not installed properly?

  5. #4
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,230
    Thanks
    302
    Thanked 864 Times in 851 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: QWT Error: Symbol(s) not found for architecture x86_64

    "Installed"? It's a source code tar file. Did you compile it the library? And is it in the location pointed to by your -L path? And is it named "qwt.a" or "qwt.so"?
    <=== The Great Pumpkin says ===>
    Please use CODE tags when posting source code so it is more readable. Click "Go Advanced" and then the "#" icon to insert the tags. Paste your code between them.

Similar Threads

  1. Replies: 4
    Last Post: 3rd April 2015, 06:01
  2. Replies: 1
    Last Post: 13th January 2014, 21:30
  3. Qt + cocoa : Undefined symbols for architecture x86_64
    By karankumar1609 in forum Qt Programming
    Replies: 0
    Last Post: 20th March 2013, 09:43
  4. Replies: 1
    Last Post: 22nd June 2010, 20:56
  5. qmake: detecting x86_64 architecture?
    By akos.maroy in forum Qt Programming
    Replies: 3
    Last Post: 2nd August 2008, 12:26

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.