Closed TommInfinite closed 3 years ago
@TommInfinite The release .lib file I got was actually over 50 MB before I added the /Zc:inline compiler flag for MSVC, which I just did with https://github.com/ousnius/nifly/commit/e55035bd997211f30a0c5443a182043c3b8ac0c2
I think the 18 MB size is normal for now, it won't be that large when linking it into your final executable or library because the unused parts of the lib will be removed. Still it's worth investigating, as 18 MB is still not on the smaller side.
So in the end I: 1)Used CMake to build "nifly.lib". 2)Added it to my Project folder and added the folder to "Additional Library Directories" in "Properties" 3) Added "nifly.lib" to "Additional dependencies" to "Input" So when I try to write code, Visual Studio is behaving like library doesn't exists. (Identifier "NifFile" is undefined and etc.) Have I missed a something?
So in the end I: 1)Used CMake to build "nifly.lib". 2)Added it to my Project folder and added the folder to "Additional Library Directories" in "Properties" 3) Added "nifly.lib" to "Additional dependencies" to "Input" So when I try to write code, Visual Studio is behaving like library doesn't exists. (Identifier "NifFile" is undefined and etc.) Have I missed a something?
You need to include the headers as well.
I tried to and failed as well.
Not #include "NifFile.hpp" nor "#include "include\NifFile.hpp"" work.
You might have to find a tutorial on how to link and include libraries with C++ online, nifly is nothing special here. Closing this as it has nothing directly to do with nifly any longer.
Hello! When I'm building nifly DLL as a static library, it's size is 18 mb(in Release mode). Is this normal or am I doing something wrong? I previously used cmake-gui to build the .sln project. This is my first time building dependencies on other libraries so I'd appreciate help with this.