navneet-nmk / Pytorch-RL-CPP

A Repository with C++ implementations of Reinforcement Learning Algorithms (Pytorch)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error for cmake and make: undefined reference to `ALEInterface::setInt(std::string const&, int)'

harpsword opened this issue · comments

cmake is ok.
make's output:

Scanning dependencies of target Reinforcement_CPP
[ 16%] Building CXX object CMakeFiles/Reinforcement_CPP.dir/Trainer.cpp.o
[ 33%] Linking CXX executable Reinforcement_CPP
CMakeFiles/Reinforcement_CPP.dir/Trainer.cpp.o: In function Trainer::load_enviroment(long, std::string)': Trainer.cpp:(.text+0x2f21): undefined reference to ALEInterface::setInt(std::string const&, int)'
Trainer.cpp:(.text+0x2f7b): undefined reference to ALEInterface::setBool(std::string const&, bool)' Trainer.cpp:(.text+0x2fc0): undefined reference to ALEInterface::loadROM(std::string)'
collect2: error: ld returned 1 exit status
CMakeFiles/Reinforcement_CPP.dir/build.make:202: recipe for target 'Reinforcement_CPP' failed
make[2]: *** [Reinforcement_CPP] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/Reinforcement_CPP.dir/all' failed
make[1]: *** [CMakeFiles/Reinforcement_CPP.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2

These functions which use std::string are undefined reference.

@harpsword Did you solve this? I have the same problem.