Patricia
Patricia

Reputation: 5089

CMake Boost libboost_filesystem.so error adding symbols: File in wrong format

I'm new to CMake and to Boost!

I'm on a mac, so I can't test Boost code on my machine. I have a VM with Ubuntu. I am using JetBrains CLion IDE, which uses CMake to build. I've been unsuccessful with every tutorial I have tried. So, I just decided to make a project that does nothing. I've added the Boost information to the CMakeLists.txt file:

enter image description here


EDIT

Since I really didn't understand the CMakeLists.txt configuration, I learned that I was using one wrong configuration and needed to just remove the set(Boost_LIBRARY_DIR /usr/local/arm/lib) command. Here is a new image of the CORRECT CMakeLists.txt file.

enter image description here

I can't find where Boost_LIBRARIES is getting configured, which might have something to do with my problem. You can see main does nothing but print out "Hello, World!"

enter image description here

Here is the error I get when I try to build:

enter image description here

Upvotes: 0

Views: 3045

Answers (1)

Alain
Alain

Reputation: 572

Boost_LIBRARIES is configured when you call find_package(Boost 1.54 ....)

The line

set (Boost_LIBRARY_DIR /usr/local/arm/lib)

has no impact in your code.

The mac still uses the intel processor, AFAIK, and so would your Ubuntu VM. From the location of your boost libraries it looks like boost was compiled for arm. Do you have other boost libraries installed on your system? Did you install boost yourself?

a

Upvotes: 1

Related Questions