Araq / wxnim

Nim wrapper for wxWidgets.
MIT License
42 stars 20 forks source link

Trouble building wxnim on win7 #2

Open UrKr opened 8 years ago

UrKr commented 8 years ago

I'm on win7 64 bit using nim 32bit 0.13.0.

I downloaded wxWidgets-3.0, extracted it next to the wxnim clone dir. I then built it via "mingw32-make -f makefile.gcc SHARED=0 UNICODE=1 BUILD=release"

Then I called "nimble install" in the wxnim directory.

All that seems successful, but when I try to compile a .nim file containing only "import wx" via "nim cpp test.nim", I get this error:

c:\users\urban\documents\programmingprojects\nimprojects\iutredar\nimcache\wxnim_wx.cpp:10:23: fatal error: wx/wxprec.h: No such file or directory
 #include <wx/wxprec.h>
                       ^
compilation terminated.
Hint:  [Link]
g++.exe: error: c:\users\urban\documents\programmingprojects\nimprojects\iutredar\nimcache\wxnim_wx.o: No such file or directory
Error: execution of an external program failed: 'g++.exe   -o c:\users\urban\documents\programmingprojects\nimprojects\iutredar\test.exe  c:\users\urban\documents\programmingprojects\nimprojects\iutredar\nimcache\wxnim_wx.o c:\users\urban\documents\programmingprojects\nimprojects\iutredar\nimcach
e\stdlib_system.o c:\users\urban\documents\programmingprojects\nimprojects\iutredar\nimcache\test.o  '

If I try compiling example2.nim, I get:

c:\users\urban\documents\programmingprojects\nimprojects\iutredar\wxnim\examples\nimcache\stdlib_system.o:stdlib_system.cpp:(.text+0xb254): undefined reference to `__gxx_personality_sj0'
c:\users\urban\documents\programmingprojects\nimprojects\iutredar\wxnim\examples\nimcache\stdlib_system.o:stdlib_system.cpp:(.text+0xb279): undefined reference to `_Unwind_SjLj_Register'
c:\users\urban\documents\programmingprojects\nimprojects\iutredar\wxnim\examples\nimcache\stdlib_system.o:stdlib_system.cpp:(.text+0xb356): undefined reference to `_Unwind_SjLj_Resume'
c:\users\urban\documents\programmingprojects\nimprojects\iutredar\wxnim\examples\nimcache\stdlib_system.o:stdlib_system.cpp:(.text+0xb3ab): undefined reference to `_Unwind_SjLj_Resume'
c:\users\urban\documents\programmingprojects\nimprojects\iutredar\wxnim\examples\nimcache\stdlib_system.o:stdlib_system.cpp:(.text+0xb3b6): undefined reference to `_Unwind_SjLj_Unregister'
c:\users\urban\documents\programmingprojects\nimprojects\iutredar\wxnim\examples\nimcache\stdlib_system.o:stdlib_system.cpp:(.text+0xb478): undefined reference to `__gxx_personality_sj0'
c:\users\urban\documents\programmingprojects\nimprojects\iutredar\wxnim\examples\nimcache\stdlib_system.o:stdlib_system.cpp:(.text+0xb49d): undefined reference to `_Unwind_SjLj_Register'
c:\users\urban\documents\programmingprojects\nimprojects\iutredar\wxnim\examples\nimcache\stdlib_system.o:stdlib_system.cpp:(.text+0xb56d): undefined reference to `_Unwind_SjLj_Resume'
c:\users\urban\documents\programmingprojects\nimprojects\iutredar\wxnim\examples\nimcache\stdlib_system.o:stdlib_system.cpp:(.text+0xb5c2): undefined reference to `_Unwind_SjLj_Resume'
c:\users\urban\documents\programmingprojects\nimprojects\iutredar\wxnim\examples\nimcache\stdlib_system.o:stdlib_system.cpp:(.text+0xb5cd): undefined reference to `_Unwind_SjLj_Unregister'
c:/tdm-gcc-32/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/ld.exe: c:\users\urban\documents\programmingprojects\nimprojects\iutredar\wxnim\examples\nimcache\stdlib_system.o: bad reloc address 0x8 in section `.data'
collect2.exe: error: ld returned 1 exit status
Error: execution of an external program failed: 'g++.exe   -o c:\users\urban\documents\programmingprojects\nimprojects\iutredar\wxnim\examples\example2.exe  c:\users\urban\documents\programmingprojects\nimprojects\iutredar\wxnim\examples\nimcache\wxnim_stc.o c:\users\urban\documents\programmingproje
cts\nimprojects\iutredar\wxnim\examples\nimcache\wxnim_richtext.o c:\users\urban\documents\programmingprojects\nimprojects\iutredar\wxnim\examples\nimcache\wxnim_driver.o c:\users\urban\documents\programmingprojects\nimprojects\iutredar\wxnim\examples\nimcache\wxnim_wx.o c:\users\urban\documents\pro
grammingprojects\nimprojects\iutredar\wxnim\examples\nimcache\stdlib_system.o c:\users\urban\documents\programmingprojects\nimprojects\iutredar\wxnim\examples\nimcache\wxnim_example2.o  ../../wxWidgets-3.0.2/lib/gcc_lib/libwxmsw30u_stc.a ../../wxWidgets-3.0.2/lib/gcc_lib/libwxscintilla.a ../../wxWid
gets-3.0.2/lib/gcc_lib/libwxmsw30u_core.a ../../wxWidgets-3.0.2/lib/gcc_lib/libwxbase30u.a ../../wxWidgets-3.0.2/lib/gcc_lib/libwxbase30u_net.a ../../wxWidgets-3.0.2/lib/gcc_lib/libwxbase30u_xml.a ../../wxWidgets-3.0.2/lib/gcc_lib/libwxexpat.a ../../wxWidgets-3.0.2/lib/gcc_lib/libwxjpeg.a ../../wxWi
dgets-3.0.2/lib/gcc_lib/libwxmsw30u_adv.a ../../wxWidgets-3.0.2/lib/gcc_lib/libwxmsw30u_aui.a ../../wxWidgets-3.0.2/lib/gcc_lib/libwxmsw30u_gl.a ../../wxWidgets-3.0.2/lib/gcc_lib/libwxmsw30u_html.a ../../wxWidgets-3.0.2/lib/gcc_lib/libwxmsw30u_media.a ../../wxWidgets-3.0.2/lib/gcc_lib/libwxmsw30u_pr
opgrid.a ../../wxWidgets-3.0.2/lib/gcc_lib/libwxmsw30u_ribbon.a ../../wxWidgets-3.0.2/lib/gcc_lib/libwxmsw30u_richtext.a ../../wxWidgets-3.0.2/lib/gcc_lib/libwxmsw30u_webview.a ../../wxWidgets-3.0.2/lib/gcc_lib/libwxmsw30u_xrc.a ../../wxWidgets-3.0.2/lib/gcc_lib/libwxpng.a ../../wxWidgets-3.0.2/lib/
gcc_lib/libwxregexu.a ../../wxWidgets-3.0.2/lib/gcc_lib/libwxtiff.a ../../wxWidgets-3.0.2/lib/gcc_lib/libwxzlib.a -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 '
PMunch commented 7 years ago

This issue should be solved once PR #3 is merged