User forums > Using Code::Blocks

Add a specific Library

<< < (2/3) > >>

Michael:

--- Quote from: gl0be on December 17, 2005, 08:48:54 pm ---I dont't really understand your question, I'speak a little bit english only...

I tried to rename the battle.lib to battle.a but the error is always the same

cannot find -lBattle.a

any other ideas ??

thank you

--- End quote ---

If C::B cannot find a library, a quick and dirty solution consists to put the absolute path of the library in:

Project->Build options->Directories->Linker

For absolute path, I mean:

if your library is in C:\programme\mydirectory\mylibrary, then add such path in the linker.

This has always worked for me (since C::B RC1) :).

You can also try to move the added path in the first position of list (if you have more than one path). This could be helpful for some libraries.

Vampyre_Dark asked you, if there is not a tool that convert a .lib to a .a library (Vampyre_Dark please feel free to correct me if I have misunderstood your question). I am not sure that you can simply rename your library from Battle.lib to Battle.a by changing its extension.

Michael

Vampyre_Dark:
xxx.lib files are for MSVC++

GCC (MinGW) uses a files, and the libraries are names libxxx.a. OpenGL32.lib is libopengl32.a in gcc-land.

There is a program in the bin folder called libimp or something like that to convert libs to a files, I don't know how / if it works.

thomas:

--- Quote from: Vampyre_Dark on December 17, 2005, 10:42:06 pm ---There is a program in the bin folder called libimp or something like that to convert libs to a files, I don't know how / if it works.
--- End quote ---
Almost :)  reimp

Michael:

--- Quote from: Vampyre_Dark on December 17, 2005, 10:42:06 pm ---There is a program in the bin folder called libimp or something like that to convert libs to a files, I don't know how / if it works.

--- End quote ---

Yes, you're right. The tool in question is reimp:


--- Quote ---reimp is a tool to convert Microsoft's new-style (short) import libraries to import libraries for the Win32 ports of GNU tools (MinGW, Cygwin)

--- End quote ---

Usage:


--- Quote ---reimp reads an MS import library and writes all imports to the corresponding .DEF file(s) that it feeds to dlltool that creates the import library. reimp also attempts to write to the current directory every static member that is found.

--- End quote ---

Michael

gl0be:
thank you for you response !!!

But I don't have any reimp in the bin directory of mingw !!
Do I have to download something more ?

I find that link

http://jrfonseca.planetaclix.pt/projects/gnu-win32/software/reimp/

and this one but I don't know what to do !

http://sourceforge.net/project/showfiles.php?group_id=2435&release_id=115457

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version