Hy im having trouble linking boost python .lib library file in codeblocks. I get undefinited references error, i have the same error with other .lib files. All libraries were build with mingw.
I was working on other projects and i had the same problems with all .lib files not just from boost.
Is this problem of a mingw(not being able to link .lib) or with .lib libraries?

Im trying to link libboost_python-mgw34-mt-1_39.lib but no luck and i get these error messages...
obj\Debug\main.o||In function `main': |
C:\Documents and Settings\PJani\Desktop\SandBox\test_boost_py\main.cpp|14|undefined reference to `_imp___ZN5boost6python6importENS0_3strE'|
C:\Documents and Settings\PJani\Desktop\SandBox\test_boost_py\main.cpp|20|undefined reference to `_imp___ZN5boost6python4execENS0_3strENS0_3api6objectES3_'|
obj\Debug\main.o||In function `ZN5boost6python3api9slice_nilD1Ev': |
)]+0x14)||undefined reference to `_imp___ZN5boost6python6detail8str_baseC2EPKc'|
)]+0x1c)||undefined reference to `_imp___ZN5boost6python3api7getattrERKNS1_6objectEPKc'|
||=== Build finished: 4 errors, 0 warnings ===|
This is the test code.
Code:
#include <boost/python.hpp>

#include <iostream>

using namespace std;
namespace python = boost::python;

int main(){

 * *Py_Initialize();

 * *python::object l;

 * *python::object main_module = python::import("__main__");
 * *python::object main_namespace = main_module.attr("__dict__");

 * *python::object ignored = python::exec("hello = file('hello.txt', 'w')\n"
 * * * * * * * * * * * * * * * * * * * * *"hello.write('Hello world!')\n"
 * * * * * * * * * * * * * * * * * * * * *"hello.close()",
 * * * * * * * * * * * * * * * * * * * * *main_namespace);

 * *return 0;
}
I tried adding library by its absolute path and with search path and by liblibboost_python-mgw34-mt-d-1_39 i added in front lib the libraries are found in both way but not linked correctly.

I have C::B 8.02 + mingw 3.4.5 and Boost 1.39 compiled with mingw and python version 2.6.1