News:

The new Release 25.03 is out! You can download binaries for Windows and many major Linux distros here .

Main Menu

using a static librairie projetc in a console C++ project

Started by zerimbak, February 13, 2013, 05:35:24 PM

Previous topic - Next topic

zerimbak

Hi all,

I'am using Code::blocks version 12.11 with OS windows XP 32 bits
I created a C static librairie with a single function : void test()

I made a C program which use le librairie (libtest.a) ,  the programme works very well.

And after that, I made a C++ program (the same with the same librairie - I linked it correctly )
but this program is not working, the compilation made an error : undefined reference to test()

Thanks for your help

jarod42

unrelated to C::B

You may use extern "C" in your library header when linking with c++



zerimbak