{"action":"created","issue":{"url":"https://api.github.com/repos/YimingYAN/cppipm/issues/6","repository_url":"https://api.github.com/repos/YimingYAN/cppipm","labels_url":"https://api.github.com/repos/YimingYAN/cppipm/issues/6/labels{/name}","comments_url":"https://api.github.com/repos/YimingYAN/cppipm/issues/6/comments","events_url":"https://api.github.com/repos/YimingYAN/cppipm/issues/6/events","html_url":"https://github.com/YimingYAN/cppipm/issues/6","id":314271588,"number":6,"title":"Running examples/test.cpp","user":{"login":"charlesm93","id":13968778,"avatar_url":"https://avatars0.githubusercontent.com/u/13968778?v=4","gravatar_id":"","url":"https://api.github.com/users/charlesm93","html_url":"https://github.com/charlesm93","followers_url":"https://api.github.com/users/charlesm93/followers","following_url":"https://api.github.com/users/charlesm93/following{/other_user}","gists_url":"https://api.github.com/users/charlesm93/gists{/gist_id}","starred_url":"https://api.github.com/users/charlesm93/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/charlesm93/subscriptions","organizations_url":"https://api.github.com/users/charlesm93/orgs","repos_url":"https://api.github.com/users/charlesm93/repos","events_url":"https://api.github.com/users/charlesm93/events{/privacy}","received_events_url":"https://api.github.com/users/charlesm93/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-04-13T22:51:30Z","updated_at":"2018-04-19T13:59:46Z","closed_at":null,"author_association":"NONE","body":"Hi,\r\n\r\nI'm trying to use `cppipm` and as a starter I figured I'd run `examples/test.cpp`.  I gitcloned this repo and tried to compile the C++ file as follows:\r\n\r\n```\r\nclang++ -I lib/ -I include/  examples/test.cpp\r\n```\r\n\r\nwhich produces the following error message:\r\n\r\n```\r\nUndefined symbols for architecture x86_64:\r\n  \"cppipm::cppipm(Eigen::Matrix<double, -1, -1, 0, -1, -1> const&, Eigen::Matrix<double, -1, 1, 0, -1, 1> const&, Eigen::Matrix<double, -1, 1, 0, -1, 1> const&)\", referenced from:\r\n      _main in test-8cb9ec.o\r\n  \"cppipm::cppipm(Eigen::Matrix<double, -1, -1, 0, -1, -1> const&, Eigen::Matrix<double, -1, -1, 0, -1, -1> const&, Eigen::Matrix<double, -1, 1, 0, -1, 1> const&, Eigen::Matrix<double, -1, 1, 0, -1, 1> const&)\", referenced from:\r\n      _main in test-8cb9ec.o\r\n  \"mpsReader::trans2standardForm(Eigen::Matrix<double, -1, -1, 0, -1, -1>&, Eigen::Matrix<double, -1, -1, 0, -1, -1>&, Eigen::Matrix<double, -1, 1, 0, -1, 1>&, Eigen::Matrix<double, -1, 1, 0, -1, 1>&)\", referenced from:\r\n      _main in test-8cb9ec.o\r\n  \"mpsReader::mpsReader(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >)\", referenced from:\r\n      _main in test-8cb9ec.o\r\nld: symbol(s) not found for architecture x86_64\r\nclang: error: linker command failed with exit code 1 (use -v to see invocation)\r\n```\r\n\r\nLooks like (at least) this line is causing some grievance: `Algorithm* qp_test = new cppipm(Q, A, b, c);`\r\n\r\nAdditional information:\r\n```\r\ncharlesm$ clang++ --version\r\nApple LLVM version 9.0.0 (clang-900.0.39.2)\r\nTarget: x86_64-apple-darwin17.4.0\r\nThread model: posix\r\nInstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin\r\n```\r\n\r\nAm I using the wrong `clang++` call? Same error with `g++`. Thank you for your help."},"comment":{"url":"https://api.github.com/repos/YimingYAN/cppipm/issues/comments/382746879","html_url":"https://github.com/YimingYAN/cppipm/issues/6#issuecomment-382746879","issue_url":"https://api.github.com/repos/YimingYAN/cppipm/issues/6","id":382746879,"user":{"login":"YimingYAN","id":5236954,"avatar_url":"https://avatars2.githubusercontent.com/u/5236954?v=4","gravatar_id":"","url":"https://api.github.com/users/YimingYAN","html_url":"https://github.com/YimingYAN","followers_url":"https://api.github.com/users/YimingYAN/followers","following_url":"https://api.github.com/users/YimingYAN/following{/other_user}","gists_url":"https://api.github.com/users/YimingYAN/gists{/gist_id}","starred_url":"https://api.github.com/users/YimingYAN/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/YimingYAN/subscriptions","organizations_url":"https://api.github.com/users/YimingYAN/orgs","repos_url":"https://api.github.com/users/YimingYAN/repos","events_url":"https://api.github.com/users/YimingYAN/events{/privacy}","received_events_url":"https://api.github.com/users/YimingYAN/received_events","type":"User","site_admin":false},"created_at":"2018-04-19T13:59:46Z","updated_at":"2018-04-19T13:59:46Z","author_association":"OWNER","body":"Hi, I don't think it will work if you compile the example file only. If you are using g++ (I dont have access to mac at the moment), try the following \r\n\r\n```\r\ncd examples\r\ng++ -std=c++11 -I ../lib/ -I ../include/   ../src/cppipm.cpp ../src/mpsReader.cpp test.cpp -o test\r\n./test\r\n```\r\nThis should compile the files and run the test\r\n"}}
{"actor":{"display_login":"YimingYAN"}}