How to install mingw on linux and configure it to compile C++ code targeting windows? - c++

I would like to install mingw to to use it's cross compiler to compile C++ code in Linux (Centos 7) and get an exe to run on Windows (64 bits).
However I have no access to sudo and I cannot install anything using the package manager, so I'll have to install it manually in a certain directory. I downloaded the .zip from https://sourceforge.net/projects/mingw-w64/, extracted it and in it's folder I tried using the configure script to set it up. by doing the following in the folder it was extracted in.
configure --prefix=/home/myUsername/mingw --enable-lib32 --enable-lib64 --enable-experimental --host=x86_64-w64-mingw32
Which gives me the following output & errors:
checking whether to enable maintainer-specific portions of Makefiles... no
checking for a BSD-compatible install... /bin/install -c
checking whether build environment is sane... yes
checking for x86_64-w64-mingw32-strip... no
checking for strip... strip
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-w64-mingw32
checking whether to build the headers... yes
checking whether to build the crt... yes
checking whether to build the optional libraries... no
checking whether to build the optional tools... no
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating config.h
config.status: config.h is unchanged
=== configuring in mingw-w64-headers (/home/myUsername/mingw/mingw-w64-v8.0.0/mingw-w64-headers)
configure: running /bin/sh ./configure --disable-option-checking '--prefix=/home/myUsername/mingw' '--enable-lib32' '--enable-lib64' '--enable-experimental' '--host=x86_64-w64-mingw32' 'host_alias=x86_64-w64-mingw32' --cache-file=/dev/null --srcdir=.
checking for a BSD-compatible install... /bin/install -c
checking whether build environment is sane... yes
checking for x86_64-w64-mingw32-strip... no
checking for strip... strip
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-w64-mingw32
checking for a sed that does not truncate output... /bin/sed
checking whether to rebuild headers with widl... no
checking whether to build a w32api package for Cygwin... no
checking for c-runtime headers... yes
checking for optional sdk headers... ddk
checking if installing idl files is enabled... no
checking default _WIN32_WINNT version... 0x502
checking default msvcrt... msvcrt (0x700)
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating crt/_mingw.h
config.status: creating config.h
config.status: config.h is unchanged
=== configuring in mingw-w64-crt (/home/myUsername/mingw/mingw-w64-v8.0.0/mingw-w64-crt)
configure: running /bin/sh ./configure --disable-option-checking '--prefix=/home/myUsername/mingw' '--enable-lib32' '--enable-lib64' '--enable-experimental' '--host=x86_64-w64-mingw32' 'host_alias=x86_64-w64-mingw32' --cache-file=/dev/null --srcdir=.
checking for a BSD-compatible install... /bin/install -c
checking whether build environment is sane... yes
checking for x86_64-w64-mingw32-strip... no
checking for strip... strip
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-w64-mingw32
checking for sysroot... /home/myUsername/mingw
checking for a sed that does not truncate output... /bin/sed
checking for gawk... (cached) gawk
checking for x86_64-w64-mingw32-gcc... no
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking whether make supports the include directive... yes (GNU style)
checking dependency style of gcc... gcc3
checking for x86_64-w64-mingw32-g++... no
checking for x86_64-w64-mingw32-c++... no
checking for x86_64-w64-mingw32-gpp... no
checking for x86_64-w64-mingw32-aCC... no
checking for x86_64-w64-mingw32-CC... no
checking for x86_64-w64-mingw32-cxx... no
checking for x86_64-w64-mingw32-cc++... no
checking for x86_64-w64-mingw32-cl.exe... no
checking for x86_64-w64-mingw32-FCC... no
checking for x86_64-w64-mingw32-KCC... no
checking for x86_64-w64-mingw32-RCC... no
checking for x86_64-w64-mingw32-xlC_r... no
checking for x86_64-w64-mingw32-xlC... no
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking how to run the C preprocessor... gcc -E
checking for x86_64-w64-mingw32-ranlib... no
checking for ranlib... ranlib
checking for x86_64-w64-mingw32-dlltool... no
checking for dlltool... no
checking for x86_64-w64-mingw32-ar... no
checking for x86_64-w64-mingw32-lib... no
checking for x86_64-w64-mingw32-link... no
checking for ar... ar
checking the archiver (ar) interface... ar
checking dependency style of gcc... gcc3
checking for x86_64-w64-mingw32-as... no
checking for as... as
checking whether to build a w32api package for Cygwin... no
checking whether to build the Win32 libraries... yes
checking whether to build the Win64 libraries... yes
checking whether to build the WinARM32 libraries... no
checking whether to build the WinARM64 libraries... no
checking whether to use genlib... no
checking whether to enable globbing... no
checking whether to enable private exports... no
checking whether to enable delay import libs... no
checking what to provide as libmsvcrt.a... msvcrt-os
checking whether to enable experimental features... yes
checking whether the compiler supports -municode... no
checking whether the linker provides _CTOR_LIST_... no
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking _mingw_mac.h usability... no
checking _mingw_mac.h presence... no
checking for _mingw_mac.h... no
configure: error: Please check if the mingw-w64 header set and the build/host option are set properly.
configure: error: ./configure failed for mingw-w64-crt
Every guide or answers I have seen starts by using the package manager apt-get to install the compiler, so I'm kind of lost on where to look or what to try.
Thank you in advance.

