Reputation: 87
I'm using Visual Studio 2019 to make a simple scene with OpenGL. The libraries and includes seem to be correctly configured since I can access the header files and the assimp folderstructure. When I try to include any assimp headers though I get this error, the weird thing is that the file is in the folder. It is called "config.h.in" when removing the ".in" from the file I get the error code "E0011" in line 1016 of the "config.h" file. Which reads as follows
// ---------- All the Build/Compile-time defines ------------
/** @brief Specifies if double precision is supported inside assimp
*
* Property type: Bool. Default value: undefined.
*/
#cmakedefine ASSIMP_DOUBLE_PRECISION 1
#endif // !! AI_CONFIG_H_INC
Those are lines 1009 to 1018, while the file is open in VS19 I get no error only when switching to another file. I get the error again.
EDIT. I did use CMake and VS to build the Library and .dll files
Upvotes: 3
Views: 5194
Reputation: 184
If you build with CMake into a different folder (like /build
), then
there are 2 different include/assimp
folders.
After the solution is built by Visual Studio, the repository source folder will contain the include/assimp
(general) folder with all header files. The build folder will contain another include/assimp
folder with only 2 files: config.h
and revision.h
, Simply copy these into the general folder and enjoy!
Upvotes: 0
Reputation: 2833
The config.h.in file is the input-file for the configuation-generation-process which is performed during the cmake-build-generation we are using in the Asset-Impoprter-Lib. The cmake-run will read the config.h.in file, replace the defines coming from cmake in the config.h .in and write the generated config.h file in you include folder. So if you want to generate a valid config.h file you have to run the assimp-cmake run before running your own build.
I guess you are just using a solution-file for your opengl-example. So you can install cmake, run it in the root-folder of your assimp-installation and you will be able to find a valid config.h file.
The config.h file contains the defines for your assimp-configuration like which kind of precision will be used and so on.
Upvotes: 3