reading this thread pointed by The FAQ
why do i get an error like this:
timer.o(.text+0x5e): in function 'cpu_speed()':
: undefined reference to `__udivdi3'
when i try using 'unsigned long long start=0, ...' ? :/
trouble Telling CPU Speed
- Pype.Clicker
- Member
- Posts: 5964
- Joined: Wed Oct 18, 2006 2:31 am
- Location: In a galaxy, far, far away
- Contact:
Re:trouble Telling CPU Speed
the compiler doesn't know how to divide long longs natively: it needs a builtin function to do so...
Re:trouble Telling CPU Speed
To make this work, follow these steps :
1. Find your libgcc.a and copy it in a separate directory.
2. Execute commands :
ar x libgcc.a _udivdi3.o _umoddi3.o
ar r libm64.a _udivdi3.o _umoddi3.o
3. Then link libm64.a to your executable.
Works fine for me !
1. Find your libgcc.a and copy it in a separate directory.
2. Execute commands :
ar x libgcc.a _udivdi3.o _umoddi3.o
ar r libm64.a _udivdi3.o _umoddi3.o
3. Then link libm64.a to your executable.
Works fine for me !