I have a compiled library (static .lib) in debug mode in C++ and Visual Studio and want to use it in a project which is going to be compiled in release mode. Is this possible? I couldn’t compile the library in the release mode 🙁
Let me ask a little bit more general question: what considerations should I care about working with libraries?
I have a compiled library (static .lib) in debug mode in C++ and Visual
Share
Yes. Debug mode only means there are assertions, debug symbols included, etc. The debug version of the library should be fully functional just like the release version (although it might run slower/consume more memory than a release build).
Edit: as David Rodriguez-dribeas points out, this can yield undefined behavior if a definition of an inline function is different in release and debug mode, as it then violates the one definition rule.
That’s too broad to be answered on StackOverflow.