<<< Previous topic - Next topic >>> |
|
Author |
Message |
sandsfr
Joined: 03 Dec 2008 Posts: 1
|
Posted: 04.12.2008, 14:23 Post subject: compilation error |
|
|
hi every body
is someone could help me to solve my follwing problem :
i try to build a simple exemple with call to mathematical functions.
i solve problem concerning build and link but each time i execute my progam, i have the follwing error message :
[root@emblinux guest]$essai
essai: error in loading shared libraries: /lib/libm.so.6: symbol __register_fra
me_info, version GLIBC_2.0 not defined in file libc.so.6 with link time referenc
e
i compile and build on coLinux (ubuntu)
my commande line is
Export PATH=/usr/local/arm-ssv1-linux/bin:$PATH
arm-ssv1-linux-gcc -Wall -O2 -Wl,-s -lm -o essai essai.c
i copy the /usr/local/arm-ssv1-linux/sysroot/lib/libm.so.6 into DNP/9200 into directory /lib
My essai.c program is :
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int main()
{
printf ("test sur cible : racine de 4 = %f", sqrt(4.0));
return (0);
}
for infomation :
i have :
* windows XP SP3
* coLinux and ubuntu
* the DNP/SK25 Embedded Linux Start Kit
* the DNP/9200
best regards[/code] |
|
Back to top |
|
 |
hne

Joined: 11 Jul 2008 Posts: 208 Location: Hannover
|
Posted: 09.12.2008, 11:54 Post subject: |
|
|
Hello sandsfr,
first check the current kernel version on DNP/9200 with uname -r on your Telnet console.
for kernel 2.6.16.20:
- Run the compiler with:
Code: | export PATH=/usr/local/arm-ssv1-linux/bin:$PATH
arm-ssv1-linux-gcc -Wall -O2 -Wl,-s -lm -o essai essai.c |
Copy the file /usr/local/arm-ssv1-linux/sysroot/lib/libm-2.3.5.so to DNP and store it as /flash/libm.so.6
Copy the file "essai" into directory /flash on DNP/9200
Make the file executable with "chmod +x /flash/essai"
Run the program on DNP/9200 with Code: | LD_LIBRARY_PATH=/flash /flash/essai |
for kernel 2.4.27:
- Run the compiler with:
Code: | export PATH=/usr/local/arm-linux/bin:$PATH
arm-linux-gcc -Wall -O2 -Wl,-s -lm -o essai essai.c |
Copy the file /usr/local/arm-linux/arm-linux/lib/libm-2.1.3.so to DNP and store it as /flash/libm.so.6
Copy the file "essai" into directory /flash on DNP/9200
Make the file executable with "chmod +x /flash/essai"
Run the program on DNP/9200 with Code: | LD_LIBRARY_PATH=/flash /flash/essai |
_________________ Henry Nestler |
|
Back to top |
|
 |
|