Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] help with Qt_widget

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] help with Qt_widget


Chronological Thread 
  • From: BomBielFil <>
  • To:
  • Subject: Re: [cgal-discuss] help with Qt_widget
  • Date: Tue, 25 Mar 2008 16:13:22 +0100
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=OkXrtaUEVOXi4qovJ6ETKb6E/C1jq47ghiD1W7ZNAdqIHVL43AEdO7iBaLD+Lh9rih/E5CIpn0wHOHVQDnqagf6UOIsm+0dcXU/ls/rrDD1j/crOoeE/8mfHTQC6r15dlsuJb7GVJsVFY2Zh59wXoPBmf9K0i9CcAUuzBd247kc=

ok thanks, now it runs
another simple question (sorry but I'm newbie in QT_widget)
I try this program:

#include <CGAL/basic.h>
#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::WHITE)<<CGAL::RED;
  *w << Segment(Point_2(100,100), Point_2(400,400));
  w->unlock();
  return app.exec();
}


Why I don't see the segment??  I see only a white window
-Bombielfil-

2008/3/25, Laurent Rineau <>:
On Tuesday 25 March 2008 15:03:48 BomBielFil wrote:
> I tried to introduce -lqt-mt in my g++ command: "g++ -Wall
> -I/usr/local/include -I/usr/include/qt3 -L/usr/local/lib -lCGAL -lm -lqt-mt
> disegno.cpp  -lstage -o disegno `pkg-config --cflags --libs gtk+-2.0`"
>
> but now the error is:
>
> disegno.cpp:(.text+0x171): undefined reference to
> `CGAL::Qt_widget::Qt_widget(QWidget*, char const*)'


You forgot to link with the CGALQt library, and it seems that you use it.
Add "-lCGALQt" to your link flags, if you really use the CGAL::Qt_widget
class. However, it seems that you want to use Gtk+-2.0, and not Qt. In case
case, you should remove from your code all headers that contain "Qt_widget"
in their names.


--

Laurent Rineau
INRIA - Sophia Antipolis
BP 93, 2004 Route des Lucioles
06902 Sophia Antipolis Cedex FRANCE
Tel: +33 4 92 38 78 62 (Fax: +33.4.97.15.53.95)
--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://lists-sop.inria.fr/wws/info/cgal-discuss




Archive powered by MHonArc 2.6.16.

Top of Page