Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: courage on June 02, 2007, 04:28:03 am

Title: A bug report, because I can't login BerliOS...
Post by: courage on June 02, 2007, 04:28:03 am
Hello:

Because I can't login BerliOS, I post it here.  :)

When a program "A" links a library "B" in A's working directory,
I means that libB.a is in A's working directory,
then the Link libraries ListBox in Code::Blocks' Linker settings page:
1. I Add libB.a and C::B ask me if "Keep this as a relative path?", then I say yes and press OK.
2. There is "libB.a" added in the link libraries ListBox, but when I build, linking error "cannot find -lB" occured.
3. I have to modify "libB.a" manually to ".\libB.a" then it builds successfully.

Thanks for your concerning. :)
Title: Re: A bug report, because I can't login BerliOS...
Post by: stahta01 on June 02, 2007, 04:47:36 am
Please state your OS? Windows XP or ?
Please state your version of code::blocks? RC2? or SVN? If SVN, which SVN Number?
Please turn on compiling logging and post the build log.

Steps to turn on Compiler Logging in Nightly Build:
"Settings" -> "compiler debugger"
Change "Compiler Settings" to "Other Settings"
Set "Compiler Logging" to "Full Command Line"

Tim S
Title: Re: A bug report, because I can't login BerliOS...
Post by: stahta01 on June 02, 2007, 04:57:14 am
1. I Add libB.a and C::B ask me if "Keep this as a relative path?", then I say yes and press OK.
2. There is "libB.a" added in the link libraries ListBox, but when I build, linking error "cannot find -lB" occured.

What compiler are you using? Mingw GCC or Visual Studio 2005 or what?

On 1, are you just adding the folder that contains libB.a? That is what it normally wants.
  Note: Keep this as a relative path? Should normally be answered with yes.
On 2, did you try just adding B  Note leave off the leading lib and the trailing .a

Tim S
Title: Re: A bug report, because I can't login BerliOS...
Post by: courage on June 02, 2007, 07:55:26 am
On 1, are you just adding the folder that contains libB.a? That is what it normally wants.
  Note: Keep this as a relative path? Should normally be answered with yes.
Tim S

Hi Tim:

You catch me so fast.  :D

Afterward, I found that I forgot to put the relative path "..\A" or "."
in the linker listbox in search directories. How stupid I am! Sorry for bothering you.  :(