Bug 107986 - error in library search path
Summary: error in library search path
Status: ASSIGNED
Alias: None
Product: CDT
Classification: Tools
Component: cdt-build-managed (show other bugs)
Version: 3.0   Edit
Hardware: PC Linux
: P3 critical with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact: Jonah Graham CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-08-25 09:55 EDT by Paulo Miranda CLA
Modified: 2020-09-04 15:20 EDT (History)
2 users (show)

See Also:


Attachments
makefile (766 bytes, text/plain)
2005-08-25 10:55 EDT, Paulo Miranda CLA
no flags Details
makefile (766 bytes, application/octet-stream)
2005-08-25 11:01 EDT, Paulo Miranda CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Paulo Miranda CLA 2005-08-25 09:55:25 EDT
The CDT is passing the -L wrong to the g++. The compiler isn't finding the libs.
I saw the makefile generated by the cdt and i find the error. CDT is passing -L
parameter before the -o parameter. The compiler is ignoring the -L parameter. I
put the -L parameter after the -o parameter in the makefile and the error was
resolved.
Comment 1 Doug Schaefer CLA 2005-08-25 09:59:48 EDT
Which version of g++ are you using?
Comment 2 Paulo Miranda CLA 2005-08-25 10:06:58 EDT
(In reply to comment #1)
> Which version of g++ are you using?

g++ (GCC) 4.0.0 20050519 (Red Hat 4.0.0-8)



Comment 3 Doug Schaefer CLA 2005-08-25 10:12:21 EDT
I don't think we've tried 4.0 yet. Thanks for bringing this up.
Comment 4 Leo Treggiari CLA 2005-08-25 10:13:37 EDT
Would you create an attachment with the makefile that was generated?  Thanks.
Comment 5 Paulo Miranda CLA 2005-08-25 10:55:58 EDT
Created attachment 26455 [details]
makefile

The makefile generated by the cdt with error.
Comment 6 Paulo Miranda CLA 2005-08-25 11:01:28 EDT
Created attachment 26456 [details]
makefile

This is the makefile with my corretion.
I change 
"g++ -L/usr/local/lib/ -L/home/paulo/eclipse/workspace/Smart/GUI
-L/usr/lib/qt-3.3/lib -o $@ $(OBJS) $(USER_OBJS) $(LIBS)"
to
"g++ -o $@ $(OBJS) $(USER_OBJS) $(LIBS) -L/usr/local/lib/
-L/home/paulo/eclipse/workspace/Smart/GUI -L/usr/lib/qt-3.3/lib"
Comment 7 Mikhail Sennikovsky CLA 2006-04-25 13:53:26 EDT
I was unable to reproduce this both for gcc 4.1 and 4.0.

Is anyone else seeing the same problems with gcc >= 4.0 ?
Comment 8 Kevin Barnes CLA 2006-10-26 14:56:12 EDT
(In reply to comment #7)
> I was unable to reproduce this both for gcc 4.1 and 4.0.
> 
> Is anyone else seeing the same problems with gcc >= 4.0 ?
> 
Hi, 
   Yes, I am getting the same problem with middleware libraries for NXTera. The -L is put in front - it must be being ignored.
Comment 9 Mario Prieto CLA 2014-03-21 05:06:26 EDT
I have taken a look at the problem located in the class BuildDescription.java and I think it would work if you implement the method getUserObjs() the same way as the method getLibs() is implemented, or at least you give priority to the BuildStep tool over the TargetTool.

I don't understand why the user objects must come from the target tool anyway...but maybe I miss something :)

BR,
Mario.
Comment 10 Mario Prieto CLA 2014-03-21 05:08:52 EDT
Ooops!
Sorry forget my last comment...This is the wrong bug :S