User forums > General (but related to Code::Blocks)

Import a mvs2012 solution

<< < (2/5) > >>

patrocle:
@BlueHazzard i add like this: http://prntscr.com/f54bv0

build log https://pastebin.com/XWYAvL17


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

BlueHazzard:
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


--- Quote from: patrocle on May 07, 2017, 04:09:04 pm ---@stahta01 idk how to rename http://prntscr.com/f54djm

--- End quote ---
you have to enter

--- Code: ---gmp
--- End code ---
and not

--- Code: ---gmp.lib
--- End code ---
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?

patrocle:
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?
--- End quote ---
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

BlueHazzard:
Ok, lets try this:

Under Project->Build options->Linker settings->Link libraries:

--- Code: ---kernel32
version
gmp
GeoIP
WS2_32
libmysql
zdll

--- End code ---
under  Project->Build options->Search directories->Linker:

--- Code: ---C:\5entbot\libGeoIP\
C:\5entbot\mysql\lib\opt\
C:\5entbot\zlib\lib

--- End code ---
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)

BlueHazzard:
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...

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version