Author Topic: Import a mvs2012 solution  (Read 9669 times)

Offline patrocle

  • Multiple posting newcomer
  • *
  • Posts: 17
Import a mvs2012 solution
« on: May 06, 2017, 11:57:49 pm »
Hello guys,

I try to import and build a working soltion from MSV 2012 (already installated into current pc with win10). After I set up lot of things, now I'm stuck here, with some libs:

http://prntscr.com/f4xjva




in pic we can see the lib is not missing, the gmp.lib
please some advices
 

in msv2012 all fine http://prntscr.com/f4xryb
« Last Edit: May 07, 2017, 12:09:16 am by patrocle »

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: Import a mvs2012 solution
« Reply #1 on: May 07, 2017, 12:34:01 am »
your post does not contain all information needed...
read first this: http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_(general)#Q:_How_do_I_report_a_compilation_problem_on_the_forums.3F

what compiler are you using? Is it the same compiler as the library?

Offline patrocle

  • Multiple posting newcomer
  • *
  • Posts: 17
Re: Import a mvs2012 solution
« Reply #2 on: May 07, 2017, 03:21:31 am »
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.

Code
-------------- 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))
 
« Last Edit: May 07, 2017, 03:51:52 am by patrocle »

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: Import a mvs2012 solution
« Reply #3 on: May 07, 2017, 07:29:12 am »
Code
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
Code
kernel32.lib
version.lib
gmp.lib

to

Code
kernel32
version
gmp

Tim S.


C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: Import a mvs2012 solution
« Reply #4 on: May 07, 2017, 01:23:41 pm »
to get more information you also can add the "-v" option to compiler and linker and post the build log here

Offline patrocle

  • Multiple posting newcomer
  • *
  • Posts: 17
Re: Import a mvs2012 solution
« Reply #5 on: May 07, 2017, 04:09:04 pm »
@BlueHazzard i add like this: http://prntscr.com/f54bv0

build log https://pastebin.com/XWYAvL17


@stahta01 idk how to rename http://prntscr.com/f54djm


Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: Import a mvs2012 solution
« Reply #6 on: May 07, 2017, 05:07:59 pm »
You don't have to create new flags for every compiler flag. Simply add them in Project->Build options->Compiler settings->Other compiler options
for the linker the same:
Project->Build options->Linker settings->Other linker options

@stahta01 idk how to rename http://prntscr.com/f54djm
you have to enter
Code
gmp
and not
Code
gmp.lib
in Project->Build options->Linker settings->Link libraries
This is a regression by mingw (not codeblocks)

But i ask again, are the libraries build with the same compiler as you build your porgram?

Offline patrocle

  • Multiple posting newcomer
  • *
  • Posts: 17
Re: Import a mvs2012 solution
« Reply #7 on: May 08, 2017, 12:47:47 pm »
I tryed to rename and didnt work to compile.

Quote
But i ask again, are the libraries build with the same compiler as you build your porgram?
I check the lib created date and are not compiled with MSV, for MVS just work as they are.
For example the geoip lib are from 2013 http://prntscr.com/f5f4x5

LE
I saw here a way to compile the lib under linux, but idk how to do this through C::B https://www.ghostpp.com/forum/index.php?topic=346.0
« Last Edit: May 08, 2017, 01:01:41 pm by patrocle »

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: Import a mvs2012 solution
« Reply #8 on: May 08, 2017, 01:41:36 pm »
Ok, lets try this:

Under Project->Build options->Linker settings->Link libraries:
Code
kernel32
version
gmp
GeoIP
WS2_32
libmysql
zdll
under  Project->Build options->Search directories->Linker:
Code
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)

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: Import a mvs2012 solution
« Reply #9 on: May 08, 2017, 01:54:29 pm »
Now just to clarify things:
Codeblocks is not a compiler nor a linker. Codeblocks is a IDE that can be used with a lot compilers (see: http://wiki.codeblocks.org/index.php/FAQ-General#Q:_What_is_Code::Blocks.3F and http://wiki.codeblocks.org/index.php/FAQ-General#Q:_What_Code::Blocks_is_not.3F ).
You  use mingw with gcc as compiler, but you could also use the microsoft compiler with codeblocks (it is called "cl", vs is short for visual studio and this is the ide of microsoft, not necessy the compiler)

The problem is, you can NOT mix libraries compiled with the microsoft compiler and mingw/gcc compiler in c++. With c it may work (it works also with c++, if you use the c abi)
If you try to mix the libraries, there can happen two things:
1) gcc can not find the library (the error message you get is similar, so we don't know if the compiler can't find the library in general, or if he can't find a compatible library)
2) you get strange linker errors about reference not found...

Offline patrocle

  • Multiple posting newcomer
  • *
  • Posts: 17
