Author Topic: Mysql++ mingw32 cross-compiling under linux  (Read 3545 times)

Offline Leonti

  • Single posting newcomer
  • *
  • Posts: 6
Mysql++ mingw32 cross-compiling under linux
« on: November 05, 2009, 05:28:42 pm »
Hello!
I'm trying to use Mingw32 to compile windows application using wxWidgets and mysql++.
I've successfully compiled wxWidgets with mingw and I want to compile mysql++.
But I get an error that socket library is missing.
Code: [Select]
leonti@linux-ep9z:~/proba/mysql++-3.0.9> ./configure prefix=/usr/i686-pc-mingw32 --host=i686-pc-mingw32 --build=`./config.guess` --disable-shared
checking build system type... x86_64-unknown-linux-gnu
checking host system type... i686-pc-mingw32
checking target system type... i686-pc-mingw32
checking for i686-pc-mingw32-gcc... i686-pc-mingw32-gcc
checking for C compiler default output file name... a.exe
checking whether the C compiler works... yes
checking whether we are cross compiling... yes
checking for suffix of executables... .exe
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether i686-pc-mingw32-gcc accepts -g... yes
checking for i686-pc-mingw32-gcc option to accept ANSI C... none needed
checking whether we are using the Intel C compiler... no
checking for i686-pc-mingw32-g++... i686-pc-mingw32-g++
checking whether we are using the GNU C++ compiler... yes
checking whether i686-pc-mingw32-g++ accepts -g... yes
checking whether we are using the Intel C++ compiler... no
checking whether we are using the Sun C++ compiler... no
checking for i686-pc-mingw32-ranlib... i686-pc-mingw32-ranlib
checking for a BSD-compatible install... /usr/bin/install -c
checking whether ln -s works... yes
checking whether make sets $(MAKE)... yes
checking for i686-pc-mingw32-ar... i686-pc-mingw32-ar
checking for i686-pc-mingw32-strip... i686-pc-mingw32-strip
checking for i686-pc-mingw32-nm... i686-pc-mingw32-nm
checking for command to install directories... /usr/bin/install -c -d
checking if make is GNU make... yes
checking for dependency tracking method... gcc
checking for i686-pc-mingw32-windres... i686-pc-mingw32-windres
checking for i686-pc-mingw32-gcc... (cached) i686-pc-mingw32-gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether i686-pc-mingw32-gcc accepts -g... (cached) yes
checking for i686-pc-mingw32-gcc option to accept ANSI C... (cached) none needed
checking how to run the C preprocessor... i686-pc-mingw32-gcc -E
checking for egrep... grep -E
checking for ANSI C header files... yes
checking whether -lm is needed to use C math functions... no
checking whether -lsocket is needed... configure: error: failed to link using -lsocket!
I tried to install more mingw32 packages (on Opensuse 11.1) I thought were relevant but it didn't help.
Did anyone have any success compiling mysql++ on linux with mingw32?

Leonti

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6535
    • My Best Post
Re: Mysql++ mingw32 cross-compiling under linux
« Reply #1 on: November 05, 2009, 06:18:01 pm »
Suggest you try on an mySQL wedsite
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline Leonti

  • Single posting newcomer
  • *
  • Posts: 6
Re: Mysql++ mingw32 cross-compiling under linux
« Reply #2 on: November 06, 2009, 05:59:29 pm »
I solved my problem by installing mingw32 under wine and compiling it that way. It worked.

I got some help from mysql++ mailing list so thank you for telling me about that list.

Leonti