#[CMake] Could NOT find Boost (missing: Boost_INCLUDE_DIR system date_time regex)

69 messages · Page 1 of 1 (latest)

main seal
#

Hello everybody!

So I'm totally new to this CMake and such. I got stuck half way in trying to install mailio lib. I have installed boost and I've watched youtube videos about CMake and even checked out their website regarding find_package().

This is the line where the program terminates:
"find_package(Boost REQUIRED COMPONENTS system date_time regex)"

I still could'nt resolve the problem. I kindly ask for thy help
Sincerely, Dani

hasty palmBOT
#

When your question is answered use !solved to mark the question as resolved.

Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question use !howto ask.

main seal
#

I've tried specifying the full path as well instead of just the name "Boost"

main seal
#

Am I in the wrong section or does no one code with external libraries here?

nimble blaze
#

Need more information

#

What is the full cmake error?

#

Please also send your CMakeLists.txt

main seal
#

Thank you for replying. That is the part that gets terminated. The cmakelist is the original from mailio but yes I can send it. Gimme a sec

nimble blaze
#

What do you mean specifically by terminated?

main seal
#

Like I press generate and then it starts with the lines specifying c++ version and such. Then when it reaches boost it terminates cuz it can’t find it

#

Line: 64

pallid shadow
#

and where is your boost installed?

main seal
#

in c:/local

#

I tried specifying full path as well

#

w/o result

pallid shadow
#

and you have the static libs you're asking for?

#

system date_time regex

main seal
#

This?

#

C:\local\boost_1_84_0\libs\date_time

pallid shadow
#

did you build boost?

#

some boost libraries are header only and don't require building, but boost.system, boost.date_time, boost.regex need to be built

#

and since the CMakeLists.txt does set(Boost_USE_STATIC_LIBS ON) find_package looks for static libs

main seal
#

i first tried the zip and then the binary installer

#

so it should be build this time after using binary installer right?

pallid shadow
#

I dunno what installer that is or what it installs

#

do you have .lib files in there somewhere?

main seal
#

the 3 pkgs you mentioned are in seperate dl areas?

#

i dont seem to have lib files no

#

Is this the regex?
C:\local\boost_1_84_0\boost\regex

pallid shadow
#

that's probably where the headers and/or sources for regex are

main seal
#

and this should be the system

pallid shadow
#

yeah, these are only header files, though

#

cmake is looking for compiled libraries

main seal
#

i feel so lost around these other areas. i just wanted to code. this feels harder than to learn the language

pallid shadow
#

what compiler/toolchain are you using

#

VS / MSVC? Some MinGW/msys2 GCC?

main seal
#

tried multiple, now i had to do vs

#

vs only not code

#

I believe its gnu c

pallid shadow
#

in visual studio? thonk

#

it's possible but normally you'd use microsoft's compiler in VS

main seal
#

atleast it was in code::block

pallid shadow
#

so, you have a few choices

#

you can read through the boost documentation to figure out how to build it, as static libraries, for windows/your compiler

#

or you can use a package manager to install boost

main seal
pallid shadow
#

👍

main seal
#

sorry you wanted the whole msg

pallid shadow
#

I can guess what it will say

main seal
#

package manager is cmake or vcpkg right?

pallid shadow
#

vcpkg yeah

#

cmake is a build system (kind of)

main seal
#

oh I see

#

There was a section using that too

#

Ok I will try using the vcpkg and google even more. Is it hard for everyone starting with external libraries? I thought the hardest part was learning programming logic...

pallid shadow
#

in C++, yes it can be hard :v

nimble blaze
#

That is the easiest part

pallid shadow
#

14.3 is the VC++ version you have

main seal
main seal
hasty palmBOT
#

@main seal Has your question been resolved? If so, type !solved :)

main seal
#

@pallid shadow i fkng love u

#

i used the vcpkg and then on sqlite i saw they used integrate install

#

that was so fkn easy that i want to trash myself...

#

!solved