0

I have downloaded and built the simple2d library using make && make install on OSX 10.13.4.

I was able to get my program to compile and link using the command line g++ `simple2d --libs` main.cpp

However I cannot figure out how to get it to work with CMake I have added the line target_link_libraries(Pacman /usr/local/lib/libsimple2d.a) But I get an error Undefined symbols for architecture x86_64 when trying to build

Dillon Dunn
  • 138
  • 1
  • 8
  • Instead of `simple2d --libs` you mean `pkg-config simple2d --libs`, don't you? If so, see [that question](https://stackoverflow.com/questions/29191855/what-is-the-proper-way-to-use-pkg-config-from-cmake) about using pkg-config with CMake. – Tsyvarev Jul 15 '18 at 19:03
  • Yeah I looked at that article and am using pkg_serach_module. However I still cannot get it to link correctly. – Dillon Dunn Jul 15 '18 at 20:21
  • Then, show what have you tried and what **exact error** you got for that. Just "Undefined symbols" isn't a very descriptive. – Tsyvarev Jul 15 '18 at 21:31

0 Answers0