README.VisualStudio (pfstools-2.1.0.tgz) | : | README.VisualStudio (pfstools-2.2.0.tgz) | ||
---|---|---|---|---|
pfstools can be compiled with Visual Studio using CMake build system. This file contains some troubleshooting hints. | pfstools can be compiled with Visual Studio using CMake build system. This file contains some troubleshooting hints. | |||
Refer to README for details on building pfstools using CMake. | Refer to README for details on building pfstools using CMake. | |||
The compilation was tested with Visual Studio Express 2013. | The compilation was tested with Visual Studio Community 2019, 64-bit. | |||
Note that this compilation procedure is an alternative to using cygwin (refer to | As of 6/10/2019 only a portion of the pfstools programs can be compiled with MSV | |||
README.Cygwin). | C. | |||
This is partly because the code uses a feautures or includes not available in MS | ||||
VC. | ||||
To compile selected programs, you will probably need to comment out in src/CMake | ||||
Files.txt | ||||
selected directories. | ||||
To compile a native version of pfsview on Windows, check README.MinGW. | ||||
Note that this compilation procedure is an alternative to using cygwin (refer to | ||||
README.Cygwin). One exception is pfsview, which works better when natively comp | ||||
iled with Qt5 for Windows rather than with XWindow cleint in cygwin. | ||||
=== zlib === | ||||
zlib (http://www.zlib.net/) is required to compile pfstools. You can download pr | ||||
e-compiled libraries from: | ||||
https://www.bruot.org/hp/libraries/ | ||||
then update CMakeLists.txt to include the relevant path. Find the commented line | ||||
s: | ||||
%SET(ZLIB_DIR "C:/<path>") | ||||
%SET(CMAKE_INCLUDE_PATH ${ZLIB_DIR}/include ${CMAKE_INCLUDE_PATH}) | ||||
%SET(CMAKE_LIBRARY_PATH ${ZLIB_DIR}/ ${ZLIB_DIR}/lib ${CMAKE_LIBRARY_PATH}) | ||||
uncomment them and update the path. | ||||
=== QT === | === QT === | |||
Download and install Qt4 (not Qt5) for Visual Studio from: http://qt-project.org | ||||
/downloads | Update from 6/10/2019: Qt (pfsview) compilation with VisualStudio is not tested. | |||
This is because Qt does not support Visual Studio C++ 2019, which is the only a | ||||
vailable download at the Microsoft web pages. | ||||
Update from 27/12/2019: QT provides the libraries for VisualStudio 2019 now but | ||||
compilation results in a long list of errors. Giving up. pfsview compiled with M | ||||
inGW GCC works fine. | ||||
Download and install Qt5 for Visual Studio from: http://qt-project.org/downloads | ||||
Then add entry to CMake variables: | Then add entry to CMake variables: | |||
QT_QMAKE_EXECUTABLE:FILEPATH=E:\Qt\4.8.5\bin\qmake | -DQt5_DIR=C:/Qt/5.13.0/msvc2017_64/lib/cmake/Qt5 | |||
where E:\Qt\4.8.5\bin\qmake should be replaced with the path to qmake on your co | where C:/Qt/5.13.0/msvc2017_64/lib/cmake/Qt5 should be replaced with the path to | |||
mputer. | qmake on your computer. Use "/" instead of "\" | |||
You may need to compile in Release mode. Otherwise some DLLs might be missing. | ??You may need to compile in Release mode. Otherwise some DLLs might be missing. | |||
=== OpenEXR === | === OpenEXR === | |||
Compiling OpenEXR on Windows with Visual Studio is not a task for faint hearted. Be prepared to fix quite a few issues with the code. | Compiling OpenEXR on Windows with Visual Studio is not a task for faint hearted. Be prepared to fix quite a few issues with the code. | |||
* If the compiler complains about missing "__builtin_trap()", add | * If the compiler complains about missing "__builtin_trap()", add | |||
#define PLATFORM_WINDOWS 1 | #define PLATFORM_WINDOWS 1 | |||
to config/IlmBaseConfig.h | to config/IlmBaseConfig.h | |||
End of changes. 5 change blocks. | ||||
9 lines changed or deleted | 44 lines changed or added |