Related

./configure results in bootstrapping make fragment error only on github

I have a docker container build from debian:latest. The Dockerfile configures and makes the project the project. This build works on local and builds a container. However on github it gives me the following error:
[1/2] STEP 16/17: RUN ./configure GIT_BRANCH=$BRANCH GIT_VERSION=$VERSION
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
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 whether make supports nested variables... yes
checking whether make supports nested variables... (cached) yes
checking for g++... g++
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking whether make supports the include directive... yes (GNU style)
checking dependency style of g++... gcc3
checking for gcc... gcc
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking dependency style of gcc... gcc3
checking for gcc option to accept ISO C99... none needed
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking how to print strings... printf
checking for a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 3145728
checking how to convert x86_64-pc-linux-gnu file names to x86_64-pc-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-pc-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver #FILE support... #
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for a working dd... /bin/dd
checking how to truncate binary pipes... /bin/dd bs=4096 count=1
checking for mt... no
checking if : is a manifest tool... no
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking how to run the C++ preprocessor... g++ -E
checking for ld used by g++... /usr/bin/ld -m elf_x86_64
checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC -DPIC
checking if g++ PIC flag -fPIC -DPIC works... yes
checking if g++ static flag -static works... yes
checking if g++ supports -c -o file.o... yes
checking if g++ supports -c -o file.o... (cached) yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking dynamic linker characteristics... (cached) GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether g++ supports C++14 features with -std=c++14... yes
checking for boostlib >= 1.42.0... yes
checking whether the Boost::Regex library is available... yes
checking for exit in -lboost_regex... yes
checking for sphirewall-libs... configure: We could not detect the sphirewall libraries.
checking for ldap_simple_bind_s in -lldap... yes
checking for pthread_create in -lpthread... yes
checking for curl_global_init in -lcurl... yes
checking for sys/types.h... (cached) yes
checking for netinet/in.h... yes
checking for arpa/nameser.h... yes
checking for netdb.h... yes
checking for resolv.h... yes
checking whether to enable assertions... yes
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for libprocps... yes
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating src/Makefile
config.status: creating Makefile
config.status: creating src/autoconf.h
config.status: executing depfiles commands
config.status: error: in `/sphirewall-code/sphirewall-core':
config.status: error: Something went wrong bootstrapping makefile fragments
for automatic dependency tracking. If GNU make was not used, consider
re-running the configure script with MAKE="gmake" (or whatever is
necessary). You can also try re-running configure with the
'--disable-dependency-tracking' option to at least be able to build
the package (albeit without support for automatic dependency tracking).
See `config.log' for more details
[2/2] STEP 1/10: FROM debian:latest
error building at STEP "RUN ./configure GIT_BRANCH=$BRANCH GIT_VERSION=$VERSION": error while running runtime: exit status 1
time="2023-01-12T15:41:50Z" level=error msg="exit status 1"
Error: Error: buildah exited with code 1
I expect my github action to build a container out of this. I have attached my docker file too. I also wish I could see the config.log that github generates. Is there a way to do that?
Docker file:
#Taking base as bookworm version and naming it builder
FROM debian:latest as builder
ENV DEBIAN_FRONTEND=noninteractive
#Libraries needed
RUN apt-get update
RUN apt-get -y install build-essential apt-utils\
libprocps-dev\
iproute2\
g++\
libcurl4-openssl-dev\
libdumbnet-dev\
libjemalloc-dev\
libpam0g-dev\
libldap2-dev\
libpcap-dev\
libevent-dev\
libnfnetlink-dev\
libmnl-dev\
ldap-utils\
libnetfilter-queue-dev\
uuid-dev\
libtool\
libncurses5\
libncurses5-dev\
libboost-dev\
libgtest-dev\
libboost-regex-dev\
openssl\
libssl-dev\
automake\
libboost-thread-dev\
libboost-system-dev\
libsqlite3-dev\
libboost-serialization-dev\
libboost-random-dev\
libboost-iostreams-dev\
procps\
libnetfilter-conntrack-dev\
libpstreams-dev\
kmod\
vim\
iptables\
pkg-config
COPY fz-pkgrepo_1.0_amd64.deb /tmp
RUN dpkg -i /tmp/fz-pkgrepo_1.0_amd64.deb
RUN apt-get update
COPY sphirewall.conf /etc/sphirewall.conf
RUN mkdir sphirewall-code
COPY ../sphirewall-code sphirewall-code/
WORKDIR /sphirewall-code/sphirewall-core
#Make the sphirewalld service inside
RUN ls
RUN autoreconf -ivf
RUN ./configure
RUN make