Re: Import a mvs2012 solution
« Reply #10 on: May 08, 2017, 04:00:56 pm »
:( 1 error. like you said...
Quote
c:/mingw/bin/../lib/gcc/x86_64-w64-mingw32/6.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:\5entbot\bncsutil\vc8_build\gmp.lib when searching for -lgmp
c:/mingw/bin/../lib/gcc/x86_64-w64-mingw32/6.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lgmp
« Last Edit: May 08, 2017, 04:05:02 pm by patrocle »

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: Import a mvs2012 solution
« Reply #11 on: May 08, 2017, 06:37:47 pm »
:( 1 error. like you said...
Quote
c:/mingw/bin/../lib/gcc/x86_64-w64-mingw32/6.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:\5entbot\bncsutil\vc8_build\gmp.lib when searching for -lgmp
c:/mingw/bin/../lib/gcc/x86_64-w64-mingw32/6.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lgmp

You might try to find a MinGW GCC that has the gmp library as part of it.
Or self build the gmp library.

But, both of those solutions are NOT topic for this forum.

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline patrocle

  • Multiple posting newcomer
  • *
  • Posts: 17
Re: Import a mvs2012 solution
« Reply #12 on: May 08, 2017, 10:48:51 pm »
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
Code
bncsutil/src/bncsutil/
make
make install

or is another way ? :(

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: Import a mvs2012 solution
« Reply #13 on: May 09, 2017, 12:10:53 am »
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
Code
bncsutil/src/bncsutil/
make
make install

or is another way ? :(

If you are smart and can follow directions you might try MSys2. http://www.msys2.org/

But, you seem to NOT be able to understand that your question is NOT an CB question.
Once more link to the rules http://forums.codeblocks.org/index.php/topic,9996.0.html

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline patrocle

  • Multiple posting newcomer
  • *
  • Posts: 17
Re: Import a mvs2012 solution
« Reply #14 on: May 09, 2017, 10:49:35 am »
Thank you guys for all help!

Allready I tryed MSys2 from here https://nuwen.net/mingw.html but i cant find ws2_32.lib or libmysql.lib


Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: Import a mvs2012 solution
« Reply #15 on: May 09, 2017, 11:26:39 am »
ws2_32 is a windows library... it "comes" with mingw, so you don't have to do anything else as adding it to the linker libraries
for the mysql thing you have two options: google for "mysql mingw windows" or
http://forums.codeblocks.org/index.php/topic,21701.msg147853.html#msg147853

Note: this is my last post in this thread because it has nothing to do with codeblocks and so violates the forum rues. If you have more question about using microsoft dll with mingw ask on stackoverflow or other programming forums. If you have other questions about codeblocks feel free to come back and ask. We will happily answer them...

Offline patrocle

  • Multiple posting newcomer
  • *
  • Posts: 17
Re: Import a mvs2012 solution
« Reply #16 on: May 18, 2017, 11:04:27 am »
back again,
this time is related to Makefile.

I tryed to load the project makefile
Code
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:
Code
-------------- 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?
« Last Edit: May 18, 2017, 11:28:11 am by patrocle »

Offline sodev

  • Regular
  • ***
  • Posts: 497
Re: Import a mvs2012 solution
« Reply #17 on: May 18, 2017, 05:14:28 pm »
This Makefile won't work on Windows, but why bother with it anyway? All it does is compiling 3 files, why dont you make a CodeBlocks project that compiles these files?!

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: Import a mvs2012 solution
« Reply #18 on: May 18, 2017, 07:25:25 pm »
Thank you guys for all help!

Allready I tryed MSys2 from here https://nuwen.net/mingw.html but i cant find ws2_32.lib or libmysql.lib

So, you do NOT understand what MSys2 is. And likely can NOT follow directions.

I will try to remember that about you so I do NOT waste my time trying to help you in the future.

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline patrocle

  • Multiple posting newcomer
  • *
  • Posts: 17
Re: Import a mvs2012 solution
« Reply #19 on: May 19, 2017, 12:37:18 am »
@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,
Code
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
Code
LFLAGS = -lmysqlclient -lboost_system 

If I add to compiler "-lmysqlclient" i get this error:
Code
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/


Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: Import a mvs2012 solution
« Reply #20 on: May 19, 2017, 01:11:03 am »
If the MSys2 is the key to made it I must read more,mby i need this version http://www.msys2.org/

MSys2 is a possible solution; but, it is likely only one of many solutions.

The problem is you need to know what a Compiler is and information about the libraries you want to use.
If it is just a C Library then you might be able to find libraries that work with multiple Compilers.
If it is a C++ Library you need to find one built for the compiler you are trying to use!

But, as you have been told this is NOT a CB issue.

NOTE: That URL is the only place to get MSYS2! MinGW GCC is NOT MSys2!
MSys2 has a MinGW64 GCC Compiler that can be installed as an option; but, it is NOT for newbies who can NOT follow directions.

Please read and try to follow the rules http://forums.codeblocks.org/index.php/topic,9996.0.html

Edit: Looks like mysqlclient is a C Library per https://dev.mysql.com/downloads/connector/c/
So, you just need to be smart enough to install the library and then use it.

You really need to find a site that will support you learning how Compilers work.

Tim S.
« Last Edit: May 19, 2017, 01:39:04 am by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org