{"action":"created","issue":{"url":"https://api.github.com/repos/acplt/open62541/issues/234","labels_url":"https://api.github.com/repos/acplt/open62541/issues/234/labels{/name}","comments_url":"https://api.github.com/repos/acplt/open62541/issues/234/comments","events_url":"https://api.github.com/repos/acplt/open62541/issues/234/events","html_url":"https://github.com/acplt/open62541/issues/234","id":71505171,"number":234,"title":"Example code using a library, errors","user":{"login":"davy7125","id":11807895,"avatar_url":"https://avatars.githubusercontent.com/u/11807895?v=3","gravatar_id":"","url":"https://api.github.com/users/davy7125","html_url":"https://github.com/davy7125","followers_url":"https://api.github.com/users/davy7125/followers","following_url":"https://api.github.com/users/davy7125/following{/other_user}","gists_url":"https://api.github.com/users/davy7125/gists{/gist_id}","starred_url":"https://api.github.com/users/davy7125/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davy7125/subscriptions","organizations_url":"https://api.github.com/users/davy7125/orgs","repos_url":"https://api.github.com/users/davy7125/repos","events_url":"https://api.github.com/users/davy7125/events{/privacy}","received_events_url":"https://api.github.com/users/davy7125/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":14,"created_at":"2015-04-28T07:05:41Z","updated_at":"2015-05-06T07:54:18Z","closed_at":null,"body":"Hi,\r\n\r\nI tried to use the dll provided in a C# project. I was stuck on an AccessViolationError in the method UA_Client_connect but it may be related to problems with managed / unmanaged code. So finally I'll make a C++ project using the library.\r\n\r\nAnyway, here are some changes to do in the example code and in the .h, if someone else try to use the library instead of the .h / .c:\r\n\r\nUA_Client *client = UA_Client_new(UA_ClientConfig_standard);\r\n ==> UA_Client_new has a logger as a second argument\r\n ==> UA_ClientConfig_standard is not exported with UA_EXPORT and cannot be used (Logger_Stdout_new is also not exported)\r\n\r\nUA_StatusCode retval = UA_Client_connect(client, ClientNetworkLayerTCP_connect,\r\n                                             \"opc.tcp://localhost:16664\");\r\n ==> ClientNetworkLayerTCP_connect is not exported either\r\n\r\nreq.nodesToRead = UA_ReadValueId_new();\r\n ==> a cast \"(UA_ReadValueId*)\" is missing (some compiler won't accept this)\r\n\r\nreq.nodesToRead[0].nodeId = UA_NODEID_STRING(1, \"the.answer\");\r\n ==> please use macro only inside the library. It triggers errors with C++ compilers and it's not exportable. Wrap the different versions in a function (which has to be exported with UA_EXPORT as well) for a better compatibility.\r\n\r\nRegards,\r\nDavy\r\n"},"comment":{"url":"https://api.github.com/repos/acplt/open62541/issues/comments/99362585","html_url":"https://github.com/acplt/open62541/issues/234#issuecomment-99362585","issue_url":"https://api.github.com/repos/acplt/open62541/issues/234","id":99362585,"user":{"login":"Stasik0","id":469170,"avatar_url":"https://avatars.githubusercontent.com/u/469170?v=3","gravatar_id":"","url":"https://api.github.com/users/Stasik0","html_url":"https://github.com/Stasik0","followers_url":"https://api.github.com/users/Stasik0/followers","following_url":"https://api.github.com/users/Stasik0/following{/other_user}","gists_url":"https://api.github.com/users/Stasik0/gists{/gist_id}","starred_url":"https://api.github.com/users/Stasik0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Stasik0/subscriptions","organizations_url":"https://api.github.com/users/Stasik0/orgs","repos_url":"https://api.github.com/users/Stasik0/repos","events_url":"https://api.github.com/users/Stasik0/events{/privacy}","received_events_url":"https://api.github.com/users/Stasik0/received_events","type":"User","site_admin":false},"created_at":"2015-05-06T07:54:18Z","updated_at":"2015-05-06T07:54:18Z","body":"@davy7125 woooow! that a huge amount of work you have done! Two questions:\r\n* did the supplied libopen62541.dll not work?\r\n* what do you think would be a best practice to spread these files? Via repository, and a project file? Or just copy-pasting it somewhere?"}}