STR-523: Standalone strc: improve support for creating a library
Problem 1:
======================================
$ strc -i foo.str –library
[ strc | info ] Compiling ‘foo.str’
[ strc | info ] Front-end succeeded : [user/system] = [2.58s/0.45s]
[ strc | info ] Optimization succeeded -O 2 : [user/system] = [0.13s/0.05s]
name for library same as name for base file: foo
======================================
Solution: default to libfooProblem 2:
======================================
[ strc | info ] Back-end succeeded : [user/system] = [2.54s/0.10s]
[ strc | error ] Command failed :
mkdir .libs
gcc libfoo.o -o libfoo /pkg/strategoxt/2005-12-12-16-32/lib/libstratego-lib-native.so -L /home/martin/.nix-profile/lib /pkg/strategoxt/2005-12-12-16-32/lib/libstratego-runtime.so /nix/store/926px9yik39shmsgmw4nhiyh0gvqlgl3-aterm-2.4.2/lib/libATerm.so -lm -Wl,–rpath -Wl,/pkg/strategoxt/2005-12-12-16-32/lib -Wl,–rpath -Wl,/nix/store/926px9yik39shmsgmw4nh iyh0gvqlgl3-aterm-2.4.2/lib -Wl,–rpath -Wl,/pkg/strategoxt/2005-12-12-16-32/lib -Wl,–rp ath -Wl,/nix/store/926px9yik39shmsgmw4nhiyh0gvqlgl3-aterm-2.4.2/lib
/nix/store/1mgfgy3ga4m9z60747s0yzxl0g6w5kxz-glibc-2.3.6/lib/crt1.o: In function_start': init.c:(.text+0x18): undefined reference to
main’
collect2: ld returned 1 exit status[ strc | error ] Compilation failed (7.84 secs)
======================================strc should do the appriopiate stuff for compiling the .c file to a library (of course, use libtool)
Submitted on 1 March 2006 at 14:43
Log in to post comments