[Bf-committers] Building the unit tests using VS2015

Gratian Lup lgratian at gmail.com
Sun Dec 4 12:06:00 CET 2016


Hello,

I'm a developer on the Visual C++ optimizer and was looking into adding
Blender into our new test suite that contains dozens of popular/large
open-source applications. This is meant to catch more bugs before releasing
the product - it's a win both for us and the projects, which should have a
much easier time upgrading.

I followed the instructions to build Blender and it builds fine with VS2015
Update 3, until I enable the unit tests using -WITH_GTEST in Cmake. There
are a few unit tests that fail to build with linking problems. For example:

o cycles_render_graph_finalize_test:
error LNK2019: unresolved external symbol _TIFFSetErrorHandler referenced
in function "public: __thiscall
OpenImageIO::v1_7::TIFFInput::TIFFInput(void)" (??0TIFFInput at v1_7
@OpenImageIO@@QAE at XZ)

o BLI_string_test:
error LNK2019: unresolved external symbol "__declspec(dllimport) public:
__thiscall std::basic_ostream<char,struct std::char_traits<char>
>::basic_ostream<char,struct std::char_traits<char> . . .

The only way to avoid these problem was to disable WITH_CYCLES in Cmake, so
that those test projects are not created in the first place.

Is this a known problem? I used the master branch with the latest prebuilt
libs for x86. The remaining tests build and run without problems, hopefully
they will be useful to catch potential optimizer bugs.

Thanks,
Gratian Lup
Visual C++ optimizer team


More information about the Bf-committers mailing list