Subject: CGAL users discussion list
List archive
- From: BomBielFil <>
- To:
- Subject: help with Qt_widget
- Date: Wed, 12 Mar 2008 11:48:27 +0100
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type; b=l5ONJqxFM2mbZW1Gh/gQqJ4qPLM6JwPq68xgANJwouvKz2yR5lGEr1xjJtZDLFCjYTaHdB+K5bzbggaG92jhjA4EDGZurQAylso8PXUR1uy1HKtX2M+/rFZ3xQ3Li8hiXn84bVS+C8KddRDiqiTKtt6DtM94dUzNmjFKlFHz7NA=
Hi
someone could tell me how compile (g++ command) the example of Qt_widget in cgal manual ??
the example is:
#include <CGAL/basic.h>my first error line is : "undefined reference to 'QApplication::QApplication(int&, char**)"
#ifndef CGAL_USE_QT
#include <iostream>
int main(int, char*){
std::cout << "Sorry, this demo needs QT..." << std::endl; return 0;}
#else
#include <CGAL/Cartesian.h>
#include <CGAL/IO/Qt_widget.h>
#include <qapplication.h>
typedef CGAL::Cartesian<int> Rep;
typedef CGAL::Point_2<Rep> Point_2;
typedef CGAL::Segment_2<Rep> Segment;
int main( int argc, char **argv )
{
QApplication app( argc, argv );
CGAL::Qt_widget *w = new CGAL::Qt_widget();
app.setMainWidget( w );
w->resize(600, 600);
w->set_window(0, 600, 0, 600);
w->show();
w->lock();
*w << CGAL::BackgroundColor(CGAL::ORANGE) << CGAL::RED;
*w << Segment(Point_2(100,100), Point_2(400,400));
w->unlock();
return app.exec();
}
#endif
It's the first time that I use this package
Thanks
Best Regard
-Bombielfil-
- help with Qt_widget, BomBielFil, 03/12/2008
- Re: [cgal-discuss] help with Qt_widget, Laurent Rineau, 03/12/2008
- Re: [cgal-discuss] help with Qt_widget, BomBielFil, 03/25/2008
- Re: [cgal-discuss] help with Qt_widget, Laurent Rineau, 03/25/2008
- Re: [cgal-discuss] help with Qt_widget, BomBielFil, 03/25/2008
- Re: [cgal-discuss] help with Qt_widget, Laurent Rineau, 03/27/2008
- Re: [cgal-discuss] help with Qt_widget, BomBielFil, 03/25/2008
- Re: [cgal-discuss] help with Qt_widget, Laurent Rineau, 03/25/2008
- Re: [cgal-discuss] help with Qt_widget, BomBielFil, 03/25/2008
- Re: [cgal-discuss] help with Qt_widget, Laurent Rineau, 03/12/2008
Archive powered by MHonArc 2.6.16.