Skip to content
This repository has been archived by the owner on Dec 1, 2021. It is now read-only.

nlohmann/json_fwd.hpp: No such file or directory #38

Closed
Jm56Z opened this issue Apr 8, 2020 · 4 comments
Closed

nlohmann/json_fwd.hpp: No such file or directory #38

Jm56Z opened this issue Apr 8, 2020 · 4 comments

Comments

@Jm56Z
Copy link

Jm56Z commented Apr 8, 2020

I cloned the repository with its dependencies, and built the lib:

git clone --recursive git@github.com:zeroxs/aegis.cpp
cd aegis.cpp
mkdir build
cd build
cmake ..
make
sudo make install

No error until here.

Then I created a little project, with a single main.cpp file, containing the template code given in the Readme - in which I took care to replace "TOKEN" with my bot's token, obviously.

When compiling it with

g++ -o bot src/main.cpp -Wall -Wextra -Werror

I get an error:

/usr/local/include/aegis/fwd.hpp:12:10: fatal error: nlohmann/json_fwd.hpp: No such file or directory

I'm investigating on this, looking for some lib I wouldn't have installed on my PC.

@zeroxs
Copy link
Owner

zeroxs commented Apr 8, 2020

You're missing all the libs being linked, all the include directories, everything.

@Jm56Z
Copy link
Author

Jm56Z commented Apr 8, 2020

You're missing all the libs being linked, all the include directories, everything.

You mean I have to install all libs ? I didn't understand it that way, as they are downloaded with the repository.

@Jm56Z Jm56Z closed this as completed Apr 8, 2020
@zeroxs
Copy link
Owner

zeroxs commented Apr 8, 2020

No. Right now, you are calling g++ and telling it to only compile the main.cpp. Nothing more. What about the json lib? g++ doesn't know where it is. zlib, openssl, asio, etc. You're missing all the parameters for g++. I would highly recommend using cmake as it does it all for you.

@Jm56Z
Copy link
Author

Jm56Z commented Apr 8, 2020

Gosh I didn't realise how much I could forget in a few months of not coding C++...

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

No branches or pull requests

2 participants