I used Microsoft Visual Studio 2008 for the development of MNRT. Hence MNRT is currently only available for Windows. But as I used almost no Windows specific code, compiling MNRT for other operating systems should be possible, assumed that the target system has support for CUDA. All used third party libraries are platform independent, e.g. the wxWidgets library for the user interface.
- Target Platform
- In the early phases of development, I compiled MNRT for the x64 platform, too. For convenience I dropped x64 and sticked with Win32, mainly to avoid additional problems (e.g. with libraries). I haven't tested compiling for x64 for some time.
- Preprocessor definitions
- Most of the preprocessor definitions currently used result from including the GUI library wxWidgets, specifically the Windows version of it. The wiki on wxWidgets, the wxWiki, lists all required definitions for wxWidgets.
- Runtime Library
- I compile MNRT using the Multi-Threaded (
/MT) runtime library option, see "C/C++ ->
Code Generation" properties. For debug mode of course, this should be Multi-threaded Debug (/MTd). The same has to be used for the correspoonding options in the CUDA build rule and all used libraries. Ignoring this will lead to linker problems.
- Required Libraries
- To compile MNRT, you'd have to compile several third party libraries. I decided not to include compiled versions of these libraries, primarily to save space. The following list shows all used libraries. It contains links to sites where you can download each library. Furthermore I added the library versions I used for compilation.
Please note that all these libraries have to be compiled using the Multi-Threaded (/MT) runtime library option for release and Multi-threaded Debug (/MTd) for debug mode. See "C/C++ -> Code Generation" property page.
- Assumed Environment Variables
- Currently the properties of MNRT assume the existance of some environment variables that describe the paths to some libraries. You have the option to use them or to replace them with concrete paths.
| Env. Variable | Description |
ASSIMP_PATH | Path to ASSIMP SDK root directory. |
DEV_IL_PATH | Path to DevIL SDK root directory. |
CUDA_INC_PATH | CUDA library include path. |
CUDA_LIB_PATH32 | CUDA library path for 32-bit libraries. I added this as I installed the x64 version of the CUDA toolkit. |
NVSDKCOMPUTE_ROOT | CUDA SDK root directory path. |
WXWIN | wxWidgets root directory path. |
- Additional Dependencies
- The bulk of dependencies are required for the GUI components created with wxWidgets. Again, I refer to the wxWiki for the dependancies required for wxWidgets. Debug mode versions of some the libraries will be available by including an additional "d" or "D", as shown by [d] or [D].
- cuda.lib: CUDA library.
- cudart.lib: CUDA Runtime library.
- cutil32[D].lib: CUDA SDK utility library.
- glut32.lib: OpenGL Utility Toolkit. For CUDA-OpenGL-interoperability.
- glew32.lib: OpenGL Extension Wrangler Library. For CUDA-OpenGL-interoperability.
- assimp.lib: Open Asset Import Libary.
- cudpp32[d].lib: CUDA Data Parallel Primitives Library.
- DevIL.lib: Developer's Image Library.
- wxmsw28[d]_core.lib: Required for wxWidgets.
- wxbase28[d].lib: Required for wxWidgets.
- wxmsw28[d]_html.lib: HTML control support (wxWidgets).
- wxmsw28[d]_gl.lib: OpenGL canvas support (wxWidgets).
- wxmsw28[d]_adv.lib: Advanced wxWidgets components.
- comctl32.lib: Required for wxWidgets.
- rpcrt4.lib: Required for wxWidgets.
- winmm.lib: Required for wxWidgets.
- advapi32.lib: Required for wxWidgets.
- wsock32.lib: Required for wxWidgets.
- wxcode_msw28[d]_propgrid.lib: wxPropertyGrid control library.
- printf Commands
- As I switched to the wxWidgets GUI, the valuable command line window seemed to be lost. I was not able find any simple way of passing the
stdout to some wxWidgets component. However, Fermi GPUs allow printf inside kernels, a very useful feature. To retain the command line window, I switched to the Console (/SUBSYSTEM:CONSOLE) sub system (see Linker options). Furthermore I had to replace the IMPLEMENT_APP() macro with a IMPLEMENT_APP_CONSOLE() macro to get a valid main(). Else there there was the linker error LIBCMT.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
Of course, for a version without command line window, the former macro has to be used in conjunction with Windows sub system linker option (/SUBSYSTEM:WINDOWS).