Question

Under cygwin, with libtool I am trying to link a static library. the --mode=link cl.exe line invokes ar cru on the .obj files to create the .lib. However, I know there's another program under windows, LIB. As far as I understand, it's equivalent to ar, but will it make any difference in using ar+ranlib vs. LIB, and how can I force libtool to use LIB instead of ar?

Was it helpful?

Solution

Since setting AR and AR_FLAGS won't work, the only easy solution (that I haven't tried) is CCCL which wraps up cl.exe and link.exe for a neater interface to those programs for autoconf packages. It looks kind of old now, but it might work.

The installation instructions assume that CC/CXX are going to be cl.exe, but you're probably using GCC. In that case, probably AR=cccl needs to be an argument to configure.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top