This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 75005 - Default value for Linker|General|Tool has no effect
Summary: Default value for Linker|General|Tool has no effect
Status: CLOSED INVALID
Alias: None
Product: cnd
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 5.x
Hardware: All All
: P3 blocker (vote)
Assignee: Thomas Preisler
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-04-13 13:06 UTC by dnikitin
Modified: 2007-05-25 18:40 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description dnikitin 2006-04-13 13:06:01 UTC
1. Create sample project (e.g. Samples|C/C++/Fortran|Args)
 2. Open Project Properties dialog box
 3. Change default value of C/C++/Fortran|Sun C Compiler|General|Tool to (e.g.
CC or gcc)
     NB, the value of Linker|General|Tool is the same (cc). It isn't changed.
 4. Close Project Properties dialog box and build project.
 I expect that args.c will be compile by CC (new value for Tool), but linker
will be cc (default value)

 But on the screen I see something like:
 CC  -c -g -o build/Debug/GNU-Solaris-x86/src/args.o src/args.c
 CC     -o dist/Debug/args build/Debug/GNU-Solaris-x86/src/args.o

 It means that default value of Linker|General|Tool are replaced by new value of
C/C++/Fortran|General|Tool
Comment 1 Thomas Preisler 2006-04-13 19:59:37 UTC
I have thought about this some more and have come to the conclusion that the
behavior is correct. Here is what happens:

- The default link driver (tool) is the C compiler if there is only C files in
the project and C++ if there is just one C++ file in the project.

- You are changing the C compiler from xxx to yyy (it doesn't matter what xxx
and yyy is).

- You have only C files in your project, hence the link driver should be the C
compiler, which means it should use yyy as the link driver (you just changed it).

And this is exactly what is does.

Or try to think of it this way:

- Default C compiler is cc.

- You change it to /usr/bin/cc

- It should now also use /usr/bin/cc as the link tool.

Moreover, if you can always go to the Linker node and change the link tool to
whatever you want.

Sorry I didn't catch this before you filed the bug.