Skip to main content



      Home
Home » Language IDEs » C / C++ IDE (CDT) » mingw linker cannot find library
mingw linker cannot find library [message #209945] Mon, 18 February 2008 15:58 Go to next message
Eclipse UserFriend
Originally posted by: steveathome3.hotmail.com

Hi folks,
I'm an experienced user under an ARC context, but I'm setting up with
mingw for home use. I've posted on the beginner site as well.

using:
Eclipse Version: 3.3.1.1
CDT 4.0.2
GNU C++ version 3.4.5 (mingw special) (mingw32)

I built the stock Hello World with no problems and added a second
"utilities" static library project for practice. I did the following:
* checked "utilities" as a project reference for Hello World.
* added libutilities as as a lbrary to "Hello World" project library list.
* added "${workspace_loc:/utilities/Debug}" as the dir path for libs.
(libutilities.a lives there). (also tried the "file system" version of
this.
* Clean and build results in the following error:

g++ -LC:\projects\fargo\utilities\Debug -ohello_world.exe
src\hello_world.o src\c_template_class.o -llibutilities
C:\mingw\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\..\mingw32\bi n\ld.exe:
cannot find -llibutilities
collect2: ld returned 1 exit status

Seems pretty basic - hoping it's just some idiot setup thing I'm doing.
Any ideas much appreciated.

Regards,
Steve
Re: mingw linker cannot find library [message #209986 is a reply to message #209945] Tue, 19 February 2008 00:51 Go to previous messageGo to next message
Eclipse UserFriend
"steve waller" <steveathome3@hotmail.com> wrote in message
news:34a11803dc8dd816a3c1fc7184e1f562$1@www.eclipse.org...
> Hi folks,
> I'm an experienced user under an ARC context, but I'm setting up with
> mingw for home use. I've posted on the beginner site as well.

There's a beginner site? Where would I find that?

Tx,

Eric
Re: mingw linker cannot find library [message #210000 is a reply to message #209945] Tue, 19 February 2008 03:44 Go to previous messageGo to next message
Eclipse UserFriend
steve waller wrote:
> Hi folks,
> I'm an experienced user under an ARC context, but I'm setting up with
> mingw for home use. I've posted on the beginner site as well.
>
> using:
> Eclipse Version: 3.3.1.1
> CDT 4.0.2
> GNU C++ version 3.4.5 (mingw special) (mingw32)
>
> I built the stock Hello World with no problems and added a second
> "utilities" static library project for practice. I did the following:
> * checked "utilities" as a project reference for Hello World. * added
> libutilities as as a lbrary to "Hello World" project library list.
> * added "${workspace_loc:/utilities/Debug}" as the dir path for libs.
> (libutilities.a lives there). (also tried the "file system" version of
> this.
> * Clean and build results in the following error:
>
> g++ -LC:\projects\fargo\utilities\Debug -ohello_world.exe
> src\hello_world.o src\c_template_class.o -llibutilities
> C:\mingw\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\..\mingw32\bi n\ld.exe:
> cannot find -llibutilities
> collect2: ld returned 1 exit status
>
> Seems pretty basic - hoping it's just some idiot setup thing I'm doing.
> Any ideas much appreciated.
>
> Regards,
> Steve
>
>
>

To link a library libutilities.a, the command line option should be
-lutilities.

--
Anton Leherbauer
Wind River CDT Team, Austria
Re: mingw linker cannot find library [message #210032 is a reply to message #209986] Tue, 19 February 2008 23:39 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: steveathome3.hotmail.com

Hello Eric,
Yes, there's an Eclipse "newcomer" newsgroup.
http://www.eclipse.org/newsportal/thread.php?group=eclipse.n ewcomer
Cheers,
Steve
Re: mingw linker cannot find library [message #210038 is a reply to message #210000] Tue, 19 February 2008 23:42 Go to previous message
Eclipse UserFriend
Originally posted by: steveathome3.hotmail.com

Hello Anton,
Yes, that was it - silly me...

I changed from "libutilities" to "utilities" in the "Hello World" project
library list and all is well.

Vielen Dank!
Steve
Previous Topic:Project Template Engine + Restore defaults button.
Next Topic:Put together some plugins
Goto Forum:
  


Current Time: Wed May 14 23:15:06 EDT 2025

Powered by FUDForum. Page generated in 0.03364 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top