zelenski/stanford-cpp-library

Use Stanford c++ library into cmakelist.txt

kargarisaac opened this issue · 3 comments

Hello,
Thank you for the great library. I want to use this library in CLion and add it into cmakelist.txt file. I use:

file(GLOB SOURCES
StanfordCPPLib/collections/.h
StanfordCPPLib/collections/
.cpp
StanfordCPPLib/graphics/.h
StanfordCPPLib/graphics/
.cpp
StanfordCPPLib/io/.h
StanfordCPPLib/io/cpp
StanfordCPPLib/private/
.h
StanfordCPPLib/private/
.cpp
StanfordCPPLib/system/.h
StanfordCPPLib/system/
.cpp
StanfordCPPLib/util/.h
StanfordCPPLib/util/
.cpp
)

add_executable(myproject ${SOURCES})

But when I for example include strlib.h in my code, It says that : private/init.h: No such file or directory.

Do you have any idea how to make it work?

Thanks

I have this problem as well.

fatal error: private/init.h: No such file or directory
32 | #include "private/init.h" // ensure that Stanford C++ lib is initialized

xuehao commented

https://github.com/xuehao/SimpleCxxLib

I maintain a CMake version fork for the textbook library.

I created a fork that uses CMake and the Qt version of the Stanford Library (not the java version).

https://github.com/DrErickson/stanford-cpp-library/

I verified it works with Qt6.2.4, MinGW v11.0