-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I've been trying to build libofx on windows/mingw and it seems I've been mostly successful.
OpenSP is OpenSP-1.5.2.tar.gz from http://sourceforge.net/project/showfiles.php?group_id=2115&package_id=2869 ; it seems the package is not prepared for a win32-build with mingw, only with MSVC. However, by applying the attached patch the relevant source files are built on win32/mingw as well and the result was a libosp-5.dll shared library, which is all I wanted. For libofx I've used libofx-0.8.3.tar.gz from http://sourceforge.net/project/showfiles.php?group_id=61170 ; as you can see in the attached patch, the LDFLAGS needed an extra -no-undefined *and* one source file uses mkstemp() which is unavailable on windows/mingw. mktemp() without the "s" is available in mingw, although the usage of mktemp() is usually strongly discouraged. However, in this particular case mkstemp seems to be used erroneously anyway and its usage rather corresponds to how mktemp should be used. So for the windows port it should be totally fine to just replace this by mktemp here. Eventually, the original code should be fixed in order to use mkstemp correctly. A similar usage of mkstemp plus workarounds for windows/mingw was found here http://lists.mplayerhq.hu/pipermail/mplayer-cygwin/2006-March/002581.html With opensp and libofx installed, I was able to compile aqbanking with ofxdirectconnect (functioning code only in SVN, not yet released). Gnucash with --enable-ofx will follow soon. Regards, Christian -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2.1 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iQCVAwUBRciO5mXAi+BfhivFAQJh9AP/dDPvqNRVQNQ8AfMdP4S9B1fsvofiEond 16p9n/75WuvPxRgOD35K1mrd7/J19AEaiUXSSj/Z8PZKaHBrBheSc109sZbOTcYZ Q6hHoA0Iuy+++UKKq05folVGbB1rmZv0Xd6hyfMzOmAmEf342K/4T7JZIS5Qnjtj xCaVCo3UtF4= =CB2E -----END PGP SIGNATURE-----
--- lib/Makefile.am~ Thu Dec 15 13:13:16 2005 +++ lib/Makefile.am Tue Feb 6 10:57:58 2007 @@ -76,7 +76,9 @@ splibpch.h token.h app_inst.cxx arc_inst.cxx entmgr_inst.cxx \ parser_inst.cxx xentmgr_inst.cxx SubstTable.cxx \ UTF16CodingSystem.cxx Fixed4CodingSystem.cxx \ - memcmp.c memmove.c strerror.c + memcmp.c memmove.c strerror.c WinInetStorage.cxx \ + WinInetStorageMessages.h WinInetStorageMessages.msg \ + WinInetStorageMessages.rc WinApp.cxx Win32CodingSystem.cxx INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir)/generic
--- configure.in~ Tue Jan 9 04:16:46 2007 +++ configure.in Tue Feb 6 13:00:57 2007 @@ -284,6 +284,9 @@ LIBOFX_DTD_DIR='${datadir}/libofx/dtd' AC_SUBST(LIBOFX_DTD_DIR) +# Extend LDFLAGS because libtool on Windows requires this argument +LDFLAGS="${LDFLAGS} -no-undefined" + AC_CONFIG_FILES([Makefile]) AC_OUTPUT( libofx.spec --- lib/ofx_preproc.cpp~ Tue Jan 9 02:38:33 2007 +++ lib/ofx_preproc.cpp Tue Feb 6 12:31:07 2007 @@ -20,6 +20,7 @@ #include <iostream> #include <fstream> #include <stdlib.h> +#include <io.h> // for mktemp() on win32/mingw #include <stdio.h> #include <string> #include "ParserEventGeneratorKit.h" @@ -76,7 +77,7 @@ input_file.open(p_filename); strncpy(tmp_filename,"/tmp/libofxtmpXXXXXX",50); - mkstemp(tmp_filename); + mktemp(tmp_filename); tmp_file.open(tmp_filename); message_out(DEBUG,"ofx_proc_file(): Creating temp file: "+string(tmp_filename)); @@ -217,7 +218,7 @@ s_buffer=string(s, size); strncpy(tmp_filename,"/tmp/libofxtmpXXXXXX",50); - mkstemp(tmp_filename); + mktemp(tmp_filename); tmp_file.open(tmp_filename); message_out(DEBUG,"ofx_proc_file(): Creating temp file: "+string(tmp_filename));
_______________________________________________ gnucash-devel mailing list gnucash-devel@gnucash.org https://lists.gnucash.org/mailman/listinfo/gnucash-devel