Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error: ‘format’ is not a member of ‘boost’ #65

Open
Lukas-Dresel opened this issue Oct 1, 2016 · 1 comment
Open

error: ‘format’ is not a member of ‘boost’ #65

Lukas-Dresel opened this issue Oct 1, 2016 · 1 comment

Comments

@Lukas-Dresel
Copy link

Lukas-Dresel commented Oct 1, 2016

When compiling on Lubuntu in my virtual machine I get the following error:

medusa/src/core/instruction.cpp:40:22: error: ‘format’ is not a member of ‘boost’
   std::string Res = (boost::format("mnem: %s(%08x), length: %d, prefix: %08x, oprd: %d")

This can be fixed by adding #include <boost/format.hpp> at the top of the instruction.cpp file, but I am assuming I am doing something else wrong during build.

I created the makefiles using cmake -DCMAKE_BUILD_TYPE=Release -DBOOST_ROOT:PATH=/usr/local/lib/ -DLLVM_ROOT=~/User/tools/llvm-build ..

I built boost from the source code directly and installed it using ./b2 install once it was done. The output and a check in the file system finds the installed files in /usr/local/lib.

My boost version is 1.62.0 and there have been CMake warnings before this happens, but it seemed to have found the boost dependencies anyway. This can be seen here

CMake Warning at /usr/share/cmake-3.5/Modules/FindBoost.cmake:725 (message):
  Imported targets not available for Boost version 106200
Call Stack (most recent call first):
  /usr/share/cmake-3.5/Modules/FindBoost.cmake:763 (_Boost_COMPONENT_DEPENDENCIES)
  /usr/share/cmake-3.5/Modules/FindBoost.cmake:1332 (_Boost_MISSING_DEPENDENCIES)
  CMakeLists.txt:102 (find_package)


-- Boost version: 1.62.0
-- Found the following Boost libraries:
--   system
--   filesystem
--   thread
--   date_time
--   program_options
--   unit_test_framework

Any ideas what I'm doing wrong?

@wisk
Copy link
Owner

wisk commented Oct 3, 2016

Hi Lukas,

It seems I forgot to add a include here, but for some reason it was working before boost 1.62, thanks for reporting.
I applied your fix on my current build, but since I'm planning to do a massive release soon, I've to finish the db_soci first. Sorry for the inconvenience.
Regarding the warning on CMake, I think it might come from your CMake version and the FindBoost.cmake shipped with it. Please take a look at https://github.com/Kitware/CMake/blob/master/Modules/FindBoost.cmake#L533 and compare with your version. I think this is not important here, and the issue came from the missing include.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants