LNK4098 use /NODEFAULTLIB:library

Those flags should be passed to target_linker_options() for the target in question. This sounds like a mixed release/debug environment which is tricky to get to work. I really recommend using RelWithDebInfo if possible (or Debug for the whole stack if it is really necessary).