{"action":"created","issue":{"url":"https://api.github.com/repos/harbour/core/issues/104","labels_url":"https://api.github.com/repos/harbour/core/issues/104/labels{/name}","comments_url":"https://api.github.com/repos/harbour/core/issues/104/comments","events_url":"https://api.github.com/repos/harbour/core/issues/104/events","html_url":"https://github.com/harbour/core/issues/104","id":97654651,"number":104,"title":"Static initializer error","user":{"login":"emazv72","id":5381288,"avatar_url":"https://avatars.githubusercontent.com/u/5381288?v=3","gravatar_id":"","url":"https://api.github.com/users/emazv72","html_url":"https://github.com/emazv72","followers_url":"https://api.github.com/users/emazv72/followers","following_url":"https://api.github.com/users/emazv72/following{/other_user}","gists_url":"https://api.github.com/users/emazv72/gists{/gist_id}","starred_url":"https://api.github.com/users/emazv72/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/emazv72/subscriptions","organizations_url":"https://api.github.com/users/emazv72/orgs","repos_url":"https://api.github.com/users/emazv72/repos","events_url":"https://api.github.com/users/emazv72/events{/privacy}","received_events_url":"https://api.github.com/users/emazv72/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/harbour/core/labels/support","name":"support","color":"000000"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":11,"created_at":"2015-07-28T09:18:27Z","updated_at":"2015-07-28T14:03:27Z","closed_at":null,"body":"\r\nAfter a few tests on Viktor's branch ( see details on https://github.com/vszakats/harbour-core/issues/149 )\r\n\r\nI recompiled both vanilla Harbour 3.2.0 ( HEAD )  with MinGW (gcc rev5, Built by MinGW-W64 project 4.8.1) and my own app.\r\n\r\nWhen I start my app ( harbour p/code + c code in windows .dll) I get:\r\n\r\nCalled from (_INITSTATICS00001)(0)\r\nCalled from HB_LIBLOAD(0)\r\nCalled from LIBMGR:LOAD(67)\r\nCalled from LOADSTANDARDLIBS(77)\r\nCalled from MAIN(101)\r\n\r\ngdb shows:\r\n\r\nProgram received signal SIGSEGV, Segmentation fault.\r\n0x5732acf0 in ?? ()\r\n(gdb) bt\r\n#0  0x5732acf0 in ?? ()\r\n#1  0x68c174d1 in hb_vmProc (uiParams=uiParams@entry=0)\r\n    at ../../../../hvm.c:5905\r\n#2  0x68c17e6c in hb_vmInitSymbolGroup (hNewDynLib=hNewDynLib@entry=0x0,\r\n    argc=argc@entry=0, argv=argv@entry=0x0) at ../../../../hvm.c:7797\r\n#3  0x68bb8f5e in hb_libLoad (pLibName=0x358a24, pArgs=pArgs@entry=0x0)\r\n    at ../../../../dynlibhb.c:152\r\n#4  0x68bb9135 in HB_FUN_HB_LIBLOAD () at ../../../../dynlibhb.c:243\r\n\r\nProblem lies in:\r\n\r\ncontrib\\hbwin\\hbwin.hbp line 32. \r\nIf I remove hbolesrv.c everything works fine.\r\n\r\nIt turns out DllMain is defined twice so the kernel fails to initialize the library.\r\n\r\nSo it seems it's not possible to put hbwin.hbc in my shared hbp project \r\n\r\nAlready proposed a patch for this:\r\n\r\nhttps://github.com/harbour/core/pull/73\r\n\r\n\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/harbour/core/issues/comments/125620737","html_url":"https://github.com/harbour/core/issues/104#issuecomment-125620737","issue_url":"https://api.github.com/repos/harbour/core/issues/104","id":125620737,"user":{"login":"vszakats","id":1446897,"avatar_url":"https://avatars.githubusercontent.com/u/1446897?v=3","gravatar_id":"","url":"https://api.github.com/users/vszakats","html_url":"https://github.com/vszakats","followers_url":"https://api.github.com/users/vszakats/followers","following_url":"https://api.github.com/users/vszakats/following{/other_user}","gists_url":"https://api.github.com/users/vszakats/gists{/gist_id}","starred_url":"https://api.github.com/users/vszakats/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vszakats/subscriptions","organizations_url":"https://api.github.com/users/vszakats/orgs","repos_url":"https://api.github.com/users/vszakats/repos","events_url":"https://api.github.com/users/vszakats/events{/privacy}","received_events_url":"https://api.github.com/users/vszakats/received_events","type":"User","site_admin":false},"created_at":"2015-07-28T14:03:26Z","updated_at":"2015-07-28T14:03:26Z","body":"By setting `_HB_DYNSUFF`. [ It's a rather complicated/ugly/platform-specific topic that not much (if any) people use. I developed it to be able to load contribs as plugins into `hbrun`, which works well for the most part. It's a huge time-sink too, so never felt to make this more user-friendly or generic or non-experimental, nor do I have an idea how to, unfortunately. IOW: you're on your own to experiment with it, unless you opt to avoid it - which I'd do ;) ]"}}