POV-Ray : Newsgroups : povray.unix : Some notes about Cygwin/MinGW compilation : Some notes about Cygwin/MinGW compilation Server Time
19 Apr 2024 12:48:07 EDT (-0400)
  Some notes about Cygwin/MinGW compilation  
From: Christoph Hormann
Date: 2 Nov 2002 10:25:46
Message: <3DC3EE79.7EB4702C@gmx.de>
As posted in p.g. i have now managed to compile POV-Ray 3.5 using the
Cygwin environment and the '-mno-cygwin' flag for creating a version that
does not depend on the cygwin emulation dll (equivalent to a MinGW
version).

Previous attempts resulted in an executable crashing at every start.  As
it seems the reason is the 'canonicalize_path()' function in unix.cpp. 
This function is used for the IO restrictions and does not seem to work
safely under all circumstances.  Deactivating the IO restrictions avoided
this problem but note that the existing 'IO_RESTRICTIONS_DISABLED' switch
does not work since it does not avoid calling 'canonicalize_path()' in
'UNIX_Allow_File_Write()'.

Another problem was the 'BLOB' type identifier that is also used in one of
the windows header files.  Adding some things to 'config.h' helped but
this required frame.h being the first included file in all modules. 
Another identifier collision was 'INT32' which is used in the jpeg library
and one of the windows files differently.  Is there an elegant method for
avoiding such problems in C++ BTW?

And finally something really strange: the compiler complained about the
'rad2' element of the blob struct.  Changing its name to 'rad_2' in
blob.cpp, blob.h and parse.cpp helped but i have no idea why.

If you want to compile POV-Ray with Cygwin/MinGW yourself you need the
Cygwin environment including the MinGW packages.  I don't know if the
plain MinGW works as well but there could be tools missing required by the
configure script etc.  Additionally you will need the support libraries
(zlib, libpng, libjpeg, libtiff) and comile them with the '-mno-cygwin'
flag.  When building POV-Ray you will also have to make sure the compiler
uses the MinGW versions of all header files and libraries.  

Christoph

-- 
POV-Ray tutorials, include files, Sim-POV,
HCR-Edit and more: http://www.tu-bs.de/~y0013390/
Last updated 02 Nov. 2002 _____./\/^>_*_<^\/\.______


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.