Comments (5)
All examples should compile by default when running CMake and make. You should find the compiled executables inside the examples
folder inside your build folder.
If you do want to compile them manually, what you are missing is that in your command you do not link the examples with the AI-Toolbox compiled libraries. This means that at linking time all its functions will not be found; that's the reason of the undefined reference
errors.
from ai-toolbox.
Okay great, thank you so much! I was able to run them from the build/examples folder.
from ai-toolbox.
I know this is an old issue, but I just wanted to reopen this topic because I'd like to extend from my previous question a bit based on your answer:
If I wanted to compile the tutorials manually (or if I create a new program that uses some files from AI-Toolbox), you mentioned I'd have to link the programs with the AI-Toolbox compiled libraries. I have been using the following command to try to link a new program (called mdp2.cpp) with the AI-Toolbox libraries, but it does not work:
g++ mdp2.cpp -L /home/ben/AI/AI-Toolbox-master/build -l AIToolboxMDP
When I run that command, I get this error (which is the same error I get when I try to compile it without linking anything):
In file included from mdp2.cpp:9:
AI/AI-Toolbox-master/include/AIToolbox/MDP/Algorithms/ValueIteration.hpp:4:10: fatal error: AIToolbox/Impl/Logging.hpp: No such file or directory
4 | #include <AIToolbox/Impl/Logging.hpp>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
I have also tried adding -I /home/ben/AI/AI-Toolbox-master/include/AIToolbox/Impl
to my command, but it gives the same error. I assume I'm missing some steps or commands here, but I'm not sure what they are. I thought it might be because I'm not including a header file for the library in the program, but I couldn't find a header file for the library anywhere in the AI-Toolbox folders. I also looked in the AI-Toolbox README.md file but didn't see any instructions for how to link a program with the libraries. Any help you could give on this would be greatly appreciated!
from ai-toolbox.
Have you tried -I /home/ben/AI/AI-Toolbox/master/include/
?
In general I don't have any more instructions that I already have because these problems are mostly C++ specific rather than library specific; otherwise I might as well have a full C++ tutorial written in somewhere ;)
In any case, if you could get a bit familiar with CMake, it'd probably be less work to setup a C++ project that includes mine via CMake rather than keep working with compilation commands directly. I do have a project, https://github.com/Svalorzen/AI-Toolbox-Experiments, which I generally use as a base to run experiments for my research. It's not very documented because it's more for my personal use, but if you feel like looking at the CMakefiles a bit it might be easier to either use it or setup a CMake project yourself.
from ai-toolbox.
Okay, thanks; I'll check them out. The libraries are still not linking properly, but I was able to get past the error I posted using g++ mdp2.cpp -L /home/ben/AI/AI-Toolbox-master/build -l AIToolboxMDP -I /home/ben/AI/AI-Toolbox-master/include -I /usr/include/eigen3
.
from ai-toolbox.
Related Issues (20)
- Python module problem HOT 26
- Using the Toolbox to solve the Tag problem HOT 4
- Save POMDP policy HOT 6
- Sparse Matrix's on POMDP model HOT 22
- Improve serialization for MDP and POMDP Sparse Models HOT 1
- Problem with make HOT 5
- Make cannot find .hpp file in Boost HOT 2
- Can't find Lpsolve when run cmake HOT 9
- Using AI-Toolbox with OMNeT++ HOT 2
- Make issue HOT 9
- Not able to find "compare" file HOT 3
- Trouble installing and running AIToolbox HOT 9
- about LP_Solve HOT 13
- error C3779: 'AIToolbox::IndexMapIterator<IdsIterator,Container>::operator *': a function that returns 'auto' cannot be used before it is defined HOT 11
- Better Project Setup Tutorial HOT 6
- C++: error: expected โ)โ before โelementsNโ HOT 10
- Problems when building the library HOT 4
- Sparse Matrix: Space Time Complexity while assigning and accessing an element. HOT 1
- Can't build because of lpslove HOT 16
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ai-toolbox.