opengl-tutorials / ogl

http://www.opengl-tutorial.org
2.69k stars 925 forks source link

Error when building assimp external lib #40

Closed valera-rozuvan closed 7 years ago

valera-rozuvan commented 7 years ago

Hi guys! So some of the tutorials build just fine on my system (I can run the executable files, and see expected results). However, when it comes to the tutorial which uses the assimp library - there is an error. I am attaching the logs below.

My system is Windows 10, 64bit. I am using the compilers g++.exe (x86_64-win32-sjlj-rev0, Built by MinGW-W64 project) 7.1.0, and gcc.exe (x86_64-win32-sjlj-rev0, Built by MinGW-W64 project) 7.1.0. Version of cmake is cmake version 3.9.0-rc3.

[ 36%] Building CXX object external/bullet-2.81-rev2613/src/BulletCollision/CMakeFiles/BulletCollision.dir/CollisionShapes/btTriangleMesh.cpp.obj
In file included from C:/dev/github/opengl-tutorials/ogl/external/assimp-3.0.1270/include/assimp/Logger.hpp:47:0,
                 from C:/dev/github/opengl-tutorials/ogl/external/assimp-3.0.1270/include/assimp/DefaultLogger.hpp:46,
                 from C:\dev\github\opengl-tutorials\ogl\external\assimp-3.0.1270\code\AssimpPCH.h:136,
                 from C:\dev\github\opengl-tutorials\ogl\external\assimp-3.0.1270\code\Assimp.cpp:45:
C:/dev/github/opengl-tutorials/ogl/external/assimp-3.0.1270/include/assimp/types.h: In member function 'void aiString::Set(const char*)':
C:/dev/github/opengl-tutorials/ogl/external/assimp-3.0.1270/include/assimp/types.h:284:24: error: '::strlen' has not been declared
   const size_t len = ::strlen(sz);
                        ^~~~~~
C:/dev/github/opengl-tutorials/ogl/external/assimp-3.0.1270/include/assimp/types.h:284:24: note: suggested alternative: 'mbrlen'
   const size_t len = ::strlen(sz);
                        ^~~~~~
                        mbrlen
C:/dev/github/opengl-tutorials/ogl/external/assimp-3.0.1270/include/assimp/types.h: In member function 'void aiString::Append(const char*)':
C:/dev/github/opengl-tutorials/ogl/external/assimp-3.0.1270/include/assimp/types.h:317:22: error: 'strlen' was not declared in this scope
   const size_t len = strlen(app);
                      ^~~~~~
C:/dev/github/opengl-tutorials/ogl/external/assimp-3.0.1270/include/assimp/types.h:317:22: note: suggested alternative: 'mbrlen'
   const size_t len = strlen(app);
                      ^~~~~~
                      mbrlen
