openexr-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Openexr-devel] OpenEXR Windows port


From: Dustin Graves
Subject: Re: [Openexr-devel] OpenEXR Windows port
Date: Fri, 24 Jan 2003 00:22:12 -1000
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.2) Gecko/20021126

Last night I did a rough port to Windows with Visual Studio 6 + Intel 5.0 Compiler. I was unable to use the compilers provided with both Visual Studio 6.0 and .NET because they do not recognize this as legal syntax:

template <class T>
template <class S>
inline bool
Vec2<T>::operator != (const Vec2<S> &v) const
...

The template followed by a template causes a syntax error. This is a bug with the compiler, which I'll try reporting to Microsoft.

But I was able to compile most of the code with the Intel compiler. Everything except IlmImfTest and ImathTest, because they use the drand48 family of functions which are not provided with Visual Studio. The port was pretty simple, requiring few changes. The most prominent changes were:

1.  typedef Int64 as __int64
2.  the numeric suffix UUL is not supported, and must be changed to UL
3. std::min and std::max are unavailable (due to conflict with min and max in windefs.h), so std::_MIN and std::_MAX are provided instead. 4. Imath needed a preprocessor directive to indicate hypot should be used instead of hypotf 5. Scoping error with variable declarations within 'for' loops, resulting in multiple defines, required variables to be declared outside of the 'for' loop, once per function.
6.  windows.h must be included before gl.h

I think that was pretty much it. I have put the VC6 project files, patches with the changes I made for the Windows port, and precompiled binaries (libs for Imath, Iex, Half, IlmImf, and an executable for exdisplay) on the web. You can find them at:

http://www.hawaiian.net/~dgraves/openexr/openexr.html

Also, Intel has a 30 day trial period for their compiler for anyone interested. You can optain it from their website. The installer will integrate it with Visual Studio, allowing you to select the compiler from the Tools menu. But, hopefully if the problem with templates and their template members is somehow resolved the Intel compiler will be unnecessary.

Dustin





reply via email to

[Prev in Thread] Current Thread [Next in Thread]