From: Robert A. <ro...@gm...> - 2020-11-10 04:55:14
|
Thanks for the info Andreas. I tried using mingw64 in Windows 10. The package manager is pacman (same as Arch Linux). So I am familiar with it. I noticed they already provide fltk (mingw-w64-x86_64-fltk 1.3.5-1) package (oh and swig too). Below is the list of packages I installed in order to build pyfltk (from the tar.gz file not svn source). I modified setup.py so it would work as os.environ["MSYSTEM"] == "MINGW64" however I was not sure what libs I should include in mingw64 so I used the same ones you used for mingw but msvcr71 was not found so I removed it. so I used lib_list = ["fltk", "kernel32", "user32", "gdi32", "winspool", "comdlg32", "Comctl32", "advapi32", "shell32", "oleaut32", "odbc32", "odbccp32", "stdc++"] I'm not sure if that's correct for mingw64. The build process failed with errors which I have listed the tail end below. Anyone have suggestions? ========================================== build command running build running build_py running build_ext building 'fltk._fltk' extension C:\msys64\mingw64\bin/x86_64-w64-mingw32-gcc.exe -Wno-unused-result -Wsign-compare -DNDEBUG -march=x86-64 -mtune=generic -O2 -pipe -fwrapv -D__US E_MINGW_ANSI_STDIO=1 -D_WIN32_WINNT=0x0601 -DNDEBUG -march=x86-64 -mtune=generic -O2 -pipe -fwrapv -D__USE_MINGW_ANSI_STDIO=1 -D_WIN32_WINNT=0x06 01 -DNDEBUG -DWIN32=1 -I./src -I./contrib -I/usr/include -IC:/msys64/mingw64/include/python3.8 -c ./python/fltk_wrap.cpp -o build/temp.mingw-3.8/ ./python/fltk_wrap.o -Wno-unused-label -Wno-unused-but-set-variable C:\msys64\mingw64\bin/x86_64-w64-mingw32-gcc.exe -Wno-unused-result -Wsign-compare -DNDEBUG -march=x86-64 -mtune=generic -O2 -pipe -fwrapv -D__US E_MINGW_ANSI_STDIO=1 -D_WIN32_WINNT=0x0601 -DNDEBUG -march=x86-64 -mtune=generic -O2 -pipe -fwrapv -D__USE_MINGW_ANSI_STDIO=1 -D_WIN32_WINNT=0x06 01 -DNDEBUG -DWIN32=1 -I./src -I./contrib -I/usr/include -IC:/msys64/mingw64/include/python3.8 -c ./contrib/ListSelect.cpp -o build/temp.mingw-3. 8/./contrib/ListSelect.o -Wno-unused-label -Wno-unused-but-set-variable writing build/temp.mingw-3.8/./python/_fltk-cpython-38.def C:\msys64\mingw64\bin/x86_64-w64-mingw32-c++.exe -shared -Wl,--enable-auto-image-base -pipe -Wl,--dynamicbase,--high-entropy-va,--nxcompat,--defa ult-image-base-high -s -pipe -Wl,--dynamicbase,--high-entropy-va,--nxcompat,--default-image-base-high -s -s build/temp.mingw-3.8/./python/fltk_wr ap.o build/temp.mingw-3.8/./contrib/ListSelect.o build/temp.mingw-3.8/./python/_fltk-cpython-38.def -Llib -LC:/msys64/mingw64/lib/python3.8/confi g-3.8 -LC:/msys64/mingw64/lib -lfltk -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -lComctl32 -ladvapi32 -lshell32 -loleaut32 -lodbc32 -lodbc cp32 -lstdc++ -lpython3.8 -lm -lversion -lshlwapi -o build/lib.mingw-3.8/fltk/_fltk-cpython-38.dll =========================================== tail end of errors C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: build/temp.mingw-3.8/./python/fltk_wrap.o:f ltk_wrap.cpp:(.text$_ZN21SwigDirector_Fl_Timer14drawSwigPublicEv[_ZN21SwigDirector_Fl_Timer14drawSwigPublicEv]+0x1): undefined reference to `Fl_T imer::draw()' C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: build/temp.mingw-3.8/./python/fltk_wrap.o:f ltk_wrap.cpp:(.text$_ZN20SwigDirector_Fl_Free14drawSwigPublicEv[_ZN20SwigDirector_Fl_Free14drawSwigPublicEv]+0x1): undefined reference to `Fl_Fre e::draw()' C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: build/temp.mingw-3.8/./python/fltk_wrap.o:f ltk_wrap.cpp:(.rdata$_ZTV25SwigDirector_Fl_Gl_Window[_ZTV25SwigDirector_Fl_Gl_Window]+0x38): undefined reference to `Fl_Gl_Window::show()' C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: build/temp.mingw-3.8/./python/fltk_wrap.o:f ltk_wrap.cpp:(.rdata$_ZTV25SwigDirector_Fl_Gl_Window[_ZTV25SwigDirector_Fl_Gl_Window]+0x68): undefined reference to `Fl_Gl_Window::draw_overlay() ' C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: build/temp.mingw-3.8/./python/fltk_wrap.o:f ltk_wrap.cpp:(.rdata$.refptr._ZTV14Fl_FormsBitmap[.refptr._ZTV14Fl_FormsBitmap]+0x0): undefined reference to `vtable for Fl_FormsBitmap' C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: build/temp.mingw-3.8/./python/fltk_wrap.o:f ltk_wrap.cpp:(.rdata$.refptr._ZTV14Fl_FormsPixmap[.refptr._ZTV14Fl_FormsPixmap]+0x0): undefined reference to `vtable for Fl_FormsPixmap' C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: build/temp.mingw-3.8/./python/fltk_wrap.o:f ltk_wrap.cpp:(.rdata$.refptr._ZTV12Fl_Gl_Window[.refptr._ZTV12Fl_Gl_Window]+0x0): undefined reference to `vtable for Fl_Gl_Window' collect2.exe: error: ld returned 1 exit status error: command 'C:\\msys64\\mingw64\\bin/x86_64-w64-mingw32-c++.exe' failed with exit status 1 ====================== installed packages mingw-w64-x86_64-binutils 2.35.1-2 mingw-w64-x86_64-bzip2 1.0.8-1 mingw-w64-x86_64-ca-certificates 20200601-2 mingw-w64-x86_64-crt-git 9.0.0.6029.ecb4ff54-1 mingw-w64-x86_64-expat 2.2.10-1 mingw-w64-x86_64-fltk 1.3.5-1 mingw-w64-x86_64-freeglut 3.2.1-1 mingw-w64-x86_64-gcc 10.2.0-5 mingw-w64-x86_64-gcc-libs 10.2.0-5 mingw-w64-x86_64-gettext 0.19.8.1-9 mingw-w64-x86_64-gmp 6.2.0-3 mingw-w64-x86_64-headers-git 9.0.0.6029.ecb4ff54-1 mingw-w64-x86_64-isl 0.22.1-2 mingw-w64-x86_64-libffi 3.3-1 mingw-w64-x86_64-libiconv 1.16-1 mingw-w64-x86_64-libjpeg-turbo 2.0.5-1 mingw-w64-x86_64-libpng 1.6.37-3 mingw-w64-x86_64-libsystre 1.0.1-4 mingw-w64-x86_64-libtasn1 4.16.0-1 mingw-w64-x86_64-libtre-git r128.6fb7206-2 mingw-w64-x86_64-libwinpthread-git 9.0.0.6029.ecb4ff54-1 mingw-w64-x86_64-mpc 1.2.0-2 mingw-w64-x86_64-mpdecimal 2.5.0-1 mingw-w64-x86_64-mpfr 4.1.0-3 mingw-w64-x86_64-ncurses 6.2-2 mingw-w64-x86_64-openssl 1.1.1.h-1 mingw-w64-x86_64-p11-kit 0.23.21-4 mingw-w64-x86_64-pcre 8.44-1 mingw-w64-x86_64-python 3.8.6-5 mingw-w64-x86_64-python-appdirs 1.4.3-1 mingw-w64-x86_64-python-attrs 19.3.0-1 mingw-w64-x86_64-python-ordered-set 3.1.1-1 mingw-w64-x86_64-python-packaging 20.3-1 mingw-w64-x86_64-python-pyparsing 2.4.7-1 mingw-w64-x86_64-python-setuptools 47.1.1-1 mingw-w64-x86_64-python-six 1.15.0-1 mingw-w64-x86_64-readline 8.0.004-1 mingw-w64-x86_64-sqlite3 3.33.0-1 mingw-w64-x86_64-swig 4.0.2-1 mingw-w64-x86_64-tcl 8.6.10-1 mingw-w64-x86_64-termcap 1.3.1-6 mingw-w64-x86_64-tk 8.6.10-2 mingw-w64-x86_64-windows-default-manifest 6.4-3 mingw-w64-x86_64-wineditline 2.205-3 mingw-w64-x86_64-winpthreads-git 9.0.0.6029.ecb4ff54-1 mingw-w64-x86_64-xz 5.2.5-1 mingw-w64-x86_64-zlib 1.2.11-7 mingw-w64-x86_64-zstd 1.4.5-1 ========================== setup.py modifications def is_msys_mingw64(): if "MSYSTEM" in os.environ: if os.environ["MSYSTEM"] == "MINGW64": return True return False elif sys.platform == 'win32' and is_msys_mingw64(): print("Building for MS Windows x86_64, using MinGW64") if doDebug: def_list = [('WIN32', '1'),('_DEBUG', '1')] else: def_list = [('WIN32', '1')] compile_arg_list.append('-Wno-unused-label') compile_arg_list.append('-Wno-unused-but-set-variable') lib_dir_list = [fltk_lib_dir] lib_list = ["fltk", "kernel32", "user32", "gdi32", "winspool", "comdlg32", "Comctl32", "advapi32", "shell32", "oleaut32", "odbc32", "odbccp32", "stdc++"] On Mon, Nov 9, 2020 at 1:09 AM and...@bl... <and...@bl...> wrote: > > Hi Robert > > It is actually quite simple as we are using distutils to package everything. If you ahve everything installed correctly, then it should be enough using the following command in the root of pyFltk: > > python setup.py bdist_wininst > This will compile the project and create a Windows installer. If you are using a non-standard compiler, then you can add it to the command line using then --compiler switch, I used to compile using the mingw32 compiler for quite some time actually. > > Good luck > > Andreas > > ----Ursprüngliche Nachricht---- > Von : ro...@gm... > Datum : 09/11/2020 - 00:00 (CEST) > An : pyf...@li... > Betreff : [Pyfltk-user] windows executable installer > > I'm wondering how to create the MS Windows .exe installation files located here > > https://sourceforge.net/projects/pyfltk/files/pyfltk/pyFltk-1.3.5/ > > I want to create a Python 3.9, 64 bit version if possible, but maybe 32 bit first would be easier. Wondering if anyone knows how to accomplish this? > > I want to use mingw. I know there is both the older mys/mingw and the newer msys2/mingw64. > > Thanks for your help > > > _______________________________________________ > Pyfltk-user mailing list > Pyf...@li... > https://lists.sourceforge.net/lists/listinfo/pyfltk-user |