OpenCL in Cygwin

Hi I am trying to compile the tesseract-OCR engine in Cygwin.My Host machine is running windows 7 and i have the NVIDIA toolkit installed. I am unable to find a good answer as to how to link the headers required. Tesseract is a Makefile project and when i run the ./configure script i get the following output.
$ ./configure LDFLAGS=-L/usr/local/lib --enable-opencl checking for g++... g++
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... no
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
fatal: Not a git repository: './.git'
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for style of include used by make... GNU
checking whether make supports nested variables... yes
checking dependency style of g++... gcc3
checking whether to enable maintainer-specific portions of Makefiles... no
checking build system type... x86_64-unknown-cygwin
checking host system type... x86_64-unknown-cygwin
checking --enable-graphics argument... yes
checking whether to disable cube... no
checking --enable-embedded argument... no
checking for g++ option to support OpenMP... -fopenmp
checking --enable-opencl argument... yes
checking how to run the C++ preprocessor... g++ -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking CL/cl.h usability... no
checking CL/cl.h presence... no
checking for CL/cl.h... no
checking OpenCL/cl.h usability... no
checking OpenCL/cl.h presence... no
checking for OpenCL/cl.h... no
checking tiffio.h usability... yes
checking tiffio.h presence... yes
checking for tiffio.h... yes
checking for clGetPlatformIDs in -lOpenCL... no
configure: error: Required OpenCL headers not found!
The last few lines indicate that i have missing header files.
Online resources don't seem to have enough information regarding how to link the opencl files from my host system.
Any help would be appreciated.

install gcc 4.9 under suse10, "checking whether to enable maintainer-specific portions of Makefiles... no"

