{"action":"opened","issue":{"url":"https://api.github.com/repos/jboy/nim-pymod/issues/8","repository_url":"https://api.github.com/repos/jboy/nim-pymod","labels_url":"https://api.github.com/repos/jboy/nim-pymod/issues/8/labels{/name}","comments_url":"https://api.github.com/repos/jboy/nim-pymod/issues/8/comments","events_url":"https://api.github.com/repos/jboy/nim-pymod/issues/8/events","html_url":"https://github.com/jboy/nim-pymod/issues/8","id":199236172,"number":8,"title":"undefined reference to `_imp__NimMain'","user":{"login":"retsyo","id":7960913,"avatar_url":"https://avatars.githubusercontent.com/u/7960913?v=3","gravatar_id":"","url":"https://api.github.com/users/retsyo","html_url":"https://github.com/retsyo","followers_url":"https://api.github.com/users/retsyo/followers","following_url":"https://api.github.com/users/retsyo/following{/other_user}","gists_url":"https://api.github.com/users/retsyo/gists{/gist_id}","starred_url":"https://api.github.com/users/retsyo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/retsyo/subscriptions","organizations_url":"https://api.github.com/users/retsyo/orgs","repos_url":"https://api.github.com/users/retsyo/repos","events_url":"https://api.github.com/users/retsyo/events{/privacy}","received_events_url":"https://api.github.com/users/retsyo/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-01-06T16:42:42Z","updated_at":"2017-01-06T16:42:42Z","closed_at":null,"body":"I am using msys2+mingw32 on Win7 64 bits. I modified pmgen.py (https://github.com/retsyo/nim-pymod/blob/master/pmgen.py) in 2 aspects\r\n1. use raw string in `nim.cfg` and `pmgenSRC_incl.nim` so that `r\"r:\\someplace\"` for nim on windows is a valid pathname \r\n2. judge getvar('LIBS') which can solve the problem in `https://github.com/jboy/nim-pymod/issues/5`\r\n\r\nhowever, during compiling\r\n\r\n> Caught OSError([Error 2] )\r\n> Traceback (most recent call last):\r\n>   File \"E:/msys64/home/LOVLJIDY/_nim/nim-pymod/pmgen.py\", line 538, in <module>\r\n>     main()\r\n>   File \"E:/msys64/home/LOVLJIDY/_nim/nim-pymod/pmgen.py\", line 173, in main\r\n>     nim_modfiles, pminc_basename, python_exe_name)\r\n>   File \"E:/msys64/home/LOVLJIDY/_nim/nim-pymod/pmgen.py\", line 400, in compile_generated_nim_wrappers\r\n>     subprocess.check_call(make_command)\r\n>   File \"E:\\prg\\py\\Anaconda2_32\\lib\\subprocess.py\", line 541, in check_call\r\n>     raise CalledProcessError(retcode, cmd)\r\n> subprocess.CalledProcessError: Command '['make', '-f', 'Makefile']' returned non-zero exit status 2\r\n> \r\n\r\nI traced it down by \r\n\r\n> $ cd pmgen/\r\n> $ make\r\n> nim compile  pmgenhw_wrap.nim\r\n> Hint: used config file 'E:\\prg\\nim\\nim-0.15.2_x32\\config\\nim.cfg' [Conf]\r\n> Hint: used config file 'r:\\pmgen\\nim.cfg' [Conf]\r\n> Hint: used config file 'r:\\pmgen\\pmgenhw_wrap.nim.cfg' [Conf]\r\n> Hint: system [Processing]\r\n> ...\r\n> Hint: gcc.exe   -shared -o R:\\pmgen\\hw.so  nimcache\\pymod_docstrings.o nimcache\\stdlib_macros.o nimcache\\pymod_pymod.o nimcache\\greeting.o nimcache\\pymod_iteratezipdefs.o nimcache\\pymod_pyarrayiters.o nimcache\\pymod_ptrutils.o nimcache\\pymod_pyarrayobjecttype.o nimcache\\pymod_pyarrayflags.o nimcache\\pymod_pyarrayenums.o nimcache\\pymod_pyarraydescrtype.o nimcache\\pymod_cnpytypes.o nimcache\\pymod_nptypes.o nimcache\\pymod_pyarrayobject.o nimcache\\pymod_membrain.o nimcache\\pymod_pyobject.o nimcache\\stdlib_typetraits.o nimcache\\pymod_miscutils.o nimcache\\stdlib_algorithm.o nimcache\\stdlib_math.o nimcache\\stdlib_parseutils.o nimcache\\stdlib_strutils.o nimcache\\stdlib_system.o nimcache\\pmgenhw_wrap.o nimcache\\pyarraydescrtype_c.o nimcache\\pyarrayobject_c.o nimcache\\pyobject_c.o nimcache\\pmgenhw_capi.o  -O3 -lpython27 -fPIC  [Exec]\r\n> nimcache\\pmgenhw_capi.o:pmgenhw_capi.c:(.text+0x41): undefined reference to `_imp__exportpy_greet'\r\n> nimcache\\pmgenhw_capi.o:pmgenhw_capi.c:(.text+0x192): undefined reference to `_imp__NimMain'\r\n> collect2.exe: error: ld returned 1 exit status\r\n> Error: execution of an external program failed: 'gcc.exe   -shared -o R:\\pmgen\\hw.so  nimcache\\pymod_docstrings.o nimcache\\stdlib_macros.o nimcache\\pymod_pymod.o nimcache\\greeting.o nimcache\\pymod_iteratezipdefs.o nimcache\\pymod_pyarrayiters.o nimcache\\pymod_ptrutils.o nimcache\\pymod_pyarrayobjecttype.o nimcache\\pymod_pyarrayflags.o nimcache\\pymod_pyarrayenums.o nimcache\\pymod_pyarraydescrtype.o nimcache\\pymod_cnpytypes.o nimcache\\pymod_nptypes.o nimcache\\pymod_pyarrayobject.o nimcache\\pymod_membrain.o nimcache\\pymod_pyobject.o nimcache\\stdlib_typetraits.o nimcache\\pymod_miscutils.o nimcache\\stdlib_algorithm.o nimcache\\stdlib_math.o nimcache\\stdlib_parseutils.o nimcache\\stdlib_strutils.o nimcache\\stdlib_system.o nimcache\\pmgenhw_wrap.o nimcache\\pyarraydescrtype_c.o nimcache\\pyarrayobject_c.o nimcache\\pyobject_c.o nimcache\\pmgenhw_capi.o  -O3 -lpython27 -fPIC '\r\n> make: *** [Makefile:9: hw.so] Error 1 \r\n\r\n``"}}
{"actor":{"display_login":"retsyo"}}