{"action":"closed","issue":{"url":"https://api.github.com/repos/ethereum/cpp-ethereum/issues/4662","repository_url":"https://api.github.com/repos/ethereum/cpp-ethereum","labels_url":"https://api.github.com/repos/ethereum/cpp-ethereum/issues/4662/labels{/name}","comments_url":"https://api.github.com/repos/ethereum/cpp-ethereum/issues/4662/comments","events_url":"https://api.github.com/repos/ethereum/cpp-ethereum/issues/4662/events","html_url":"https://github.com/ethereum/cpp-ethereum/issues/4662","id":276830178,"number":4662,"title":"Error including \"libdevcore\" files / macOS 10.13.1","user":{"login":"roynalnaruto","id":5194933,"avatar_url":"https://avatars3.githubusercontent.com/u/5194933?v=4","gravatar_id":"","url":"https://api.github.com/users/roynalnaruto","html_url":"https://github.com/roynalnaruto","followers_url":"https://api.github.com/users/roynalnaruto/followers","following_url":"https://api.github.com/users/roynalnaruto/following{/other_user}","gists_url":"https://api.github.com/users/roynalnaruto/gists{/gist_id}","starred_url":"https://api.github.com/users/roynalnaruto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/roynalnaruto/subscriptions","organizations_url":"https://api.github.com/users/roynalnaruto/orgs","repos_url":"https://api.github.com/users/roynalnaruto/repos","events_url":"https://api.github.com/users/roynalnaruto/events{/privacy}","received_events_url":"https://api.github.com/users/roynalnaruto/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2017-11-26T14:50:38Z","updated_at":"2017-11-28T15:13:40Z","closed_at":"2017-11-28T15:13:40Z","author_association":"NONE","body":"I have tried to copy all files from \"libdevcore\" directory to my own directory. I have a file which has the following content:\r\n```\r\n#include <iostream>\r\n#include \"TrieDB.h\"\r\n#include \"MemoryDB.h\"\r\nusing namespace dev;\r\nint main() {\r\n  MemoryDB db;\r\n  GenericTrieDB<MemoryDB> t(&db);\r\n  t.init();\r\n  return 0;\r\n}\r\n```\r\n\r\nI try to compile it by `g++ server.cpp -std=c++11 -o server` and get the following error:\r\n```\r\nUndefined symbols for architecture x86_64:\r\n  \"dev::sha3(dev::vector_ref<unsigned char const>, dev::vector_ref<unsigned char>)\", referenced from:\r\n      dev::sha3(dev::vector_ref<unsigned char const>) in server-a851af.o\r\n  \"dev::RLPNull\", referenced from:\r\n      dev::GenericTrieDB<dev::MemoryDB>::init() in server-a851af.o\r\n  \"dev::MemoryDB::insert(dev::FixedHash<32u> const&, dev::vector_ref<unsigned char const>)\", referenced from:\r\n      dev::GenericTrieDB<dev::MemoryDB>::forceInsertNode(dev::FixedHash<32u> const&, dev::vector_ref<unsigned char const>) in server-a851af.o\r\n  \"dev::EmptyTrie\", referenced from:\r\n      dev::GenericTrieDB<dev::MemoryDB>::setRoot(dev::FixedHash<32u> const&, dev::Verification) in server-a851af.o\r\n  \"boost::system::system_category()\", referenced from:\r\n      ___cxx_global_var_init.2 in server-a851af.o\r\n  \"boost::system::generic_category()\", referenced from:\r\n      ___cxx_global_var_init in server-a851af.o\r\n      ___cxx_global_var_init.1 in server-a851af.o\r\n  \"dev::MemoryDB::exists(dev::FixedHash<32u> const&) const\", referenced from:\r\n      dev::GenericTrieDB<dev::MemoryDB>::setRoot(dev::FixedHash<32u> const&, dev::Verification) in server-a851af.o\r\n  \"dev::MemoryDB::lookup(dev::FixedHash<32u> const&) const\", referenced from:\r\n      dev::GenericTrieDB<dev::MemoryDB>::node(dev::FixedHash<32u> const&) const in server-a851af.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\nIt is maybe because `clang` is the default compiler in macOS ? Next I tried to compile using this statement `g++ server.cpp -std=c++11 -stdlib=libstdc++ -o server`. But then it cannot find `chrono`:\r\n```\r\nclang: warning: libstdc++ is deprecated; move to libc++ [-Wdeprecated]\r\nIn file included from server.cpp:2:\r\nIn file included from ./TrieDB.h:25:\r\n./Log.h:27:10: fatal error: 'chrono' file not found\r\n#include <chrono>\r\n         ^~~~~~~~\r\n1 error generated.\r\n```\r\n\r\nI also tried with `libc++` but the same error as in the first case. What am I doing wrong? Is there something I am missing?\r\n\r\nThanks"}}
{"actor":{"display_login":"roynalnaruto"}}