cp sub/libfoo.a sub/foo.lib
fi
-./compile cl $CFLAGS $LDFLAGS -L"$absfoodir" "$absmainobj" -o main -lfoo
+# POSIX mandates that the compiler accepts a space between the -I,
+# -l and -L options and their respective arguments. Traditionally,
+# this should work also without a space. Try both usages.
+for sp in '' ' '; do
+ rm -f main
-./main
+ ./compile cl $CFLAGS $LDFLAGS -L${sp}"$absfoodir" "$absmainobj" -o main -l${sp}foo
+
+ ./main
+done
: