[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [arm-gnu] undefined reference to `_impure_ptr'


  • To: Carlos O'Donell <carlos@xxxxxxxxxxxxxxxx>
  • Subject: Re: [arm-gnu] undefined reference to `_impure_ptr'
  • From: Zenoname <zenonamemail@xxxxxxxxx>
  • Date: Wed, 23 Jun 2010 17:30:39 +0200

Unfortunately I can't provide source code to you.
But I've made a progress.
Linking with the static version of the lib it displays in which functions there was the _impure_ptr reference And this leads me to stderr. I commented it and now it compiles without the link error. Still I don't know if this will run (I'll keep you informed as I can't do it right now)

But does it makes sense to you ? The stderr thing ?
If so can you explain and do I have to be aware of something else that could cause the same trouble ?

Regards

On 6/23/10 4:52 PM, Carlos O'Donell wrote:
On 23/06/10 10:47 AM, Zenoname wrote:
Sorry no still the same error

On 6/23/10 4:43 PM, Carlos O'Donell wrote:
On 23/06/10 08:59 AM, Zenoname wrote:
int main(int argc,char** argv) { return 0; }
arm-none-linux-gnueabi-gcc myDemo.c -o myDemo -L../../lib -lmylib
-lstdc++ -Wl,-Map,linkermap.txt

If this is a C++ or mixed C/C++ application then link your application
with g++ and do not use -lstdc++ e.g.

arm-none-linux-gnueabi-g++ myDemo.c -o myDemo -L../../lib -lmylib
-Wl,-Map,linkermap.txt

Does that solve your problem?

We need a complete test case then e.g. all objects used in the link, link command, and if possible source.

Cheers,
Carlos.