Skip to Content.
Sympa Menu

cgal-discuss - RE: [cgal-discuss] CGAL auto-link and gmp vs MS Visual C++

Subject: CGAL users discussion list

List archive

RE: [cgal-discuss] CGAL auto-link and gmp vs MS Visual C++


Chronological Thread 
  • From: "Segall, Edward" <>
  • To: <>
  • Subject: RE: [cgal-discuss] CGAL auto-link and gmp vs MS Visual C++
  • Date: Fri, 12 Oct 2007 19:19:48 -0400

This is a multi-platform project that is developed on Windows and
released on SunOS and Windows (and internally on Linux). It is being
migrated from CGAL 2.4 to 3.3.1 and (on Windows) from Visual C++ 6.0 to
8.0.

Until now, Windows release builds have been made using a perl program
that (among many other activities) invokes NMAKE. The perl program is
invoked from a cmd shell, and the makefiles used by NMAKE were generated
by the Visual C++ 6.0 IDE.

According to the Visual C++ 8.0 documentation:
"Visual C++ no longer supports the ability to export a makefile
for the active project from the development environment. Use Devenv
Command Line Switches to build Visual Studio projects at the command
line."

I was not aware of that until I looked it up just now. Given this new
information, one solution would be to hand-modify the old exported
makefile (there should be few changes) and continuse to use NMAKE, but
perhaps the easier-to-maintain solution would be to perform the release
builds as recommended, by directly invoking devenv.exe. If I want to do
that, then apparently I will need to use the CGAL Windows installer, per
Laurent Rineau's observation of a few minutes ago.

My goal had been to make the Windows installation and build processes as
much like the Unix versions as possible. I also wanted to install from
the same base distribution. That is why I was trying to use install_cgal
rather than the Windows installer. I understand that the Windows
installer is, ultimately, created from the same base, but the connection
between the two is less direct (at least from my perspective). More
significantly, it seems as though it would be easier to manage if the
same type of installation process is used everywhere. However, there is
no point in trying to swim upstream, so I think I will give up this
goal.

>Does the build fom the command line need to use the libraries generated
by the IDE build? or are
>these parallel independent build lines?

The two builds are independent, but neither builds the CGAL libraries.

Previously, on Windows the CGAL objects were built directly into the
application -- the libraries were not used at all. I have experimented
with this and found that for it to work with the upgraded CGAL
distribution, I need to disable auto-link (or exclude the auto-selected
library). That would seem to be no problem considering that there is no
CGAL library to link to in this case. However, I see from gmplib.org
that configuration of gmp.h is sensitive to dynamic vs static libraries:

http://gmplib.org/manual/Notes-for-Particular-Systems.html#Notes-for-Par
ticular-Systems):

"Static and DLL libraries can't both be built, since certain
export directives in gmp.h must be different."

If you have addressed these issues somehow (I only see one gmp.h, so I'm
not sure how), then I would prefer to let auto-link do its job since it
seems, based on the many flavors in auxiliary/gmp/lib, that it's used
for linking the GMP libraries too.

This is not really a big issue, though. On Windows we've only linked
statically until now and I don't see a need to use dynamic linking
(although my initial message stated that I need to link to a dynamically
linked library, that was due to a configuration error -- the target on
Windows is a statically linked standalone command-line application), so
mixups are unlikely.

Lots of options, lots of decisions to make... but my inclination at this
point is to leave auto-link enabled, link to the CGAL libraries
installed by the Windows installer (and therefore not build them locally
for Windows), and invoke devenv.exe directly to do the builds as
recommended.


--Ed Segall


-----Original Message-----
From: Fernando Cacciola
[mailto:]

Sent: Friday, October 12, 2007 5:58 PM
To:

Subject: Re: [cgal-discuss] CGAL auto-link and gmp vs MS Visual C++

Segall, Edward wrote:
>
> What do you recommend for a user who needs to do development in the
> Visual IDE, and also create release builds from the command line?
>
This really depends on your command line enviroment and how do you want
it to relate to the IDE builds.

Which command line do you use? (cmd or cygwin)

What tools do you use in the command line (simple makefiles? auotools?)

Does the build fom the command line need to use the libraries generated
by the IDE build? or are these parallel independent build lines?

IIUC correctly you can create makefiles suitable for command line builds
FROM a solution loaded in the IDE.

If run the windows installer and choose to download the gmp precompiled
libraries, it should be sufficient to store them in the search path to
cause auto-linking to work.

Alternatively, you can just disable auto-linking entirely if you whish,
by defining

CGAL_NO_AUTOLINK (disables it for all libs)

or

CGAL_NO_AUTOLINK_GMP and CGAL_NO_AUTOLINK_MPFR (disbles it for gmp/mpfr
only)

HTH

Fernando Cacciola
GeometryFactory
--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://lists-sop.inria.fr/wws/info/cgal-discuss


Confidentiality Notice
This e-mail (including any attachments) is intended only for the recipients
named above. It may contain confidential or privileged information and should
not be read, copied or otherwise used by any other person. If you are not a
named recipient, please notify the sender of that fact and delete the e-mail
from your system.





Archive powered by MHonArc 2.6.16.

Top of Page