Solved

warning: creating a DT_TEXTREL in object.

Posted on 2009-04-02
3
2,225 Views
Last Modified: 2012-05-06
I usually do everything I can to keep errors out of my compilation.
This one however been with my current project "forever", simply because I have no idea what to do about it.
Google doesn't reveal anything obvious either.

Any ideas what it is?

/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/../../../../i686-pc-linux-gnu/bin/ld: warning: creating a DT_TEXTREL in object.
0
Comment
Question by:letharion
  • 2
3 Comments
 
LVL 86

Expert Comment

by:jkr
ID: 24052358
Actually, a simple Google search for 'DT_TEXTREL' comes up with quite a lot, e.g.

http://gcc.gnu.org/ml/gcc-help/2006-11/msg00390.html

--------------------->8-------------------------------

Helmut Jarausch <jarausch@igpm.rwth-aachen.de> writes:

> (I believe) I have clean C++ code but g++-4.1.1
> emits the following warning during generation of
> a dynamic library (on Linux)
>    warning: creating a DT_TEXTREL in object

This means that you are including an object in the shared library
which was compiled without the -fpic option.

--------------------->8-------------------------------

http://unix.derkeiler.com/Newsgroups/comp.unix.programmer/2005-06/0060.html

--------------------->8-------------------------------

Lukasz Wojtow <lw@ftw.zamosc.pl> writes:

> Hi,
> I get this warning when compilling a module:
>
> /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.5-20050130/../../../../i686-pc-linux-gnu/bin/ld:
> warning: creating a DT_TEXTREL in object.
>
> What is it and how can I get rid of it (except for linker option)?

Are you sure you need to get rid of it? Try compiling your code with
the -fPIC compiler flag.

--------------------->8-------------------------------
0
 
LVL 6

Author Comment

by:letharion
ID: 24057575
Thanks. have to admit I missed the first one of those, but have seem the second. (Curious, since we should have done the same search...)

The second answer however, didn't say much IMO, and I didn't consider it an answer. It sounded like "any random guess" to me.

The first one is quite interesting however. And it also gives more credit to the second option.

I'm gonna go read up on that option then.

Thank you jkr :)
0
 
LVL 6

Accepted Solution

by:
letharion earned 0 total points
ID: 24466316
Unfortunately, I'm not a lot wiser, and adding -fPIC doesn't remove the warning message.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Safe conversion? 4 72
C++ mouse_event mouse look 7 99
FMX TCameraComponent Problem 2 89
Synchronization using condition variables to avoid locking in C 8 92
Templates For Beginners Or How To Encourage The Compiler To Work For You Introduction This tutorial is targeted at the reader who is, perhaps, familiar with the basics of C++ but would prefer a little slower introduction to the more ad…
Introduction This article is a continuation of the C/C++ Visual Studio Express debugger series. Part 1 provided a quick start guide in using the debugger. Part 2 focused on additional topics in breakpoints. As your assignments become a little more …
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

820 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question