Can't compile SQLCipher on Windows - c++

I'm trying to compile SQLCipher. I've downloaded source code from http://sqlcipher.net/.
Then I'm doing from this post:
[http://groups.google.com/group/sqlcipher/browse_thread/thread/55c6296b56bf4533:][1]
[1]
I installed MinGW (set path to gcc: d:\MinGW\bin), OpenSSL and ActiveState Perl. I copyied file libeay32.dll to sqlcipher directory. Than I try execute this command:
./configure --disable-tcl CFLAGS="-DSQLITE_HAS_CODEC
-I/path/to/openssl/include" LDFLAGS="-leay32"
and I got error:
checking build system type... i686-pc-mingw32
checking host system type... i686-pc-mingw32
checking for gcc... gcc
checking for C compiler default output file name...
configure: error: C compiler cannot create executables
See 'config.log' for more details.
Config.log shows:
configure:2537: $? = 0
configure:2544: gcc -v >&5
Using built-in specs.
COLLECT_GCC=D:\MinGW\bin\gcc.exe
COLLECT_LTO_WRAPPER=d:/mingw/bin/../libexec/gcc/mingw32/4.5.2/lto-wrapper.exe
Target: mingw32
Configured with: ../gcc-4.5.2/configure --enable-languages=c,c++,ada,fortran,objc,obj-c++ --disable-sjlj-exceptions --with-dwarf2 --enable-shared --enable-libgomp --disable-win32-registry --enable-libstdcxx-debug --enable-version-specific-runtime-libs --disable-werror --build=mingw32 --prefix=/mingw
Thread model: win32
gcc version 4.5.2 (GCC)
configure:2548: $? = 0
configure:2555: gcc -V >&5
gcc.exe: '-V' option must have argument
configure:2559: $? = 1
configure:2582: checking for C compiler default output file name
configure:2604: gcc -DSQLITE_HAS_CODEC -l/d/OpenSSL-Win32/bin -libeay32 conftest.c >&5
**d:/mingw/bin/../lib/gcc/mingw32/4.5.2/../../../../mingw32/bin/ld.exe: cannot find -ld:/OpenSSL-Win32/bin
d:/mingw/bin/../lib/gcc/mingw32/4.5.2/../../../../mingw32/bin/ld.exe: cannot find -libeay32**
collect2: ld returned 1 exit status
I don't know what is -leay32. I copied file libeay32.dll to sqlcipher directory. In D there is directory OpenSSL-Win32.
Thanks

Try this for your configure command:
./configure –disable-tcl CFLAGS=”-DSQLITE_HAS_CODEC –Ic:/path/to/openssl/include –Lc:/path/to/openssl/lib –leay32”
-leay32 is a library flag, so think of it like "-l eay32". It's referred to as "eay32" because the library flag ignores the "lib" of "libeay32".

Related

Mingw32 not recognizing wx-widgets

I'm trying to use mingw32 to compile an application for windows32. It has a makefile, and when I normally use ./configure, it works fine.
However, when I set the host as --host=i686-w64-mingw32, this happens:
checking build system type... x86_64-unknown-linux-gnu
checking host system type... i686-w64-mingw32
checking target system type... i686-w64-mingw32
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for i686-w64-mingw32-strip... i686-w64-mingw32-strip
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking building for Win32... yes
checking for i686-w64-mingw32-gcc... i686-w64-mingw32-gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.exe
checking for suffix of executables... .exe
checking whether we are cross compiling... yes
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether i686-w64-mingw32-gcc accepts -g... yes
checking for i686-w64-mingw32-gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of i686-w64-mingw32-gcc... gcc3
checking for i686-w64-mingw32-g++... i686-w64-mingw32-g++
checking whether we are using the GNU C++ compiler... yes
checking whether i686-w64-mingw32-g++ accepts -g... yes
checking dependency style of i686-w64-mingw32-g++... gcc3
checking for i686-w64-mingw32-ranlib... i686-w64-mingw32-ranlib
checking for sdl-config... /usr/bin/sdl-config
checking for SDL - version >= 1.2.8... cross compiling; assumed OK...
yes
checking for wx-config... /usr/bin/wx-config
checking for wxWidgets version >= 2.8.9... no
configure: error:
wxWidgets does not seem to be installed on your system.
If you think wxWidgets >= 2.8.9 is installed,
please check that wx-config is in path, the directory
where wxWidgets libraries are installed (returned by
'wx-config --libs' command) is in LD_LIBRARY_PATH or
equivalent variable.
What's causing this? As you can see from the successful ./configure, I have wxWidgets 3.0.2 installed. MinGW version 4.0.4-2 is installed. Do these versions work with each other? Obviously wxWidgets is configured and everything because it normally works. I can't figure out why it suddenly can't find wxwidgets just because the host is different.
Config.log file:
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by sound-of-sorting configure 0.6.5, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ ./configure --host=i686-w64-mingw32 --with-wx-prefix=/usr/i686-w64-mingw32
## --------- ##
## Platform. ##
## --------- ##
hostname = JOHNCENA
uname -m = x86_64
uname -r = 4.4.0-43-Microsoft
uname -s = Linux
uname -v = #1-Microsoft Wed Dec 31 14:42:53 PST 2014
/usr/bin/uname -p = unknown
/bin/uname -X = unknown
/bin/arch = unknown
/usr/bin/arch -k = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo = unknown
/bin/machine = unknown
/usr/bin/oslevel = unknown
/bin/universe = unknown
PATH: /usr/local/sbin
PATH: /usr/local/bin
PATH: /usr/sbin
PATH: /usr/bin
PATH: /sbin
PATH: /bin
PATH: /usr/games
PATH: /usr/local/games
PATH: /mnt/c/ProgramData/Oracle/Java/javapath_target_3578562
PATH: /mnt/c/Windows/System32
PATH: /mnt/c/Windows
PATH: /mnt/c/Windows/System32/wbem
PATH: /mnt/c/Windows/System32/WindowsPowerShell/v1.0
PATH: /mnt/c/Windows/System32
PATH: /mnt/c/Windows
PATH: /mnt/c/Windows/System32/wbem
PATH: /mnt/c/Windows/System32/WindowsPowerShell/v1.0
PATH: /mnt/c/Program Files/Microsoft DNX/Dnvm
PATH: /mnt/c/Program Files/Microsoft SQL Server/110/Tools/Binn
PATH: /mnt/c/Program Files (x86)/Windows Kits/8.1/Windows Performance Toolkit
PATH: /mnt/c/Program Files (x86)/NVIDIA Corporation/PhysX/Common
PATH: /mnt/c/Windows/System32
PATH: /mnt/c/Windows
PATH: /mnt/c/Windows/System32/wbem
PATH: /mnt/c/Windows/System32/WindowsPowerShell/v1.0
PATH: /mnt/c/Users/Bendy/AppData/Local/Microsoft/WindowsApps
PATH: /snap/bin
## ----------- ##
## Core tests. ##
## ----------- ##
configure:2067: checking build system type
configure:2081: result: x86_64-unknown-linux-gnu
configure:2101: checking host system type
configure:2114: result: i686-w64-mingw32
configure:2134: checking target system type
configure:2147: result: i686-w64-mingw32
configure:2190: checking for a BSD-compatible install
configure:2258: result: /usr/bin/install -c
configure:2269: checking whether build environment is sane
configure:2324: result: yes
configure:2383: checking for i686-w64-mingw32-strip
configure:2399: found /usr/bin/i686-w64-mingw32-strip
configure:2410: result: i686-w64-mingw32-strip
configure:2475: checking for a thread-safe mkdir -p
configure:2514: result: /bin/mkdir -p
configure:2521: checking for gawk
configure:2537: found /usr/bin/gawk
configure:2548: result: gawk
configure:2559: checking whether make sets $(MAKE)
configure:2581: result: yes
configure:2671: checking building for Win32
configure:2676: result: yes
configure:2730: checking for i686-w64-mingw32-gcc
configure:2746: found /usr/bin/i686-w64-mingw32-gcc
configure:2757: result: i686-w64-mingw32-gcc
configure:3026: checking for C compiler version
configure:3035: i686-w64-mingw32-gcc --version >&5
i686-w64-mingw32-gcc (GCC) 5.3.1 20160211
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
configure:3046: $? = 0
configure:3035: i686-w64-mingw32-gcc -v >&5
Using built-in specs.
COLLECT_GCC=i686-w64-mingw32-gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/i686-w64-mingw32/5.3-win32/lto-wrapper
Target: i686-w64-mingw32
Configured with: ../../src/configure --build=x86_64-linux-gnu --prefix=/usr --includedir='/usr/include' --mandir='/usr/share/man' --infodir='/usr/share/info' --sysconfdir=/etc --localstatedir=/var --disable-silent-rules --libexecdir='/usr/lib/gcc-mingw-w64' --disable-maintainer-mode --disable-dependency-tracking --prefix=/usr --enable-shared --enable-static --disable-multilib --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --libdir=/usr/lib --enable-libstdcxx-time=yes --with-tune=generic --enable-version-specific-runtime-libs --enable-fully-dynamic-string --enable-libgomp --enable-languages=c,c++,fortran,objc,obj-c++ --enable-lto --with-plugin-ld --enable-threads=win32 --program-suffix=-win32 --program-prefix=i686-w64-mingw32- --target=i686-w64-mingw32 --with-as=/usr/bin/i686-w64-mingw32-as --with-ld=/usr/bin/i686-w64-mingw32-ld --disable-libatomic
Thread model: win32
gcc version 5.3.1 20160211 (GCC)
configure:3046: $? = 0
configure:3035: i686-w64-mingw32-gcc -V >&5
i686-w64-mingw32-gcc: error: unrecognized command line option '-V'
i686-w64-mingw32-gcc: fatal error: no input files
compilation terminated.
configure:3046: $? = 1
configure:3035: i686-w64-mingw32-gcc -qversion >&5
i686-w64-mingw32-gcc: error: unrecognized command line option '-qversion'
i686-w64-mingw32-gcc: fatal error: no input files
compilation terminated.
configure:3046: $? = 1
configure:3066: checking whether the C compiler works
configure:3088: i686-w64-mingw32-gcc -g -Wno-unused-local-typedefs conftest.c >&5
configure:3092: $? = 0
configure:3140: result: yes
configure:3143: checking for C compiler default output file name
configure:3145: result: a.exe
configure:3151: checking for suffix of executables
configure:3158: i686-w64-mingw32-gcc -o conftest.exe -g -Wno-unused-local-typedefs conftest.c >&5
configure:3162: $? = 0
configure:3184: result: .exe
configure:3206: checking whether we are cross compiling
configure:3214: i686-w64-mingw32-gcc -o conftest.exe -g -Wno-unused-local-typedefs conftest.c >&5
configure:3218: $? = 0
configure:3225: ./conftest.exe
./conftest.exe: Invalid argument
configure:3229: $? = 1
configure:3244: result: yes
configure:3249: checking for suffix of object files
configure:3271: i686-w64-mingw32-gcc -c -g -Wno-unused-local-typedefs conftest.c >&5
configure:3275: $? = 0
configure:3296: result: o
configure:3300: checking whether we are using the GNU C compiler
configure:3319: i686-w64-mingw32-gcc -c -g -Wno-unused-local-typedefs conftest.c >&5
configure:3319: $? = 0
configure:3328: result: yes
configure:3337: checking whether i686-w64-mingw32-gcc accepts -g
configure:3357: i686-w64-mingw32-gcc -c -g conftest.c >&5
configure:3357: $? = 0
configure:3398: result: yes
configure:3415: checking for i686-w64-mingw32-gcc option to accept ISO C89
configure:3478: i686-w64-mingw32-gcc -c -g -Wno-unused-local-typedefs conftest.c >&5
configure:3478: $? = 0
configure:3491: result: none needed
configure:3522: checking for style of include used by make
configure:3550: result: GNU
configure:3576: checking dependency style of i686-w64-mingw32-gcc
configure:3687: result: gcc3
configure:3716: checking for i686-w64-mingw32-g++
configure:3732: found /usr/bin/i686-w64-mingw32-g++
configure:3743: result: i686-w64-mingw32-g++
configure:3814: checking for C++ compiler version
configure:3823: i686-w64-mingw32-g++ --version >&5
i686-w64-mingw32-g++ (GCC) 5.3.1 20160211
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
configure:3834: $? = 0
configure:3823: i686-w64-mingw32-g++ -v >&5
Using built-in specs.
COLLECT_GCC=i686-w64-mingw32-g++
COLLECT_LTO_WRAPPER=/usr/lib/gcc/i686-w64-mingw32/5.3-win32/lto-wrapper
Target: i686-w64-mingw32
Configured with: ../../src/configure --build=x86_64-linux-gnu --prefix=/usr --includedir='/usr/include' --mandir='/usr/share/man' --infodir='/usr/share/info' --sysconfdir=/etc --localstatedir=/var --disable-silent-rules --libexecdir='/usr/lib/gcc-mingw-w64' --disable-maintainer-mode --disable-dependency-tracking --prefix=/usr --enable-shared --enable-static --disable-multilib --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --libdir=/usr/lib --enable-libstdcxx-time=yes --with-tune=generic --enable-version-specific-runtime-libs --enable-fully-dynamic-string --enable-libgomp --enable-languages=c,c++,fortran,objc,obj-c++ --enable-lto --with-plugin-ld --enable-threads=win32 --program-suffix=-win32 --program-prefix=i686-w64-mingw32- --target=i686-w64-mingw32 --with-as=/usr/bin/i686-w64-mingw32-as --with-ld=/usr/bin/i686-w64-mingw32-ld --disable-libatomic
Thread model: win32
gcc version 5.3.1 20160211 (GCC)
configure:3834: $? = 0
configure:3823: i686-w64-mingw32-g++ -V >&5
i686-w64-mingw32-g++: error: unrecognized command line option '-V'
i686-w64-mingw32-g++: fatal error: no input files
compilation terminated.
configure:3834: $? = 1
configure:3823: i686-w64-mingw32-g++ -qversion >&5
i686-w64-mingw32-g++: error: unrecognized command line option '-qversion'
i686-w64-mingw32-g++: fatal error: no input files
compilation terminated.
configure:3834: $? = 1
configure:3838: checking whether we are using the GNU C++ compiler
configure:3857: i686-w64-mingw32-g++ -c -g -Wno-unused-local-typedefs conftest.cpp >&5
configure:3857: $? = 0
configure:3866: result: yes
configure:3875: checking whether i686-w64-mingw32-g++ accepts -g
configure:3895: i686-w64-mingw32-g++ -c -g conftest.cpp >&5
configure:3895: $? = 0
configure:3936: result: yes
configure:3961: checking dependency style of i686-w64-mingw32-g++
configure:4072: result: gcc3
configure:4090: checking for i686-w64-mingw32-ranlib
configure:4106: found /usr/bin/i686-w64-mingw32-ranlib
configure:4117: result: i686-w64-mingw32-ranlib
configure:4234: checking for sdl-config
configure:4252: found /usr/bin/sdl-config
configure:4265: result: /usr/bin/sdl-config
configure:4275: checking for SDL - version >= 1.2.8
configure:4377: result: yes
configure:4513: checking for wx-config
configure:4532: found /usr/i686-w64-mingw32/bin/wx-config
configure:4545: result: /usr/i686-w64-mingw32/bin/wx-config
configure:4560: checking for wxWidgets version >= 2.8.9
configure:4675: result: no
configure:4749: error:
wxWidgets does not seem to be installed on your system.
If you think wxWidgets >= 2.8.9 is installed,
please check that wx-config is in path, the directory
where wxWidgets libraries are installed (returned by
'wx-config --libs' command) is in LD_LIBRARY_PATH or
equivalent variable.
## ---------------- ##
## Cache variables. ##
## ---------------- ##
ac_cv_build=x86_64-unknown-linux-gnu
ac_cv_c_compiler_gnu=yes
ac_cv_cxx_compiler_gnu=yes
ac_cv_env_CCC_set=
ac_cv_env_CCC_value=
ac_cv_env_CC_set=
ac_cv_env_CC_value=
ac_cv_env_CFLAGS_set=
ac_cv_env_CFLAGS_value=
ac_cv_env_CPPFLAGS_set=
ac_cv_env_CPPFLAGS_value=
ac_cv_env_CXXFLAGS_set=
ac_cv_env_CXXFLAGS_value=
ac_cv_env_CXX_set=
ac_cv_env_CXX_value=
ac_cv_env_LDFLAGS_set=
ac_cv_env_LDFLAGS_value=
ac_cv_env_LIBS_set=
ac_cv_env_LIBS_value=
ac_cv_env_build_alias_set=
ac_cv_env_build_alias_value=
ac_cv_env_host_alias_set=set
ac_cv_env_host_alias_value=i686-w64-mingw32
ac_cv_env_target_alias_set=
ac_cv_env_target_alias_value=
ac_cv_exeext=.exe
ac_cv_host=i686-w64-mingw32
ac_cv_objext=o
ac_cv_path_SDL_CONFIG=/usr/bin/sdl-config
ac_cv_path_WX_CONFIG_PATH=/usr/i686-w64-mingw32/bin/wx-config
ac_cv_path_install='/usr/bin/install -c'
ac_cv_path_mkdir=/bin/mkdir
ac_cv_prog_AWK=gawk
ac_cv_prog_CC=i686-w64-mingw32-gcc
ac_cv_prog_CXX=i686-w64-mingw32-g++
ac_cv_prog_RANLIB=i686-w64-mingw32-ranlib
ac_cv_prog_STRIP=i686-w64-mingw32-strip
ac_cv_prog_cc_c89=
ac_cv_prog_cc_g=yes
ac_cv_prog_cxx_g=yes
ac_cv_prog_make_make_set=yes
ac_cv_target=i686-w64-mingw32
am_cv_CC_dependencies_compiler_type=gcc3
am_cv_CXX_dependencies_compiler_type=gcc3
## ----------------- ##
## Output variables. ##
## ----------------- ##
ACLOCAL='${SHELL} /home/sound-of-sorting-master/sound-of-sorting-master/acscripts/missing --run aclocal-1.12'
AMDEPBACKSLASH='\'
AMDEP_FALSE='#'
AMDEP_TRUE=''
AMTAR='$${TAR-tar}'
AUTOCONF='${SHELL} /home/sound-of-sorting-master/sound-of-sorting-master/acscripts/missing --run autoconf'
AUTOHEADER='${SHELL} /home/sound-of-sorting-master/sound-of-sorting-master/acscripts/missing --run autoheader'
AUTOMAKE='${SHELL} /home/sound-of-sorting-master/sound-of-sorting-master/acscripts/missing --run automake-1.12'
AWK='gawk'
CC='i686-w64-mingw32-gcc'
CCDEPMODE='depmode=gcc3'
CFLAGS='-g -Wno-unused-local-typedefs'
CPPFLAGS=''
CXX='i686-w64-mingw32-g++'
CXXDEPMODE='depmode=gcc3'
CXXFLAGS='-g -Wno-unused-local-typedefs'
CYGPATH_W='echo'
DEFS=''
DEPDIR='.deps'
ECHO_C=''
ECHO_N='-n'
ECHO_T=''
EXEEXT='.exe'
GOT_RESCOMP_FALSE=''
GOT_RESCOMP_TRUE=''
INSTALL_DATA='${INSTALL} -m 644'
INSTALL_PROGRAM='${INSTALL}'
INSTALL_SCRIPT='${INSTALL}'
INSTALL_STRIP_PROGRAM='$(install_sh) -c -s'
LDFLAGS=''
LIBOBJS=''
LIBS=''
LTLIBOBJS=''
MAKEINFO='${SHELL} /home/sound-of-sorting-master/sound-of-sorting-master/acscripts/missing --run makeinfo'
MKDIR_P='/bin/mkdir -p'
OBJEXT='o'
ON_WIN32_FALSE='#'
ON_WIN32_TRUE=''
PACKAGE='sound-of-sorting'
PACKAGE_BUGREPORT=''
PACKAGE_NAME='sound-of-sorting'
PACKAGE_STRING='sound-of-sorting 0.6.5'
PACKAGE_TARNAME='sound-of-sorting'
PACKAGE_URL=''
PACKAGE_VERSION='0.6.5'
PATH_SEPARATOR=':'
RANLIB='i686-w64-mingw32-ranlib'
SDL_CFLAGS='-I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT'
SDL_CONFIG='/usr/bin/sdl-config'
SDL_LIBS='-L/usr/lib/x86_64-linux-gnu -lSDL'
SET_MAKE=''
SHELL='/bin/bash'
STRIP='i686-w64-mingw32-strip'
VERSION='0.6.5'
WX_CFLAGS=''
WX_CFLAGS_ONLY=''
WX_CONFIG_PATH='/usr/i686-w64-mingw32/bin/wx-config'
WX_CPPFLAGS=''
WX_CXXFLAGS=''
WX_CXXFLAGS_ONLY=''
WX_LIBS=''
WX_LIBS_STATIC=''
WX_RESCOMP=''
WX_VERSION=''
WX_VERSION_MAJOR=''
WX_VERSION_MICRO=''
WX_VERSION_MINOR=''
ac_ct_CC=''
ac_ct_CXX=''
am__EXEEXT_FALSE=''
am__EXEEXT_TRUE=''
am__fastdepCC_FALSE='#'
am__fastdepCC_TRUE=''
am__fastdepCXX_FALSE='#'
am__fastdepCXX_TRUE=''
am__include='include'
am__isrc=''
am__leading_dot='.'
am__nodep='_no'
am__quote=''
am__tar='$${TAR-tar} chof - "$$tardir"'
am__untar='$${TAR-tar} xf -'
bindir='${exec_prefix}/bin'
build='x86_64-unknown-linux-gnu'
build_alias=''
build_cpu='x86_64'
build_os='linux-gnu'
build_vendor='unknown'
datadir='${datarootdir}'
datarootdir='${prefix}/share'
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
dvidir='${docdir}'
exec_prefix='NONE'
host='i686-w64-mingw32'
host_alias='i686-w64-mingw32'
host_cpu='i686'
host_os='mingw32'
host_vendor='w64'
htmldir='${docdir}'
includedir='${prefix}/include'
infodir='${datarootdir}/info'
install_sh='${SHELL} /home/sound-of-sorting-master/sound-of-sorting-master/acscripts/install-sh'
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
localedir='${datarootdir}/locale'
localstatedir='${prefix}/var'
mandir='${datarootdir}/man'
mkdir_p='$(MKDIR_P)'
oldincludedir='/usr/include'
pdfdir='${docdir}'
prefix='NONE'
program_transform_name='s,x,x,'
psdir='${docdir}'
runstatedir='${localstatedir}/run'
sbindir='${exec_prefix}/sbin'
sharedstatedir='${prefix}/com'
sysconfdir='${prefix}/etc'
target='i686-w64-mingw32'
target_alias=''
target_cpu='i686'
target_os='mingw32'
target_vendor='w64'
## ----------- ##
## confdefs.h. ##
## ----------- ##
/* confdefs.h */
#define PACKAGE_NAME "sound-of-sorting"
#define PACKAGE_TARNAME "sound-of-sorting"
#define PACKAGE_VERSION "0.6.5"
#define PACKAGE_STRING "sound-of-sorting 0.6.5"
#define PACKAGE_BUGREPORT ""
#define PACKAGE_URL ""
#define PACKAGE "sound-of-sorting"
#define VERSION "0.6.5"
configure: exit 1
You're trying to cross-compile from Linux to Windows. For this to work, you need a Windows version of wxWidgets and not the native Linux one which is found in your first example.
Do you actually want to cross-compile? Your phrase about "just because the host is different" leaves a doubt about whether you actually do it intentionally.

Use configure file to generate makefile

I use ./configure command to generate a makefile. My compiler is arm-fsl-linux-gnueabi toochain. When I ran ./configure, I got the following problem:
tl#tl-virtual-machine:~/Desktop/mvux_camera/demo/sampli_save_demo$ ./configure --host=/home/tl/Desktop/opt/Embedsky/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/tq-linaro-toolchain/bin/arm-fsl-linux-gnueabi-g++
configure: WARNING: if you wanted to set the --build type, don't use --host.
If a cross compiler is detected then cross compile mode will be used
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for /home/tl/Desktop/opt/Embedsky/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/tq-linaro-toolchain/bin/arm-fsl-linux-gnueabi-g++-strip... no
checking for strip... strip
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking for /home/tl/Desktop/opt/Embedsky/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/tq-linaro-toolchain/bin/arm-fsl-linux-gnueabi-g++-g++... no
checking for /home/tl/Desktop/opt/Embedsky/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/tq-linaro-toolchain/bin/arm-fsl-linux-gnueabi-g++-c++... no
checking for /home/tl/Desktop/opt/Embedsky/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/tq-linaro-toolchain/bin/arm-fsl-linux-gnueabi-g++-gpp... no
checking for /home/tl/Desktop/opt/Embedsky/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/tq-linaro-toolchain/bin/arm-fsl-linux-gnueabi-g++-aCC... no
checking for /home/tl/Desktop/opt/Embedsky/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/tq-linaro-toolchain/bin/arm-fsl-linux-gnueabi-g++-CC... no
checking for /home/tl/Desktop/opt/Embedsky/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/tq-linaro-toolchain/bin/arm-fsl-linux-gnueabi-g++-cxx... no
checking for /home/tl/Desktop/opt/Embedsky/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/tq-linaro-toolchain/bin/arm-fsl-linux-gnueabi-g++-cc++... no
checking for /home/tl/Desktop/opt/Embedsky/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/tq-linaro-toolchain/bin/arm-fsl-linux-gnueabi-g++-cl.exe... no
checking for /home/tl/Desktop/opt/Embedsky/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/tq-linaro-toolchain/bin/arm-fsl-linux-gnueabi-g++-FCC... no
checking for /home/tl/Desktop/opt/Embedsky/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/tq-linaro-toolchain/bin/arm-fsl-linux-gnueabi-g++-KCC... no
checking for /home/tl/Desktop/opt/Embedsky/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/tq-linaro-toolchain/bin/arm-fsl-linux-gnueabi-g++-RCC... no
checking for /home/tl/Desktop/opt/Embedsky/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/tq-linaro-toolchain/bin/arm-fsl-linux-gnueabi-g++-xlC_r... no
checking for /home/tl/Desktop/opt/Embedsky/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/tq-linaro-toolchain/bin/arm-fsl-linux-gnueabi-g++-xlC... no
checking for g++... no
checking for c++... no
checking for gpp... no
checking for aCC... no
checking for CC... no
checking for cxx... no
checking for cc++... no
checking for cl.exe... no
checking for FCC... no
checking for KCC... no
checking for RCC... no
checking for xlC_r... no
checking for xlC... no
checking whether the C++ compiler works... no
configure: error: in '/home/tl/Desktop/mvux_camera/demo/sampli_save_demo':
configure: error: C++ compiler cannot create executables
See 'config.log' for more details
My toolchain was sourced, when typing arm-fsl-linux-gnueabi-gcc -v, the command line shows it works.
tl#tl-virtual-machine:~/Desktop/mvux_camera/demo/sampli_save_demo$ arm-fsl-linux-gnueabi-gcc -v
Using built-in specs.
COLLECT_GCC=arm-fsl-linux-gnueabi-gcc
COLLECT_LTO_WRAPPER=/home/tl/Desktop/opt/Embedsky/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/tq-linaro-toolchain/bin/../libexec/gcc/arm-fsl-linux-gnueabi/4.6.2/lto-wrapper
Target: arm-fsl-linux-gnueabi
Configured with: /work/build/.build/src/gcc-linaro-4.6-2011.06-0/configure --build=i686-build_pc-linux-gnu --host=i686-build_pc-linux-gnu --target=arm-fsl-linux-gnueabi --prefix=/work/fsl-linaro-toolchain-2.13 --with-sysroot=/work/fsl-linaro-toolchain-2.13/arm-fsl-linux-gnueabi/multi-libs --enable-languages=c,c++ --with-pkgversion='Freescale MAD -- Linaro 2011.07 -- Built at 2011/08/10 09:20' --enable-__cxa_atexit --disable-libmudflap --disable-libgomp --disable-libssp --with-gmp=/work/build/.build/arm-fsl-linux-gnueabi/build/static --with-mpfr=/work/build/.build/arm-fsl-linux-gnueabi/build/static --with-mpc=/work/build/.build/arm-fsl-linux-gnueabi/build/static --with-ppl=/work/build/.build/arm-fsl-linux-gnueabi/build/static --with-cloog=/work/build/.build/arm-fsl-linux-gnueabi/build/static --with-libelf=/work/build/.build/arm-fsl-linux-gnueabi/build/static --with-host-libstdcxx='-static-libgcc -Wl,-Bstatic,-lstdc++,-Bdynamic -lm -L/work/build/.build/arm-fsl-linux-gnueabi/build/static/lib -lpwl' --enable-threads=posix --enable-target-optspace --enable-plugin --enable-multilib --with-local-prefix=/work/fsl-linaro-toolchain-2.13/arm-fsl-linux-gnueabi/multi-libs --disable-nls --enable-c99 --enable-long-long --with-system-zlib
Thread model: posix
gcc version 4.6.2 20110630 (prerelease) (Freescale MAD -- Linaro 2011.07 -- Built at 2011/08/10 09:20)
Look at the output of ./configure --help, especially:
System types:
--build=BUILD configure for building on BUILD [guessed]
--host=HOST cross-compile to build programs to run on HOST [BUILD]
HOST should be the identity of the system on which you want your cross-compiled
program to run. But you have set it to the absolute filename of your C++ compiler:
./configure --host=/home/tl/Desktop/opt/Embedsky/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/tq-linaro-toolchain/bin/arm-fsl-linux-gnueabi-g++
which results in your ./configure script attempting and failing to locate a cross-compiler
with such nonsense names as:
/home/tl/Desktop/opt/Embedsky/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/tq-linaro-toolchain/bin/arm-fsl-linux-gnueabi-g++-g++
/home/tl/Desktop/opt/Embedsky/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/tq-linaro-toolchain/bin/arm-fsl-linux-gnueabi-g++-c++
Look at the output of arm-fsl-linux-gnueabi-gcc -v, specifically:
Target: arm-fsl-linux-gnueabi
This tells you that your cross-compiler was built to cross-compile programs
for arm-fsl-linux-gnueabi systems. Therefore, when you want to ./configure
a project to use that cross-compiler, HOST = arm-fsl-linux-gnueabi

sqlcipher ./configuration Windows

How can I compile Sqlcipher on windows?
I'm trying this:
Git Clone sqlcipher C:\sqlcipher
Install MINGW32 C:\MINGW32
Install msys C:\MINGW32\msys\1.0
Install tcltk-8.4.1-1 C:\MINGW32\bin tclsh84 to tclsh.exe
Install Win32OpenSSL-1_0_1f C:\OpenSSL-Win32
1- Run C:\MINGW32\msys\1.0\msys.exe
2 - Cmd mysys command cd c:sqlcipher
3 - ./configure --prefix=C:/Qt/Qt5.2.1/5.2.1/mingw48_32/plugins/sqldrivers/qsqlcipher CFLAGS="-DSQLITE_HAS_CODEC" LDFLAGS="-lcrypto"
returns the error:
./configure: line 470: sed: command not found
./configure: line 469: expr:command not found
./configure: line 470: sed: command not found
./configure: line 484: sed: command not found
Updated
Config.log
configure:2484: checking build system type
configure:2498: result: i686-pc-mingw32
configure:2518: checking host system type
configure:2531: result: i686-pc-mingw32
configure:2599: checking for gcc
configure:2615: found /bin/gcc
configure:2626: result: gcc
configure:2855: checking for C compiler version
configure:2864: gcc --version >&5
gcc.exe (GCC) 4.8.1
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
configure:2875: $? = 0
configure:2864: gcc -v >&5
Using built-in specs.
COLLECT_GCC=C:\MinGW\msys\1.0\bin\gcc.exe
Target: mingw32
Configured with: ../gcc-4.8.1/configure --prefix=/mingw --host=mingw32 --build=mingw32 --without-pic --enable-shared --enable-static --with-gnu-ld --enable-lto --enable-libssp --disable-multilib --enable-languages=c,c++,fortran,objc,obj-c++,ada --disable-sjlj-exceptions --with-dwarf2 --disable-win32-registry --enable-libstdcxx-debug --enable-version-specific-runtime-libs --with-gmp=/usr/src/pkg/gmp-5.1.2-1-mingw32-src/bld --with-mpc=/usr/src/pkg/mpc-1.0.1-1-mingw32-src/bld --with-mpfr= --with-system-zlib --with-gnu-as --enable-decimal-float=yes --enable-libgomp --enable-threads --with-libiconv-prefix=/mingw32 --with-libintl-prefix=/mingw --disable-bootstrap LDFLAGS=-s CFLAGS=-D_USE_32BIT_TIME_T
Thread model: win32
gcc version 4.8.1 (GCC)
configure:2875: $? = 0
configure:2864: gcc -V >&5
gcc.exe: error: unrecognized command line option '-V'
gcc.exe: fatal error: no input files
compilation terminated.
configure:2875: $? = 1
configure:2864: gcc -qversion >&5
gcc.exe: error: unrecognized command line option '-qversion'
gcc.exe: fatal error: no input files
compilation terminated.
configure:2875: $? = 1
configure:2895: checking whether the C compiler works
configure:2917: gcc conftest.c >&5
gcc.exe: error: CreateProcess: No such file or directory
configure:2921: $? = 1
configure:2959: result: no
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "sqlcipher"
| #define PACKAGE_TARNAME "sqlcipher"
| #define PACKAGE_VERSION "3.8.0.2"
| #define PACKAGE_STRING "sqlcipher 3.8.0.2"
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| /* end confdefs.h. */
|
| int
| main ()
| {
|
| ;
| return 0;
| }
configure:2964: error: in `/c/sqlcipher':
configure:2966: error: C compiler cannot create executables
See `config.log' for more details

msys and tdm-gcc: configure error - cannot run C compiled programs

so I'm trying to compile a preexisting C++ project with msys and tdm-gcc in Windows. I have done this successfully by installing tdm-gcc (latest version) via the installer, editing MinGW/msys/1.0/etc/fstab to give my tdm-gcc install as the mount location, then running msys to call the configure script, and make.
However, for this project I need to use an old version of tdm-gcc (4.6.1-tdm64-1) for binary compatibility. So I installed the required packages from the tdm-gcc sourceforge site (gcc core, gcc c++, binutils, mingw64-runtime, mingw32-make, libintl, libiconv, all of the version the readme says to use with 4.6.1), extracted to a new directory, and edited fstab to point to their location. Now while executing the configure I get this error: cannot run C compiled programs. The config file reads:
[omitted]
configure:3436: $? = 0
configure:3425: gcc -v >&5
Using built-in specs.
COLLECT_GCC=c:\TDM-GCC-4.6.1-64\bin\gcc.exe
COLLECT_LTO_WRAPPER=c:/tdm-gcc-4.6.1-64/bin/../libexec/gcc/x86_64-w64-mingw32/4.6.1/lto-wrapper.exe
Target: x86_64-w64-mingw32
Configured with: ../../src/gcc-4.6.1/configure --build=x86_64-w64-mingw32 --enable- targets=all --enable-languages=c,c++,fortran,objc,obj-c++ --enable-libgomp --enable-lto --enable-libstdcxx-debug --enable-version-specific-runtime-libs --enable-fully-dynamic-string --with-gnu-ld --disable-werror --disable-nls --disable-win32-registry --prefix=/mingw64tdm --with-local-prefix=/mingw64tdm --with-pkgversion=tdm64-1 --with-bugurl=http://tdm-gcc.tdragon.net/bugs
Thread model: win32
gcc version 4.6.1 (tdm64-1)
configure:3436: $? = 0
configure:3425: gcc -V >&5
gcc.exe: error: unrecognized option '-V'
gcc.exe: fatal error: no input files
compilation terminated.
configure:3436: $? = 1
configure:3425: gcc -qversion >&5
gcc.exe: error: unrecognized option '-qversion'
gcc.exe: fatal error: no input files
compilation terminated.
configure:3436: $? = 1
configure:3456: checking whether the C compiler works
configure:3478: gcc conftest.c >&5
configure:3482: $? = 0
configure:3530: result: yes
configure:3533: checking for C compiler default output file name
configure:3535: result: a.exe
configure:3541: checking for suffix of executables
configure:3548: gcc -o conftest.exe conftest.c >&5
configure:3552: $? = 0
configure:3574: result: .exe
configure:3596: checking whether we are cross compiling
configure:3604: gcc -o conftest.exe conftest.c >&5
configure:3608: $? = 0
configure:3615: ./conftest.exe
./configure: line 3617: ./conftest.exe: Bad file number
configure:3619: $? = 126
configure:3626: error: in `/c/jagswm':
configure:3628: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details
[omitted]
I've tried adding the tdm-gcc bin to my path, although I don't think that should matter if fstab is set.
Any advice would be greatly appreciated, thanks.
Try to disable your antivirus.
Worked for me while compiling GStreamer, probably because Avast was deleting the a.exe file.
Source: http://wiki.openttd.org/Compiling_on_Windows_using_MinGW#Compilation_and_installation_of_the_required_packages

MingW c++ compile Error Win 7 x64

I'm trying to compile a simple C++ HelloWorld example on my Win 7 x64 machine with the mingw compiler.
I downloaded the automated installer here: http://sourceforge.net/project/showfiles.php?group_id=2435
After setting the required paths in the system environment variables i was trying to get the compiler to work with a simple HelloWorld example. Sadly, it always crashes with the following error dialog (i am using a german windows, so the translation may not be perfect):
cc1plus.exe - Application error
The application could not be started correctly (0xc000003b).
Click "OK" to close the application.
Below the verbose compile output
W:\Timo\workspace\c++\HelloWorld>gcc HelloWorld.cpp -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=d:/workspace/mingw/bin/../libexec/gcc/mingw32/4.5.2/lto-wrapper.exe
Target: mingw32
Configured with: ../gcc-4.5.2/configure --enable-languages=c,c++,ada,fortran,objc,obj-c++ --disable-sjlj-exceptions --with-dwarf2 --ena
ble-shared --enable-libgomp --disable-win32-registry --enable-libstdcxx-debug --enable-version-specific-runtime-libs --disable-werror -
-build=mingw32 --prefix=/mingw
Thread model: win32
gcc version 4.5.2 (GCC)
COLLECT_GCC_OPTIONS='-v' '-mtune=i386' '-march=i386'
d:/workspace/mingw/bin/../libexec/gcc/mingw32/4.5.2/cc1plus.exe -quiet -v -iprefix d:\workspace\mingw\bin\../lib/gcc/mingw32/4.5.2/ He
lloWorld.cpp -quiet -dumpbase HelloWorld.cpp -mtune=i386 -march=i386 -auxbase HelloWorld -version -o C:\Users\afro\AppData\Local\Temp\c
czfrXM3.s
Thanks in advance.
Timo
I've found the problem. The file i tried to compile was saved on my NAS-Server which requires a login to access the files. I was able to access the file via console, the compiler obviously did not. After moving the source files on my local hdd, the compiler started working.