Code Monkey home page Code Monkey logo

Comments (6)

adepierre avatar adepierre commented on June 16, 2024

I guess you added the include folders correctly to your project but you forgot to link to the library. It's difficult to say without knowing what command you used for the compilation.

from botcraft.

firejoust avatar firejoust commented on June 16, 2024

I used
/snap/clion/126/bin/cmake/linux/bin/cmake --build /home/mezza/Documents/C++/mccpp/cmake-build-debug --target mc -- -j 3

from botcraft.

adepierre avatar adepierre commented on June 16, 2024

This actually doesn't show how you add the include folders and link to the library.

from botcraft.

firejoust avatar firejoust commented on June 16, 2024

Ah sorry, i'm still relatively new to c++ and have trouble understanding some of the concepts involved. Do you only need the #include <botcraft/Game/InterfaceClient.hpp> part or is there something i'm still missing?

from botcraft.

firejoust avatar firejoust commented on June 16, 2024

The library was installed to the default location at /usr/local, I assumed that the compiler looked there automatically for references

from botcraft.

adepierre avatar adepierre commented on June 16, 2024

No the .hpp files are just one part. If the library is header only, you're done, but if the library includes some .cpp files (like botcraft), you also need to give your compiler the compiled library file.

If you and the library are using cmake, everything can be done automatically with one line. In the example:

target_link_libraries(0_HelloWorld botcraft)

If not you have to give it to your compiler manually. I suggest you to try to learn about libraries and how to link in cpp, it will surely be useful more than once!

from botcraft.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.