Bug 118408 - link order incorrect
Summary: link order incorrect
Status: ASSIGNED
Alias: None
Product: CDT
Classification: Tools
Component: cdt-build-managed (show other bugs)
Version: 3.0.1   Edit
Hardware: PC Windows XP
: P3 normal with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact: Jonah Graham CLA
URL:
Whiteboard:
Keywords:
: 136040 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-11-29 07:15 EST by styx2000 CLA
Modified: 2020-09-04 15:18 EDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description styx2000 CLA 2005-11-29 07:15:21 EST
i am developing a c-program which is accessing a postgresql database (8.0.4). i am using the libpq library, which needs the option "-lpq" and the lib-directory "-L[dir]" for linking.
i use cygwin as my compiler, debuger, make, etc. (i cant see the version of cywin, downloaded it on 11-26-2005)

managed make produces the following linker-command which doesnt work for me:
<code>gcc -LC:\Programme\PostgreSQL\8.0\lib -lpq -othesis.exe ./db.o ./init.o ./nsga2.o ./ui.o</code>

i wrote my own make-file and use the following linker-command which works (note the order of parameters):
<code>gcc -o thesis.exe ./db.o ./init.o ./nsga2.o ./ui.o -LC:\Programme\PostgreSQL\8.0\lib -lpq </code>

to configure the managed make i went to project-properties, "c/c++ build", "tool settings", "gcc c linker". in libraries i addes my library-folder and in miscallaneous i added the linker flag "-lpq"
Comment 1 Chris Recoskie CLA 2005-11-29 09:40:03 EST
Customizing the order of inputs to a tool (e.g. the link order) is on the list for 3.1
Comment 2 Leo Treggiari CLA 2005-11-29 11:32:41 EST
(In reply to comment #0)
> in miscallaneous i added the linker flag "-lpq"

Instead of adding -lpq to the miscellaneous field, try adding "pq" to the Libraries list on the same property page that you add the library folder.

Leo

Comment 3 Chris Recoskie CLA 2006-05-01 10:09:54 EDT
This work item is deferred.  Hopefully we can get to it for CDT 4.0
Comment 4 Chris Recoskie CLA 2007-01-03 11:46:13 EST
Returning to the pool as I'm not likely to have time to address this any time soon.
Comment 5 Bernie CLA 2007-05-03 09:17:53 EDT
Is this still likely to be fixed in 4.0?
Comment 6 Chris Recoskie CLA 2007-05-03 09:24:32 EDT
 (In reply to comment #5)
> Is this still likely to be fixed in 4.0?

We are past the feature freeze date for 4.0 so I don't think that it's very likely.
Comment 7 Doug Schaefer CLA 2007-08-21 10:54:34 EDT
Future means you commit to fix it in the Future. Inboxes can't make committments. Moving to '--'.
Comment 8 Chris Recoskie CLA 2009-06-10 13:06:29 EDT
*** Bug 136040 has been marked as a duplicate of this bug. ***