I install gcc 4.9 by the following step
wget ftp://mirrors.kernel.org/gnu/gcc/gcc-4.9.0/gcc-4.9.0.tar.gz
tar -zxvf gcc-4.9.0.tar.gz
cd gcc-4.9.0
./contrib/download_prerequisites
cd ..
mkdir gcc-build-4.9.0
cd gcc-build-4.9.0
../gcc-4.9.0/configure --enable-checking=release --enable-languages=c,c++ --disable-multilib
when I run the last command, it show the error message and stop
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether ln works... yes
checking whether ln -s works... yes
checking for a sed that does not truncate output... /usr/bin/sed
checking for gawk... gawk
checking for libatomic support... yes
checking for libcilkrts support... yes
checking for libitm support... yes
checking for libsanitizer support... yes
checking for libvtv support... yes
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking whether g++ accepts -static-libstdc++ -static-libgcc... yes
checking for gnatbind... no
checking for gnatmake... no
checking whether compiler driver understands Ada... no
checking how to compare bootstrapped objects... cmp --ignore-initial=16 $$f1 $$f2
checking for objdir... .libs
configure: WARNING: using in-tree ISL, disabling version check
configure: WARNING: using in-tree CLooG, disabling version check
*** This configuration is not supported in the following subdirectories:
gnattools target-libada target-libgfortran target-libgo target-libffi target-libbacktrace target-zlib target-libjava target-libobjc target-boehm-gc
(Any other directories should still work fine.)
checking for default BUILD_CONFIG... bootstrap-debug
checking for --enable-vtable-verify... no
checking for bison... bison -y
checking for bison... bison
checking for gm4... no
checking for gnum4... no
checking for m4... m4
checking for flex... flex
checking for flex... flex
checking for makeinfo... makeinfo
checking for expect... no
checking for runtest... no
checking for ar... ar
checking for as... as
checking for dlltool... no
checking for ld... ld
checking for lipo... no
checking for nm... nm
checking for ranlib... ranlib
checking for strip... strip
checking for windres... no
checking for windmc... no
checking for objcopy... objcopy
checking for objdump... objdump
checking for readelf... readelf
checking for cc... cc
checking for c++... c++
checking for gcc... gcc
checking for gcj... no
checking for gfortran... gfortran
checking for gccgo... no
checking for ar... no
checking for ar... ar
checking for as... no
checking for as... as
checking for dlltool... no
checking for dlltool... no
checking for ld... no
checking for ld... ld
checking for lipo... no
checking for lipo... no
checking for nm... no
checking for nm... nm
checking for objdump... no
checking for objdump... objdump
checking for ranlib... no
checking for ranlib... ranlib
checking for readelf... no
checking for readelf... readelf
checking for strip... no
checking for strip... strip
checking for windres... no
checking for windres... no
checking for windmc... no
checking for windmc... no
checking where to find the target ar... host tool
checking where to find the target as... host tool
checking where to find the target cc... just compiled
checking where to find the target c++... just compiled
checking where to find the target c++ for libstdc++... just compiled
checking where to find the target dlltool... host tool
checking where to find the target gcc... just compiled
checking where to find the target gcj... host tool
checking where to find the target gfortran... host tool
checking where to find the target gccgo... host tool
checking where to find the target ld... host tool
checking where to find the target lipo... host tool
checking where to find the target nm... host tool
checking where to find the target objdump... host tool
checking where to find the target ranlib... host tool
checking where to find the target readelf... host tool
checking where to find the target strip... host tool
checking where to find the target windres... host tool
checking where to find the target windmc... host tool
checking whether to enable maintainer-specific portions of Makefiles... no
configure: creating ./config.status
config.status: creating Makefile
the error is "checking whether to enable maintainer-specific portions of Makefiles... no"
any idea?
As a comment already mentioned, there is no error. The next step is to actually start building the compiler, and then install it. E.g. something like
# How many cpu's to use
NCPUS=4
make -j $NCPUS && make install
Note that as you haven't specified a prefix for your configure command, the default will be /usr/local, which might not be what you want. So I'd recommend rerunning configure, and adding something like --prefix=/home/sleepworm/gcc-install-4.9.0
Also, why are you building 4.9.0 when 4.9.2 with some bugfixes has already been released?
FWIW, the "checking whether to enable maintainer-specific portions of Makefiles... no" thing can be changed by passing --enable-maintainer-mode to configure. It does enable some extra things, such as regeneration of some files etc., which are of interest only if you wish to develop gcc, rather than develop with gcc.

Getting Configure Error while compiling Corkscrew using Cygwin

