简体   繁体   中英

OGRE error LNK2001: unresolved external symbol

I'm trying to get some OGRE sample to compile in VS 2013 but I keep getting the same error no matter what I do:

error LNK2001: unresolved external symbol "class boost::system::error_category const & __cdecl boost::system::system_category(void)"

The OGRE SDK comes with the boost library. Unfortunatly it is not compatible with VS2013 so I've downloaded the last version compiled using VS2013. You can find it here

The "additional Include Directories" and "additional Library Directories" are properly setup.

The error state that you are using a symbol that is declared , but not implemented , boost::system::error_category is a method of boost, that various libraries use when managing errors, it belong to the system library, the implementation of this method is in [BOOST_ROOT]\\boost\\libs\\system\\src\\error_code.cpp .

The most probably cause is that your are including the OGRE's library or part of the library that include some boost's libraries that use this method.

A lot of libraries from boost are header only, but this specific library system are not, it need compilation of this .cpp : two possible fixes are compiling an .LIB or .DLL from boost (see Prepare to Use a Boost Library Binary for more info about this) and using this in your project (could be better if you would be using a lot of libraries from boost that are not header only) or the most easy fix: including the error_code.cpp file in your project and compiling again.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM