{"action":"created","issue":{"url":"https://api.github.com/repos/WebAssembly/design/issues/1150","repository_url":"https://api.github.com/repos/WebAssembly/design","labels_url":"https://api.github.com/repos/WebAssembly/design/issues/1150/labels{/name}","comments_url":"https://api.github.com/repos/WebAssembly/design/issues/1150/comments","events_url":"https://api.github.com/repos/WebAssembly/design/issues/1150/events","html_url":"https://github.com/WebAssembly/design/issues/1150","id":271186523,"node_id":"MDU6SXNzdWUyNzExODY1MjM=","number":1150,"title":"How do i compile file.cpp with #include headers ?","user":{"login":"extremety1989","id":20646662,"node_id":"MDQ6VXNlcjIwNjQ2NjYy","avatar_url":"https://avatars0.githubusercontent.com/u/20646662?v=4","gravatar_id":"","url":"https://api.github.com/users/extremety1989","html_url":"https://github.com/extremety1989","followers_url":"https://api.github.com/users/extremety1989/followers","following_url":"https://api.github.com/users/extremety1989/following{/other_user}","gists_url":"https://api.github.com/users/extremety1989/gists{/gist_id}","starred_url":"https://api.github.com/users/extremety1989/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/extremety1989/subscriptions","organizations_url":"https://api.github.com/users/extremety1989/orgs","repos_url":"https://api.github.com/users/extremety1989/repos","events_url":"https://api.github.com/users/extremety1989/events{/privacy}","received_events_url":"https://api.github.com/users/extremety1989/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-11-04T11:51:04Z","updated_at":"2018-08-07T17:46:19Z","closed_at":"2018-08-07T17:46:19Z","author_association":"NONE","body":"how can i compile cpp file that includes headers from MYSQL c++ lib and boost\r\n\r\nhere is my cpp file\r\n#include <stdlib.h>\r\n#include <iostream>\r\n#include <cppconn/connection.h>\r\n\r\n#include <cppconn/driver.h>\r\n#include <cppconn/exception.h>\r\n#include <cppconn/resultset.h>\r\n#include <cppconn/statement.h>\r\n#include <cppconn/prepared_statement.h>\r\n\r\nusing namespace std;\r\nstring username;\r\nstring userpass;\r\nint main(void)\r\n{\r\n\tcin >> username;\r\n\tcin >> userpass;\r\n\ttry {\r\n\t\tsql::Driver *driver;\r\n\t\tsql::Connection *con;\r\n\t\tsql::Statement *stmt;\r\n\t\tsql::ResultSet *res;\r\n\t\tsql::PreparedStatement *pstmt;\r\n\r\n\t\t/* Create a connection */\r\n\t\tdriver = get_driver_instance();\r\n\t\tcon = driver->connect(\"tcp://127.0.0.1:3306/test\", \"root\", \"\");\r\n\t\t/* Connect to the MySQL test database */\r\n\t\tcon->setSchema(\"test\");\r\n\t\tstmt = con->createStatement();\r\n\t\tdelete stmt;\r\n\t\t\tpstmt = con->prepareStatement(\"INSERT INTO test (username,password) VALUES (?,?)\");\r\n\t\t\tpstmt->setString(1,username.c_str());\r\n\t\t\tpstmt->setString(2,userpass.c_str());\r\n\t\t    pstmt->executeUpdate();\r\n\t\t    delete pstmt;\r\n\r\n\t\t/* Select in ascending order */\r\n\t\tpstmt = con->prepareStatement(\"SELECT id,username,password FROM test ORDER BY id ASC\");\r\n\t\tres = pstmt->executeQuery();\r\n\r\n\t\t/* Fetch in reverse = descending order! */\r\n\t\tres->afterLast();\r\n\t\twhile (res->previous())\r\n\t\t\tcout <<\"ID :\" <<res->getInt(\"id\") << \"  Username :\" << res->getString(\"username\").c_str() \r\n\t\t\t<< \"  Password :\" << res->getString(\"password\").c_str() << endl;\r\n\t\tdelete pstmt;\r\n\t\tdelete con;\r\n\r\n\t}\r\n\tcatch (sql::SQLException &e) {\r\n\t\tcout << \"SQLState: \" << e.getSQLState()<< endl;\r\n\t}\r\n\r\n\tcout << endl;\r\n\r\n\treturn 0;\r\n}\r\n\r\nem++ main.cpp -s WASM=1 ?????\r\n\r\nhow to add links ?"},"comment":{"url":"https://api.github.com/repos/WebAssembly/design/issues/comments/411142703","html_url":"https://github.com/WebAssembly/design/issues/1150#issuecomment-411142703","issue_url":"https://api.github.com/repos/WebAssembly/design/issues/1150","id":411142703,"node_id":"MDEyOklzc3VlQ29tbWVudDQxMTE0MjcwMw==","user":{"login":"sbc100","id":515813,"node_id":"MDQ6VXNlcjUxNTgxMw==","avatar_url":"https://avatars2.githubusercontent.com/u/515813?v=4","gravatar_id":"","url":"https://api.github.com/users/sbc100","html_url":"https://github.com/sbc100","followers_url":"https://api.github.com/users/sbc100/followers","following_url":"https://api.github.com/users/sbc100/following{/other_user}","gists_url":"https://api.github.com/users/sbc100/gists{/gist_id}","starred_url":"https://api.github.com/users/sbc100/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sbc100/subscriptions","organizations_url":"https://api.github.com/users/sbc100/orgs","repos_url":"https://api.github.com/users/sbc100/repos","events_url":"https://api.github.com/users/sbc100/events{/privacy}","received_events_url":"https://api.github.com/users/sbc100/received_events","type":"User","site_admin":false},"created_at":"2018-08-07T17:46:19Z","updated_at":"2018-08-07T17:46:19Z","author_association":"MEMBER","body":"This should work if you add the mysql C++ header and library path to your command line (e.g. using -I and -L).\r\n\r\nThis is really and emscripten question though, please ask there if you are still having problems."}}
{"actor":{"display_login":"sbc100"}}