Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] pb with ofstream ?

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] pb with ofstream ?


Chronological Thread 
  • From:
  • To:
  • Subject: Re: [cgal-discuss] pb with ofstream ?
  • Date: Wed, 25 Apr 2012 16:25:03 +0200 (CEST)

still not on mine :-(

with cgal 4.0, vs2010, win32, dynamic links.

But some other cgal stuff are ok. The pb is ofstream ....
"public: class std::basic_ostream<char,struct std::char_traits<char> > &
__thiscall std::basic_ostream< etcetc ....already defined in
CGAL_Core-vc100-mt-gd-4.0.lib(all_files.obj)"

----- Mail original -----
De: "Sebastien Loriot (GeometryFactory)"
<>
À:

Envoyé: Mercredi 25 Avril 2012 16:14:57
Objet: Re: [cgal-discuss] pb with ofstream ?

The following compiles on my machine

#include <CGAL/Cartesian.h>
#include <fstream>

typedef CGAL::Point_2< CGAL::Cartesian<double> > Point;
typedef CGAL::Segment_2< CGAL::Cartesian<double> > Segment;
int main() {
Point p(0,1), q(2,2);
Segment s(p,q);
CGAL::set_pretty_mode(std::cout);
std::cout << p << std::endl << q << std::endl;
std::ofstream f("data.txt");
CGAL::set_binary_mode(f);
f << s << p ; return 1;
}

Sebastien.

On 04/25/2012 03:35 PM, gwenm wrote:
> Hi all i tried to compile this short example cgal example #include
> <CGAL/basic.h> #include #include #include <CGAL/Cartesian.h> #include
> <CGAL/Segment_2.h> typedef CGAL::Point_2< CGAL::Cartesian> Point;
> typedef CGAL::Segment_2< CGAL::Cartesian> Segment; int main() { Point
> p(0,1), q(2,2); Segment s(p,q); CGAL::set_pretty_mode(std::cout);
> std::cout << p << std::endl << q << std::endl; std::ofstream
> f("data.txt"); //------------------>>>HERE CGAL::set_binary_mode(f); f
> << s << p ; return 1; } but the line annoted //>>>HERE sends an error
> LINK: msvcprtd.lib(MSVCP100D.dll) : error LNK2005: "public: class
> std::basic_ostream<char,struct std::char_traits<char> > & __thiscall
> std::basic_ostream<char,struct std::char_traits<char>
> >::operator<<(class std::basic_ostream<char,struct
> std::char_traits<char> > & (__cdecl*)(class
> std::basic_ostream<char,struct std::char_traits<char> > &))"
> (??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@P6AAAV01@AAV01@@Z@Z)
> already defined in CGAL_Core-vc100-mt-gd-4.0.lib(all_files.obj) can
> anyone tell me the problem ? thanks in advance gwenaelle
> ------------------------------------------------------------------------
> View this message in context: pb with ofstream ?
> <http://cgal-discuss.949826.n4.nabble.com/pb-with-ofstream-tp4586593p4586593.html>
> Sent from the cgal-discuss mailing list archive
> <http://cgal-discuss.949826.n4.nabble.com/> at Nabble.com.


--
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