I'm running into this shell output as of 98a1b76 in which it fails to include the config header. This is from a clean build. I also observed output earlier similar to that listed in #1553 though I can't easily confirm at this time if they're related. Any ideas on how I might fix this?
Truncated Shell Output
rm -rf * && cmake .. && make
...
In file included from ../Glitter/Vendor/assimp/include/assimp/Importer.hpp:55:
In file included from ../Glitter/Vendor/assimp/include/assimp/types.h:57:
../Glitter/Vendor/assimp/include/assimp/defs.h:52:10: fatal error: 'assimp/config.h'
file not found
#include <assimp/config.h>
Compiler
Apple LLVM version 9.0.0 (clang-900.0.38)
Target: x86_64-apple-darwin17.2.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
I am building on an Apple MacBook Pro 11,3 running macOS 10.13.1. If you have a similar config on hand, you should theoretically be able to reproduce the log by compiling my Glitter project with the assimp submodule updated to latest. (?)
Hm, funny. Config.h will be generated by the cmake run. So is this file located somewhere else?
So on disk, cmake appears to have placed the generated config.h here ../Glitter/Build/Glitter/Vendor/assimp/include/assimp/config.h. That seems to be the only config file for assimp in the build directory, at least, that my editor can find. I can do a more exhaustive search when I get back to a real computer later this week.
I have same problem.
I have assimp as submodule and including "assimp/include". What do I need include to get it working?
Still seeing this as of d3833fe8. Is there anything I can try as a workaround? Happy to provide more information or try some debugging steps locally if you have questions.
@kimkulling ping
You should just need to include both the include dir from the project and the one from the build dir. The build dir has config.h, and the main include dir has all the other headers. I'm using assimp as a submodule and building with cmake, and this is working for me (with assimp master branch checked out in lib/assimp):
set(ASSIMP_LIBRARIES assimp)
set(ASSIMP_LIBRARY_DIRS "lib/assimp/build/code")
set(ASSIMP_INCLUDE_DIRS "lib/assimp/include" "lib/assimp/build/include")
include_directories(${ASSIMP_INCLUDE_DIRS})
link_directories(${ASSIMP_LIBRARY_DIRS})
I think I ran into a related problem. I got errors on compilation about undefined identifiers. It turned out this was caused by the config.h being read from the assimp/include folder, not from the assimp-build/include folder where the one cmake generated is placed.
What I did is change the order in which the include folders are searched in Visual Studio and now I can build again.
Shall be closed by https://github.com/assimp/assimp/pull/2047.
Most helpful comment
You should just need to include both the include dir from the project and the one from the build dir. The build dir has config.h, and the main include dir has all the other headers. I'm using assimp as a submodule and building with cmake, and this is working for me (with assimp master branch checked out in
lib/assimp):set(ASSIMP_LIBRARIES assimp) set(ASSIMP_LIBRARY_DIRS "lib/assimp/build/code") set(ASSIMP_INCLUDE_DIRS "lib/assimp/include" "lib/assimp/build/include") include_directories(${ASSIMP_INCLUDE_DIRS}) link_directories(${ASSIMP_LIBRARY_DIRS})