Bug 27127 - make ignores "-static" when linking
Summary: make ignores "-static" when linking
Status: RESOLVED FIXED
Alias: None
Product: kdevelop
Classification: Applications
Component: kdevelop 2.x (obsolete) (show other bugs)
Version: 1.4.1
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: KDevelop-Devel List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-06-13 00:03 UTC by ender
Modified: 2002-09-23 00:07 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description ender 2001-06-13 00:02:22 UTC
(*** This bug was imported into bugs.kde.org ***)

Package:           kdevelop
Version:           1.4.1 (using KDE 2.1.1 )
Severity:          normal
Installed from:    SuSE
Compiler:          gcc version 2.95.2 19991024 (release)
OS:                Linux 2.4.0 i686
OS/Compiler notes: 

Hi

I have a problem generating a Terminal C++ program. If I accept de default configuration from the Project Wizard the created binary will use shared library (the default option from the Wizard). 
But I do want a static library program so I select Project->Options->Linker Options->prevent using shared libraries. But it DO NOT WORKS.

To see what I'm saying please:
a) create the basic Terminal C++ program from the Wizard (the "Hello Word!")
b) select Project->Options->Linker Options->prevent using shared libraries
c) click Rebuild. The Kdevelop generates the program but still with shared library (the same binary!) 
d) reading the messages from the make process you will find at the bottom (without the numbers):

1> make[1]: Entering directory 
2> `/home/ender/projects/test/test'
3> g++ -DHAVE_CONFIG_H -I. -I. -I..     -O0 -g3 -Wall    -c main.cpp
4> /bin/sh ../libtool --mode=link g++  -O0 -g3 -Wall    -static  -o test   main.o  
5> mkdir .libs
6> g++ -O0 -g3 -Wall -o test main.o 
7> gmake[1]: Leaving directory 
8>`/home/ender/projects/test/test'
9> *** success ***

In line <4> you see the "-static" option during the compiling time (fine here). But during the linking time (in line 6) the "-static" option DO NOT APPEAR so the binary uses shared memory. If you try:
"g++ -O0 -g3 -Wall -static -o test main.o" (please note I've included "-static" by hand) in a Terminal then the generated binary will be 100% OK.

thank you

[]'s
Ender

(Submitted via bugs.kde.org)
(Called from KBugReport dialog)
Comment 1 John Firebaugh 2002-09-23 00:07:37 UTC
Not an issue with Gideon