{"id":525,"date":"2017-02-25T20:06:36","date_gmt":"2017-02-25T20:06:36","guid":{"rendered":"https:\/\/hq.ipas.nl\/?page_id=525"},"modified":"2017-02-25T20:06:51","modified_gmt":"2017-02-25T20:06:51","slug":"use-visual-studio-with-mysql-lib-with-cross-plaform-linux-c","status":"publish","type":"page","link":"https:\/\/hq.ipas.nl\/?page_id=525","title":{"rendered":"Use Visual Studio with MySQL Lib with Cross Plaform Linux C++"},"content":{"rendered":"<p>I guess you have Visual Studio allreadyinstalled.Yyou must install the Linux cross-platform expansion. Dowload and isntalleer file VC_Linux.exe for Visual Studio file. Just search on the web.<br \/>\nFirst the\u00a0 SSH connection to the Linux machine needs to be added in Visual Studio. Click Tools-&gt; Options and select Cross-Platform -&gt; Connection Manager. Here, the connections can be added.<br \/>\nUse IP-address instead of a hostname. Somehow using a hostname did not work, and my dns is working fine.<\/p>\n<p><a href=\"https:\/\/hq.ipas.nl\/?attachment_id=527\" rel=\"attachment wp-att-527\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-527\" src=\"https:\/\/hq.ipas.nl\/wp-content\/uploads\/2017\/02\/vs-tools-options.jpg\" alt=\"\" width=\"221\" height=\"152\" \/><\/a><a href=\"https:\/\/hq.ipas.nl\/?attachment_id=528\" rel=\"attachment wp-att-528\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-528\" src=\"https:\/\/hq.ipas.nl\/wp-content\/uploads\/2017\/02\/vs-connectionadd.jpg\" alt=\"\" width=\"156\" height=\"152\" srcset=\"https:\/\/hq.ipas.nl\/wp-content\/uploads\/2017\/02\/vs-connectionadd.jpg 672w, https:\/\/hq.ipas.nl\/wp-content\/uploads\/2017\/02\/vs-connectionadd-300x293.jpg 300w\" sizes=\"auto, (max-width: 156px) 100vw, 156px\" \/><\/a><\/p>\n<p>You need to configure some setting within the properties of your Cross-Platform Linux project.\u00a0 First, the mysql library directory should be added.<br \/>\nSelect properties of the Linux project. When Configuration Properties -&gt; C \/ C ++ -&gt; General<br \/>\nAt the Additional Include Directories option add the \/ usr\/include\/mysql directory:<\/p>\n<p><a href=\"https:\/\/hq.ipas.nl\/?attachment_id=529\" rel=\"attachment wp-att-529\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-529\" src=\"https:\/\/hq.ipas.nl\/wp-content\/uploads\/2017\/02\/vs-dirinclude.jpg\" alt=\"\" width=\"243\" height=\"176\" \/><\/a><\/p>\n<p>Then the MySQL client library needs\u00a0 to be added.<br \/>\nIn the same screen, select Configuration Properties -&gt; Linker -&gt; Input<br \/>\nAt Library Dependancies add the lib.<\/p>\n<p><a href=\"https:\/\/hq.ipas.nl\/?attachment_id=526\" rel=\"attachment wp-att-526\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-526\" src=\"https:\/\/hq.ipas.nl\/wp-content\/uploads\/2017\/02\/vs-mysqlclient-lib.jpg\" alt=\"\" width=\"256\" height=\"184\" srcset=\"https:\/\/hq.ipas.nl\/wp-content\/uploads\/2017\/02\/vs-mysqlclient-lib.jpg 1253w, https:\/\/hq.ipas.nl\/wp-content\/uploads\/2017\/02\/vs-mysqlclient-lib-300x215.jpg 300w, https:\/\/hq.ipas.nl\/wp-content\/uploads\/2017\/02\/vs-mysqlclient-lib-768x550.jpg 768w, https:\/\/hq.ipas.nl\/wp-content\/uploads\/2017\/02\/vs-mysqlclient-lib-1024x734.jpg 1024w\" sizes=\"auto, (max-width: 256px) 100vw, 256px\" \/><\/a><br \/>\nFinally, the header files must be known locally. Copy all C header files from Linux (\/usr\/include\/mysql) to the include directory locally on the Windows machine where Visual Studio is running on.<\/p>\n<p>C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\Linux\\include\\usr\\include<\/p>\n<p>Remote compiling with MySQL lib now going well.<\/p>\n<p><span style=\"border-radius: 2px; text-indent: 20px; width: auto; padding: 0px 4px 0px 0px; text-align: center; font: bold 11px\/20px 'Helvetica Neue',Helvetica,sans-serif; color: #ffffff; background: #bd081c  no-repeat scroll 3px 50% \/ 14px 14px; position: absolute; opacity: 1; z-index: 8675309; display: none; cursor: pointer;\">Save<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I guess you have Visual Studio allreadyinstalled.Yyou must install the Linux cross-platform expansion. Dowload and isntalleer file VC_Linux.exe for Visual Studio file. Just search on the web. First the\u00a0 SSH connection to the Linux machine needs to be added in &hellip;<\/p>\n<p class=\"read-more\"><a href=\"https:\/\/hq.ipas.nl\/?page_id=525\">Read more &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-525","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/hq.ipas.nl\/index.php?rest_route=\/wp\/v2\/pages\/525","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hq.ipas.nl\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/hq.ipas.nl\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/hq.ipas.nl\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/hq.ipas.nl\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=525"}],"version-history":[{"count":3,"href":"https:\/\/hq.ipas.nl\/index.php?rest_route=\/wp\/v2\/pages\/525\/revisions"}],"predecessor-version":[{"id":532,"href":"https:\/\/hq.ipas.nl\/index.php?rest_route=\/wp\/v2\/pages\/525\/revisions\/532"}],"wp:attachment":[{"href":"https:\/\/hq.ipas.nl\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=525"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}