Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Re: question about running cgal example in qt-creator.

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Re: question about running cgal example in qt-creator.


Chronological Thread 
  • From: 魏华祎 <>
  • To:
  • Subject: Re: [cgal-discuss] Re: question about running cgal example in qt-creator.
  • Date: Wed, 5 Jun 2013 06:38:23 +0800

Hi, Laurent, 

      I have another question. Yes, because of the working directory problem, so the program read a unexist file and  I got the !empty() exception (The AABB_tree is empty). The working directory of qt-creator launching the program is 

/home/huayiwei/work/program/meshGenerator/example/Regular_triangulation/Mesh_3/build/

But the data is in 

/home/huayiwei/work/program/meshGenerator/example/Regular_triangulation/Mesh_3/data/

When the program use following code to input domain data:

 // Create domain
  Mesh_domain domain("data/fandisk.off");

it actually try to read the following file:

/home/huayiwei/work/program/meshGenerator/example/Regular_triangulation/Mesh_3/build/data/fandisk.off


which doesn't exist. 

My question:  when the program try to read a unexist file, it should directly 'complain' about it, isn't it?

Best 

Huayi


2013/6/4 魏华祎 <>
Hi, Laurent,

     Thanks for your reply. Yes, you are right. It is the working drectory problem. 

Best 

Huayi




2013/6/3 Laurent Rineau (CGAL/GeometryFactory) <>

Le lundi 03 juin 2013 20:21:31 é­ å Žç¥Ž a écrit :
> Dear all
>
>       I use QT Creator 2.4.1 as my IDE, and my system is Ubuntu 12.04 amd
> 64. My CGAL version is 4.2.  When I  run the example of
> CGAL/exmaple/Mesh_3/mesh_polyhedral_domain_with_features.cpp in QT Creator,
> I meet such a problem:
>
> %%%%%%%%%%
> Starting
> /home/huayiwei/work/program/meshGenerator/example/Regular_triangulation/Mesh
> _3/build/mesh_polyhedral_domain_with_features...
>
> terminate called after throwing an instance of
> 'CGAL::Precondition_exception'
>
> what(): CGAL ERROR: precondition violation!
>
> Expr: !empty()
>
> File: /usr/local/include/CGAL/AABB_tree.h
>
> Line: 152
>
> The program has unexpectedly finished.
> %%%%%%%%%%%%%%%
>
> But I can run the compiled program directly in my bash shell and get the
> result mesh.  Did anyone ever meet the same problem? Please help, thanks a
> lot.

The difference must be the working directory where the program is launched. It
must be the one of sources, in your case:
/home/huayiwei/work/program/meshGenerator/example/Regular_triangulation/Mesh_3/

--
Laurent Rineau, PhD
R&D Engineer at GeometryFactory           http://www.geometryfactory.com/
Release Manager of the CGAL Project       http://www.cgal.org/


--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss







Archive powered by MHonArc 2.6.18.

Top of Page