home *** CD-ROM | disk | FTP | other *** search
-
- The sharelibs don't work in the following case:
-
- prog.c
-
- extern char string[];
- main(){ printf("%s\n",string); }
-
- lib.c
-
- char string[]="123456";
-
- ----------------
- ----------------
-
- gcc -c lib.c -fpic
- warning size <-1....
- ld -B...........
-
- gcc prog.c -o prog /usr/lib/libtoto.so.1.1
-
- both case:
- 1- string is undefined
- 2- string is defined but it bad
- (if you speficie the size of string the prog work...)
- Xt use a lot of these arrays to share strings (XtN..)
-
- i don't no why gcc don't generate the correct size.
-
-
-