I am trying to compile corkscrew on a Windows machine using Cygwin. Now every time I try configuring it, I get an error which states that configure: error: cannot guess build type; you must specify one
Here is the complete error log for those who would like to see it :-
Blueelvis_RoXXX#PranavVJituri ~/corkscrew-2.0
$ ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking whether make sets $(MAKE)... yes
checking for working aclocal-1.4... found
checking for working autoconf... found
checking for working automake-1.4... found
checking for working autoheader... found
checking for working makeinfo... found
checking for gcc... 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... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for gcc option to accept ANSI C... none needed
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... no
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for function prototypes... yes
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking for gawk... gawk
checking whether ln -s works... yes
checking build system type... configure: error: cannot guess build type; you must specify one
I also tried using the TARGET, BUILD & HOST parameters but it was of no use as I am getting the same error.
Help would be appreciated on this matter :)
check the latest version of automake
$ which automake
$ automake --version
search for /usr/share/automake*/config.guess
find the appropriate automake folder in /usr/share/automake.1.11.1/config.guess
replace config.guess from your build tree with /usr/share/automake.1.11.1/config.guess

configure: error: Missing required libcurl

I'm Trying to Compile a project that's need curllib on windows xp 32-bit
i've downloaded "curl-7.35.0.tar.gz" and compiled it, copied "libcurl.m4" and "curl-config"
when i run this command in MSYS Shell:
LIBCURL="-lcurldll" ./configure CFLAGS="-O3"
It Gives me this Error:
configure: error: Missing required libcurl >= 7.15.2
i know that i hadn't installed the curl lib properly in my system that's why this error shows up
can someone tell me the right way to install libcurl in windows ? ( Note: I'm a newbie with C/C++ and compiling and all related things )
Thanks in advance !
configure script results:
checking build system type... i686-pc-mingw32
checking host system type... i686-w64-mingw32
checking target system type... i686-w64-mingw32
checking for a BSD-compatible install... /bin/install -c
checking whether build environment is sane... yes
checking for i686-w64-mingw32-strip... no
checking for strip... strip
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking for style of include used by make... GNU
checking for i686-w64-mingw32-gcc... no
checking for gcc... 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... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking dependency style of gcc... gcc3
checking for gcc option to accept ISO C99... -std=gnu99
checking how to run the C preprocessor... gcc -std=gnu99 -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking whether gcc -std=gnu99 needs -traditional... no
checking whether gcc -std=gnu99 and cc understand -c and -o together... yes
checking dependency style of gcc -std=gnu99... gcc3
checking for i686-w64-mingw32-ranlib... no
checking for ranlib... ranlib
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking sys/endian.h usability... no
checking sys/endian.h presence... no
checking for sys/endian.h... no
checking sys/param.h usability... yes
checking sys/param.h presence... yes
checking for sys/param.h... yes
checking syslog.h usability... no
checking syslog.h presence... no
checking for syslog.h... no
checking for sys/sysctl.h... no
checking whether be32dec is declared... no
checking whether le32dec is declared... no
checking whether be32enc is declared... no
checking whether le32enc is declared... no
checking for size_t... yes
checking for working alloca.h... no
checking for alloca... yes
checking for getopt_long... yes
checking whether we can compile AVX code... yes
checking whether we can compile XOP code... yes
checking whether we can compile AVX2 code... yes
checking for json_loads in -ljansson... no
checking for pthread_create in -lpthread... no
checking for pthread_create in -lpthreadGC2... no
checking for pthread_create in -lpthreadGC1... no
checking for pthread_create in -lpthreadGC... no
checking for gawk... (cached) gawk
checking for curl-config... /mingw/bin/curl-config
checking for the version of libcurl... 7.35.0
checking for libcurl >= version 7.15.2... yes
checking whether libcurl is usable... no
configure: error: Missing required libcurl >= 7.15.2
You need to have the libcurl you downloaded/compiled in the linkers path. This means you need to take the libcurl.dll file (not the m4) and put it in the directory that the linker will search in. Usually the projects directory or one of the system libraries that are defined by default in Windows.