Skip to content

Commit

Permalink
make function inline so that the symbol does not get defined several …
Browse files Browse the repository at this point in the history
…times.

According to the error message:
/home/runner/work/IOHexperimenter/IOHexperimenter/include/ioh/common/file.hpp:115: multiple definition of `ioh::common::file::utils::get_static_root[abi:cxx11]()'; CMakeFiles/test_ioh.dir/cpp/common/test_common.cpp.o:/home/runner/work/IOHexperimenter/IOHexperimenter/include/ioh/common/file.hpp:115: first defined here
There are actually at least .cpp files that are merged together before compilation, that both include this file.hpp.
  • Loading branch information
Dimitri Rusin committed Nov 14, 2023
1 parent 28a6064 commit 579e2c7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/ioh/common/file.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ namespace ioh::common::file
*
* @return fs::path the absolute path of IOHexperimenter/static
*/
fs::path get_static_root()
inline fs::path get_static_root()
{
// Print the contents of the current, previous, and the one before previous directories
print_directory_contents(fs::current_path());
Expand Down

0 comments on commit 579e2c7

Please sign in to comment.