Linker errors

From Newton Wiki
Jump to: navigation, search

If you are trying to link to the static versions of the Newton library, remember to define _NEWTON_USE_LIB before including newton.h. Otherwise you'll get a whole heap of linker errors. For convenience, you could specify it in the preprocessor compiler options.


Another thing to mention is that you should not try to link against the 64-bit libraries if you are linking with 32-bit libraries. That will not work.

If you are getting LINK errors such as

 error LNK2019: unresolved external symbol __imp__NewtonDestroy referenced in function _main

Then be sure to check that you are linking to newton.lib and that you are linking to the right library type: 32bit or 64bit.