i'm sorry,
compiler settings: http://prntscr.com/f4zfxt
http://prntscr.com/f4zh9c
and this distro: https://nuwen.net/mingw.html the last (14.1) mean GCC 6.3.0 and Boost 1.63.0.
-------------- Clean: Release MySQL Win32 in BNCSutil (compiler: GNU GCC Compiler)---------------
Cleaned "BNCSutil - Release MySQL Win32"
-------------- Build: Release MySQL Win32 in BNCSutil (compiler: GNU GCC Compiler)---------------
g++.exe -DWIN32 -DNDEBUG -D_WINDOWS -D_USRDLL -DBNCSUTIL_EXPORTS -DMOS_WINDOWS -O3 -std=c++98 -Iinclude -Iatlmfc\include -I -IC:\5entbot\bncsutil\vc8_build -I..\src -IC:\MinGW\lib -IC:\MinGW\include -IC:\5entbot\libGeoIP -IC:\5entbot\mysql\lib\opt -IC:\5entbot\bncsutil\src\bncsutil -IC:\5entbot\bncsutil\vc8_build -I"C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Lib" -c C:\5entbot\bncsutil\src\bncsutil\bsha1.cpp -o .objs\src\bncsutil\bsha1.o
g++.exe -DWIN32 -DNDEBUG -D_WINDOWS -D_USRDLL -DBNCSUTIL_EXPORTS -DMOS_WINDOWS -O3 -std=c++98 -Iinclude -Iatlmfc\include -I -IC:\5entbot\bncsutil\vc8_build -I..\src -IC:\MinGW\lib -IC:\MinGW\include -IC:\5entbot\libGeoIP -IC:\5entbot\mysql\lib\opt -IC:\5entbot\bncsutil\src\bncsutil -IC:\5entbot\bncsutil\vc8_build -I"C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Lib" -c C:\5entbot\bncsutil\src\bncsutil\cdkeydecoder.cpp -o .objs\src\bncsutil\cdkeydecoder.o
g++.exe -DWIN32 -DNDEBUG -D_WINDOWS -D_USRDLL -DBNCSUTIL_EXPORTS -DMOS_WINDOWS -O3 -std=c++98 -Iinclude -Iatlmfc\include -I -IC:\5entbot\bncsutil\vc8_build -I..\src -IC:\MinGW\lib -IC:\MinGW\include -IC:\5entbot\libGeoIP -IC:\5entbot\mysql\lib\opt -IC:\5entbot\bncsutil\src\bncsutil -IC:\5entbot\bncsutil\vc8_build -I"C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Lib" -c C:\5entbot\bncsutil\src\bncsutil\checkrevision.cpp -o .objs\src\bncsutil\checkrevision.o
g++.exe -DWIN32 -DNDEBUG -D_WINDOWS -D_USRDLL -DBNCSUTIL_EXPORTS -DMOS_WINDOWS -O3 -std=c++98 -Iinclude -Iatlmfc\include -I -IC:\5entbot\bncsutil\vc8_build -I..\src -IC:\MinGW\lib -IC:\MinGW\include -IC:\5entbot\libGeoIP -IC:\5entbot\mysql\lib\opt -IC:\5entbot\bncsutil\src\bncsutil -IC:\5entbot\bncsutil\vc8_build -I"C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Lib" -c C:\5entbot\bncsutil\src\bncsutil\decodekey.cpp -o .objs\src\bncsutil\decodekey.o
g++.exe -DWIN32 -DNDEBUG -D_WINDOWS -D_USRDLL -DBNCSUTIL_EXPORTS -DMOS_WINDOWS -O3 -std=c++98 -Iinclude -Iatlmfc\include -I -IC:\5entbot\bncsutil\vc8_build -I..\src -IC:\MinGW\lib -IC:\MinGW\include -IC:\5entbot\libGeoIP -IC:\5entbot\mysql\lib\opt -IC:\5entbot\bncsutil\src\bncsutil -IC:\5entbot\bncsutil\vc8_build -I"C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Lib" -c C:\5entbot\bncsutil\src\bncsutil\file.cpp -o .objs\src\bncsutil\file.o
g++.exe -DWIN32 -DNDEBUG -D_WINDOWS -D_USRDLL -DBNCSUTIL_EXPORTS -DMOS_WINDOWS -O3 -std=c++98 -Iinclude -Iatlmfc\include -I -IC:\5entbot\bncsutil\vc8_build -I..\src -IC:\MinGW\lib -IC:\MinGW\include -IC:\5entbot\libGeoIP -IC:\5entbot\mysql\lib\opt -IC:\5entbot\bncsutil\src\bncsutil -IC:\5entbot\bncsutil\vc8_build -I"C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Lib" -c C:\5entbot\bncsutil\src\bncsutil\libinfo.cpp -o .objs\src\bncsutil\libinfo.o
gcc.exe -DWIN32 -DNDEBUG -D_WINDOWS -D_USRDLL -DBNCSUTIL_EXPORTS -DMOS_WINDOWS -O3 -Iinclude -Iatlmfc\include -I -IC:\5entbot\bncsutil\vc8_build -I..\src -IC:\MinGW\lib -IC:\MinGW\include -IC:\5entbot\libGeoIP -IC:\5entbot\mysql\lib\opt -IC:\5entbot\bncsutil\src\bncsutil -IC:\5entbot\bncsutil\vc8_build -I"C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Lib" -c C:\5entbot\bncsutil\src\bncsutil\nls.c -o .objs\src\bncsutil\nls.o
g++.exe -DWIN32 -DNDEBUG -D_WINDOWS -D_USRDLL -DBNCSUTIL_EXPORTS -DMOS_WINDOWS -O3 -std=c++98 -Iinclude -Iatlmfc\include -I -IC:\5entbot\bncsutil\vc8_build -I..\src -IC:\MinGW\lib -IC:\MinGW\include -IC:\5entbot\libGeoIP -IC:\5entbot\mysql\lib\opt -IC:\5entbot\bncsutil\src\bncsutil -IC:\5entbot\bncsutil\vc8_build -I"C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Lib" -c C:\5entbot\bncsutil\src\bncsutil\oldauth.cpp -o .objs\src\bncsutil\oldauth.o
gcc.exe -DWIN32 -DNDEBUG -D_WINDOWS -D_USRDLL -DBNCSUTIL_EXPORTS -DMOS_WINDOWS -O3 -Iinclude -Iatlmfc\include -I -IC:\5entbot\bncsutil\vc8_build -I..\src -IC:\MinGW\lib -IC:\MinGW\include -IC:\5entbot\libGeoIP -IC:\5entbot\mysql\lib\opt -IC:\5entbot\bncsutil\src\bncsutil -IC:\5entbot\bncsutil\vc8_build -I"C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Lib" -c C:\5entbot\bncsutil\src\bncsutil\pe.c -o .objs\src\bncsutil\pe.o
gcc.exe -DWIN32 -DNDEBUG -D_WINDOWS -D_USRDLL -DBNCSUTIL_EXPORTS -DMOS_WINDOWS -O3 -Iinclude -Iatlmfc\include -I -IC:\5entbot\bncsutil\vc8_build -I..\src -IC:\MinGW\lib -IC:\MinGW\include -IC:\5entbot\libGeoIP -IC:\5entbot\mysql\lib\opt -IC:\5entbot\bncsutil\src\bncsutil -IC:\5entbot\bncsutil\vc8_build -I"C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Lib" -c C:\5entbot\bncsutil\src\bncsutil\sha1.c -o .objs\src\bncsutil\sha1.o
gcc.exe -DWIN32 -DNDEBUG -D_WINDOWS -D_USRDLL -DBNCSUTIL_EXPORTS -DMOS_WINDOWS -O3 -Iinclude -Iatlmfc\include -I -IC:\5entbot\bncsutil\vc8_build -I..\src -IC:\MinGW\lib -IC:\MinGW\include -IC:\5entbot\libGeoIP -IC:\5entbot\mysql\lib\opt -IC:\5entbot\bncsutil\src\bncsutil -IC:\5entbot\bncsutil\vc8_build -I"C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Lib" -c C:\5entbot\bncsutil\src\bncsutil\stack.c -o .objs\src\bncsutil\stack.o
g++.exe -LC:\5entbot\bncsutil\vc8_build -L..\src -Llib -Latlmfc\lib -L -L.. -LC:\5entbot\mysql\lib\opt -LC:\5entbot\bncsutil\vc8_build -LC:\5entbot\bncsutil\src\bncsutil -o BNCSutil.exe .objs\src\bncsutil\bsha1.o .objs\src\bncsutil\cdkeydecoder.o .objs\src\bncsutil\checkrevision.o .objs\src\bncsutil\decodekey.o .objs\src\bncsutil\file.o .objs\src\bncsutil\libinfo.o .objs\src\bncsutil\nls.o .objs\src\bncsutil\oldauth.o .objs\src\bncsutil\pe.o .objs\src\bncsutil\sha1.o .objs\src\bncsutil\stack.o -lkernel32.lib -lversion.lib -lgmp.lib C:\5entbot\libGeoIP\GeoIP.lib C:\5entbot\libGeoIP\WS2_32.Lib C:\5entbot\mysql\lib\opt\libmysql.lib C:\5entbot\zlib\lib\zdll.lib C:\5entbot\bncsutil\vc8_build\gmp.lib "C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Lib\Kernel32.Lib" "C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Lib\Version.Lib" "C:\Program Files (x86)\Windows Kits\8.0\Lib\win8\um\x64\kernel32.Lib" -mwindows
c:/mingw/bin/../lib/gcc/x86_64-w64-mingw32/6.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lkernel32.lib
c:/mingw/bin/../lib/gcc/x86_64-w64-mingw32/6.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lversion.lib
c:/mingw/bin/../lib/gcc/x86_64-w64-mingw32/6.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lgmp.lib
collect2.exe: error: ld returned 1 exit status
Process terminated with status 1 (0 minute(s), 2 second(s))
4 error(s), 0 warning(s) (0 minute(s), 2 second(s))
c:/mingw/bin/../lib/gcc/x86_64-w64-mingw32/6.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lkernel32.lib
c:/mingw/bin/../lib/gcc/x86_64-w64-mingw32/6.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lversion.lib
c:/mingw/bin/../lib/gcc/x86_64-w64-mingw32/6.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lgmp.lib
Did you try the normal fix of changing the library names?
From
kernel32.lib
version.lib
gmp.lib
to
Tim S.
Ok, lets try this:
Under Project->Build options->Linker settings->Link libraries:
kernel32
version
gmp
GeoIP
WS2_32
libmysql
zdll
under Project->Build options->Search directories->Linker:
C:\5entbot\libGeoIP\
C:\5entbot\mysql\lib\opt\
C:\5entbot\zlib\lib
then make a clean build:
Build->rebuild
if you still get errors please post the build log, you get. (make sure you have the -v option enabled, so we get information if gcc over jumps the libraries, or if he does not find them)
i understood, but i really idk what to do, i try to get some advices from progammers like you or BlueHazzard
there are only one project, for all 3 (imported from msv solution) i need 4 libs. I need a way to build them like in linux:cd bncsutil/src/bncsutil/
make
make install
or is another way ? :(
back again,
this time is related to Makefile.
I tryed to load the project makefile
SHELL = /bin/sh
SYSTEM = $(shell uname)
C++ = g++
DFLAGS =
OFLAGS = -O3
LFLAGS = -lmysqlclient -lboost_system
CFLAGS =
CFLAGS += $(OFLAGS) $(DFLAGS) -I. -I../
GHOSTOBJS = config.o
OBJS = elo.o update_dota_elo.o
PROGS = ./update_dota_elo
all: $(GHOSTOBJS) $(OBJS) $(PROGS)
./update_dota_elo: $(GHOSTOBJS) $(OBJS) $(COBJS)
$(C++) -o ./update_dota_elo $(GHOSTOBJS) $(OBJS) $(LFLAGS)
clean:
rm -f $(GHOSTOBJS) $(OBJS) $(PROGS)
$(GHOSTOBJS): %.o: ../%.cpp
$(C++) -o $@ $(CFLAGS) -c $<
$(OBJS): %.o: %.cpp
$(C++) -o $@ $(CFLAGS) -c $<
./update_dota_elo: $(GHOSTOBJS) $(OBJS)
all: $(PROGS)
config.o: ../ghost.h ../config.h
elo.o: elo.h
update_dota_elo.o: ../config.h elo.h
and i have this error:
-------------- Build: Release Win32 in update_dota_elo (compiler: GNU GCC Compiler)---------------
Checking if target is up-to-date: make.exe -q -f Makefile Release Win32
Running command: make.exe -f Makefile Release Win32
make.exe: *** No rule to make target 'Win32'. Stop.
make.exe: Nothing to be done for 'Release'.
Process terminated with status 2 (0 minute(s), 0 second(s))
0 error(s), 0 warning(s) (0 minute(s), 0 second(s))
My quest is: how to add 'Debug' in actual Makefile to be readable for C::B?
@stahta01 really sorry but I'm not advanced like you expect :'(, and for me is not so easy to find directions. I did not want to upset you.
@sodev Thank you for the point, didnt know how CB works with gcc in windows.
I build the project succesfully,
g++.exe -Llib -Latlmfc\lib -L -L..\zlib\lib -L..\mysql\lib\opt -LC:\5entbot\mysql\lib\opt -LC:\5entbot\mysql\lib\opt -LC:\5entbot\bncsutil\vc8_build -LC:\5entbot\bncsutil\src\bncsutil -LC:\5entbot -o update_dota_elo.exe .objs\ghost\config.o .objs\update_dota_elo\elo.o .objs\update_dota_elo\update_dota_elo.o -lboost_system -lmysql -mwindows
Output file is update_dota_elo.exe with size 2.91 MB
Process terminated with status 0 (0 minute(s), 6 second(s))
0 error(s), 0 warning(s) (0 minute(s), 6 second(s))
but when i test it, the mysql code is not integrated in the build.
This is why I asked for the Makefile, because I saw this command inside of the Makefile LFLAGS = -lmysqlclient -lboost_system
If I add to compiler "-lmysqlclient" i get this error:
g++.exe -Llib -Latlmfc\lib -L -L..\zlib\lib -L..\mysql\lib\opt -LC:\5entbot\mysql\lib\opt -LC:\5entbot\mysql\lib\opt -LC:\5entbot\bncsutil\vc8_build -LC:\5entbot\bncsutil\src\bncsutil -LC:\5entbot -o update_dota_elo.exe .objs\ghost\config.o .objs\update_dota_elo\elo.o .objs\update_dota_elo\update_dota_elo.o -lboost_system -lmysqlclient -lmysql -mwindows
c:/mingw/bin/../lib/gcc/x86_64-w64-mingw32/6.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lmysqlclient
collect2.exe: error: ld returned 1 exit status
Process terminated with status 1 (0 minute(s), 6 second(s))
2 error(s), 0 warning(s) (0 minute(s), 6 second(s))
If the MSys2 is the key to made it I must read more,mby i need this version http://www.msys2.org/