Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

Tags in this Discussion

Substandard SceneX SDK
  • I am interested in learning the SceneX SDK, so I downloaded it and trying to write an exporter for 3dsmax. I thought this would be a good way to learn the SceneX SDK. I'm using windows of course with VS 2010.

    Anyways, the big problem is, that if you include a header file it breaks the build! Incredible! Since most header files actually break the build, I'm forced to play an idiotic game of guessing which files to include before the failing include directive. But I'm finding that it seems to be an endless circular guessing game. So it finally resorts to GUESSING which header file to include to keep the compiler from blowing up with stupid errors like this:

    1>E:\Tools\NVidia\SceneX7_2\inc\nvsg\nvmath/nvmath.h(139): error C2226: syntax error : unexpected type 'T'
    1>E:\Tools\NVidia\SceneX7_2\inc\nvsg\nvmath/nvmath.h(139): error C2988: unrecognizable template declaration/definition


    For instance, no matter what I do, including the following file:
    "..\SceneX7_2\inc\nvsg\nvsg\PlugInterface.h"
    will lead to the compile failing.

    Unfortunately, the shoddy work runs deeper with this:

    1>E:\Tools\NVidia\SceneX7_2\inc\nvsg\nvutil/PlugIn.h(196): warning C4996: 'stricmp': The POSIX name for this item is deprecated. Instead, use the ISO C++ conformant name: _stricmp. See online help for details.
    1> C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\string.h(246) : see declaration of 'stricmp'


    For which there is no way to 'ignore' this warning.

    Not only that, but I get numerous build warnings like this too:

    1>e:\tools\nvidia\scenex7_2\inc\nvsg\nvutil/Trace.h(90): warning C4996: 'fopen': This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
    1> C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\stdio.h(234) : see declaration of 'fopen'


    This one is easy enough to fix, but you really shouldn't have to subject people to this...
    Please tell me you have someone working on this and that you will have a patch posted soon.
  • 2 Comments sorted by
  • btw: I have found that defining NOMINMAX will solve some of the build issues enumerated above. Unfortunately the help documentation says nothing about this.
  • Yes, unfortunately Microsoft's STL and Windows headers are broken on the std::min and std::max.
    We've defined -DNOMINMAX on the compiler command line normally (it's done by the FindSceniX.cmake in the SceniX 7.2\CMake folder), except in the MFCMinimal example, which adds another level of Microsoft header convolution in the stdafx.h on top.
    There are some explanations in the code when searching for NOMINMAX inside *.h;*.cpp;*.txt

    We actually had a chapter about setting up a new project inside the SceniX help, but with the change to CMake that got somehow obsolete. We'll add that back in.

    There are a lot of examples using the PlugInterface.h inside SceniX and I would recommend to start from a working project, like copying and renaming one sample in the samples folder, adjusting the project settings inside its CMakeLists.txt and adding the directory to the samples' CMakeLists.txt, which would get you the CMake environment used in the other samples.