{"action":"opened","issue":{"url":"https://api.github.com/repos/tbeu/fmi-standard/issues/173","repository_url":"https://api.github.com/repos/tbeu/fmi-standard","labels_url":"https://api.github.com/repos/tbeu/fmi-standard/issues/173/labels{/name}","comments_url":"https://api.github.com/repos/tbeu/fmi-standard/issues/173/comments","events_url":"https://api.github.com/repos/tbeu/fmi-standard/issues/173/events","html_url":"https://github.com/tbeu/fmi-standard/issues/173","id":358249051,"node_id":"MDU6SXNzdWUzNTgyNDkwNTE=","number":173,"title":"Incorrect setting of FMU_Export in fmiFunctions.h","user":{"login":"modelica-trac-importer","id":22202507,"node_id":"MDQ6VXNlcjIyMjAyNTA3","avatar_url":"https://avatars1.githubusercontent.com/u/22202507?v=4","gravatar_id":"","url":"https://api.github.com/users/modelica-trac-importer","html_url":"https://github.com/modelica-trac-importer","followers_url":"https://api.github.com/users/modelica-trac-importer/followers","following_url":"https://api.github.com/users/modelica-trac-importer/following{/other_user}","gists_url":"https://api.github.com/users/modelica-trac-importer/gists{/gist_id}","starred_url":"https://api.github.com/users/modelica-trac-importer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/modelica-trac-importer/subscriptions","organizations_url":"https://api.github.com/users/modelica-trac-importer/orgs","repos_url":"https://api.github.com/users/modelica-trac-importer/repos","events_url":"https://api.github.com/users/modelica-trac-importer/events{/privacy}","received_events_url":"https://api.github.com/users/modelica-trac-importer/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-09-08T00:49:01Z","updated_at":"2018-09-08T00:49:01Z","closed_at":null,"author_association":"COLLABORATOR","body":"**Reported by anonymous on 27 Jan 2014 14:40 UTC**\nHi,\nThe following logic:\n\n```\n#if !defined(FMI_Export) && !defined(FMI_FUNCTION_PREFIX)\n #if defined _WIN32 || defined __CYGWIN__\n  /* Note: both gcc & MSVC on Windows support this syntax. */\n      #define FMI_Export __declspec(dllexport)\n #else\n  #if __GNUC__ >= 4\n    #define FMI_Export __attribute__ ((visibility (\"default\")))\n  #else\n    #define FMI_Export\n  #endif\n #endif\n#endif\n```\n\n...seems to neglect the common case where FMI_FUNCTION_PREFIX is set. As far as I can see, that leaves FMI_Export undefined (non-substituted during pre-proccesing) causing compiler errors.\n\nShould a defined FMI_FUNCTION_PREFIX prevent FMI_Export from being set? If not, simply remove \"&& !defined(FMI_FUNCTION_PREFIX)\".\nElse, the suggestion goes:\n\n```\n#if !defined(FMI_Export) \n #if !defined(FMI_FUNCTION_PREFIX)\n  #if defined _WIN32 || defined __CYGWIN__\n   /* Note: both gcc & MSVC on Windows support this syntax. */\n       #define FMI_Export __declspec(dllexport)\n  #else\n   #if __GNUC__ >= 4\n     #define FMI_Export __attribute__ ((visibility (\"default\")))\n   #else\n     #define FMI_Export\n   #endif\n  #endif\n #else\n   #define FMI_Export\n #endif\n#endif\n```\n\n/Peter\n\n----\n\nMigrated-From: https://trac.fmi-standard.org/ticket/173"}}
{"actor":{"display_login":"modelica-trac-importer"}}