C:/dev/github/opengl-tutorials/ogl/external/assimp-3.0.1270/include/assimp/types.h:318:8: error: in argument to unary !
   if (!len) {
        ^~~
In file included from C:/dev/github/opengl-tutorials/ogl/external/assimp-3.0.1270/include/assimp/scene.h:49:0,
                 from C:\dev\github\opengl-tutorials\ogl\external\assimp-3.0.1270\code\AssimpPCH.h:139,
                 from C:\dev\github\opengl-tutorials\ogl\external\assimp-3.0.1270\code\Assimp.cpp:45:
C:/dev/github/opengl-tutorials/ogl/external/assimp-3.0.1270/include/assimp/texture.h: In member function 'bool aiTexture::CheckFormat(const char*) const':
C:/dev/github/opengl-tutorials/ogl/external/assimp-3.0.1270/include/assimp/texture.h:171:18: error: '::strncmp' has not been declared
   return (0 == ::strncmp(achFormatHint,s,3));
                  ^~~~~~~
C:/dev/github/opengl-tutorials/ogl/external/assimp-3.0.1270/include/assimp/texture.h:171:18: note: suggested alternative: 'wcsncmp'
   return (0 == ::strncmp(achFormatHint,s,3));
                  ^~~~~~~
                  wcsncmp
In file included from C:\dev\github\opengl-tutorials\ogl\external\assimp-3.0.1270\code\AssimpPCH.h:139:0,
                 from C:\dev\github\opengl-tutorials\ogl\external\assimp-3.0.1270\code\Assimp.cpp:45:
C:/dev/github/opengl-tutorials/ogl/external/assimp-3.0.1270/include/assimp/scene.h: In member function 'aiNode* aiNode::FindNode(const char*)':
C:/dev/github/opengl-tutorials/ogl/external/assimp-3.0.1270/include/assimp/scene.h:155:10: error: '::strcmp' has not been declared
   if (!::strcmp( mName.data,name))return this;
          ^~~~~~
C:/dev/github/opengl-tutorials/ogl/external/assimp-3.0.1270/include/assimp/scene.h:155:10: note: suggested alternative: 'strtol'
   if (!::strcmp( mName.data,name))return this;
          ^~~~~~
          strtol
In file included from C:\dev\github\opengl-tutorials\ogl\external\assimp-3.0.1270\code\AssimpPCH.h:147:0,
                 from C:\dev\github\opengl-tutorials\ogl\external\assimp-3.0.1270\code\Assimp.cpp:45:
C:\dev\github\opengl-tutorials\ogl\external\assimp-3.0.1270\code\StringComparison.h: In function 'int Assimp::ASSIMP_stricmp(const char*, const char*)':
C:\dev\github\opengl-tutorials\ogl\external\assimp-3.0.1270\code\StringComparison.h:137:11: error: '::strcasecmp' has not been declared
  return ::strcasecmp(s1,s2);
           ^~~~~~~~~~
C:\dev\github\opengl-tutorials\ogl\external\assimp-3.0.1270\code\StringComparison.h:137:11: note: suggested alternative: 'wcsicmp'
  return ::strcasecmp(s1,s2);
           ^~~~~~~~~~
           wcsicmp
C:\dev\github\opengl-tutorials\ogl\external\assimp-3.0.1270\code\StringComparison.h: In function 'int Assimp::ASSIMP_strincmp(const char*, const char*, unsigned int)':
C:\dev\github\opengl-tutorials\ogl\external\assimp-3.0.1270\code\StringComparison.h:186:11: error: '::strncasecmp' has not been declared
  return ::strncasecmp(s1,s2, n);
           ^~~~~~~~~~~
In file included from C:\dev\github\opengl-tutorials\ogl\external\assimp-3.0.1270\code\GenericProperty.h:45:0,
                 from C:\dev\github\opengl-tutorials\ogl\external\assimp-3.0.1270\code\Assimp.cpp:48:
C:\dev\github\opengl-tutorials\ogl\external\assimp-3.0.1270\code\Hash.h: In function 'uint32_t SuperFastHash(const char*, uint32_t, uint32_t)':
C:\dev\github\opengl-tutorials\ogl\external\assimp-3.0.1270\code\Hash.h:72:29: error: '::strlen' has not been declared
  if (!len)len = (uint32_t)::strlen(data);
                             ^~~~~~
C:\dev\github\opengl-tutorials\ogl\external\assimp-3.0.1270\code\Hash.h:72:29: note: suggested alternative: 'mbrlen'
  if (!len)len = (uint32_t)::strlen(data);
                             ^~~~~~
                             mbrlen
[ 37%] Building CXX object CMakeFiles/tutorial09_several_objects.dir/common/texture.cpp.obj
[ 37%] Building CXX object external/bullet-2.81-rev2613/src/BulletCollision/CMakeFiles/BulletCollision.dir/CollisionShapes/btTriangleMeshShape.cpp.obj
[ 37%] Building CXX object CMakeFiles/tutorial10_transparency.dir/common/shader.cpp.obj
[ 37%] Building CXX object CMakeFiles/tutorial09_several_objects.dir/common/objloader.cpp.obj
external\assimp-3.0.1270\code\CMakeFiles\assimp.dir\build.make:62: recipe for target 'external/assimp-3.0.1270/code/CMakeFiles/assimp.dir/Assimp.cpp.obj' failed
mingw32-make.exe[2]: *** [external/assimp-3.0.1270/code/CMakeFiles/assimp.dir/Assimp.cpp.obj] Error 1
CMakeFiles\Makefile2:2291: recipe for target 'external/assimp-3.0.1270/code/CMakeFiles/assimp.dir/all' failed
mingw32-make.exe[1]: *** [external/assimp-3.0.1270/code/CMakeFiles/assimp.dir/all] Error 2
mingw32-make.exe[1]: *** Waiting for unfinished jobs....

Why might this be happening? Any help is welcome!

valera-rozuvan commented 7 years ago

This issue is a know issue. Please see https://github.com/assimp/assimp/issues/177 . It is fixed in version of assimp 3.2.1 (2016-10-10) and later. @Calvin1602 , @Whiteseeker - can you guys please update the external lib assimp to version 3.2.1 (or later)?

opengl-tutorial commented 7 years ago

Happy to update that tomorrow

On Sat, 24 Jun 2017, 20:12 Valera Rozuvan, notifications@github.com wrote:

This issue is a know issue. Please see assimp/assimp#177 https://github.com/assimp/assimp/issues/177 . It is fixed in version of assimp 3.2.1 (2016-010-10) and later. @Calvin1602 https://github.com/calvin1602 , @Whiteseeker https://github.com/whiteseeker - can you guys please update the external lib assimp to version 3.2.1 (or later)?

You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/opengl-tutorials/ogl/issues/40#issuecomment-310860095, or mute the thread https://github.com/notifications/unsubscribe-auth/AMF0SX6rznUQ-kRwVnkAkqpQMvSOMmKLks5sHV-KgaJpZM4OA7Bg .

-- You received this message because you are subscribed to the Google Groups "Contact opengl-tutorial.org" group. To unsubscribe from this group and stop receiving emails from it, send an email to contact-opengl-tutorialorg+unsubscribe@googlegroups.com. To post to this group, send email to contact-opengl-tutorialorg@googlegroups.com. To view this discussion on the web, visit https://groups.google.com/d/msgid/contact-opengl-tutorialorg/opengl-tutorials/ogl/issues/40/310860095%40github.com https://groups.google.com/d/msgid/contact-opengl-tutorialorg/opengl-tutorials/ogl/issues/40/310860095%40github.com?utm_medium=email&utm_source=footer . For more options, visit https://groups.google.com/d/optout.

-- Damien SWE @ Google http://www.opengl-tutorial.org/ https://whiteseeker.github.io/

valera-rozuvan commented 7 years ago

@opengl-tutorial Any progress on this?

valera-rozuvan commented 7 years ago

Thank you @Calvin1602 !