Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] problem with TAUCS

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] problem with TAUCS


Chronological Thread 
  • From: Francesc Vila <>
  • To:
  • Subject: Re: [cgal-discuss] problem with TAUCS
  • Date: Wed, 28 Jul 2010 10:36:27 +0200

El 28/07/2010 9:37, Laurent Saboret escribió:
Hi,

The conflict may come from CGAL headers that include Windows.h, which defines min/max macros.
A workaround is to wrap min/max calls with parenthesis, e.g.:
T const rmin = std::numeric_limits<T>::(min)();

Regards,
Laurent S.


Francesc Vila wrote:
El 27/07/2010 16:26,

escribió:
Hi,

but i already used this headers on other projects ( one of those projects was
also an example of CGAL - Triangulation_3) and now i'm confused because this
never happened. This is the first time i am using cmake...all the other
projects i made were with VC++...and had no problems.

Francesc i don't think i have that header included in my project, but i will
check. But anyway, can you explain better what to did to solve it? i didn't
understand very well what you meant by removing the header and using macros...

Best regards and thanks for your help,
Cristóvão
Well, I suppose it is all about what Laurent said. You must have some min/max macros defined somewhere.

In my particular case (and I mentioned it because you are using VC++ as I am), I included Winsock2 header. For what i saw, this header includes windows.h, which defines min/max macros (that receive an argument). That's why the compiler substituted the std::numeric_limits<T>::min() with the macro (and not using the real function to calculate the type limits).

I only needed the ntoh/hton macros from winsock, so I removed the winsock header and implemented those macros myself.

This is only my particular case, but I found it might help you somehow.

I'm reviewing the project settings generated by CMake, and I can't see anything unusual, sorry. Anyway, you could always generate a new project/solution and add the example and your headers, without using cmake.... I suppose that the result must remain the same (unless you have custom compile settings in order to use the headers)

Regards,
Francesc


Ce courrier électronique et toutes les pièces éventuellement jointes qu’il contient sont CONFIDENTIELS et destinés exclusivement à l’usage de leur destinataire. Si une erreur de transmission ou une adresse erronée a mal dirigée ce courrier, merci d’en informer l’expéditeur en lui faisant une réponse par courrier électronique dès réception. Si vous n’êtes pas le destinataire de ce courrier, vous ne devez pas l’utiliser, le conserver, en faire état, le distribuer, le copier, l’imprimer ou en révéler le contenu à une tierce partie.
Ce courrier électronique est à usage strictement informatif et ne saurait engager de quelque manière que ce soit SPOT IMAGE SA, ni ses filiales.

This e-mail and any attachments hereto are CONFIDENTIAL and intended solely for the use of the addressee. If you have received this e-mail in error please send it back to the person that sent it to you.
If you have received it in error, please notify the sender by return email. If you are not the addressee of this email, you must not use, keep, disseminate, copy, print or otherwise deal with it.
This email is for information only and will not bind SPOT IMAGE SA in any contract or obligation, nor its subsidiaries.

You could also try to define WINDOWS_LEAN_AND_MEAN before all the headers.

#define WINDOWS_LEAN_AND_MEAN

#include <CGAL....

I don't know for sure, but this macro strips out a lot of things defined in windows.h, and it may strip out min/max macros.

Regards,
Francesc



Archive powered by MHonArc 2.6.16.

Top of Page