On 21.07.2016 12:55, Michael Stahl wrote:
On 20.07.2016 21:18, Bunth Tamás wrote:
The patch:
https://gerrit.libreoffice.org//25673/
has an error on Windows (patch set 42):
LINK : fatal error LNK1181: cannot open input file 'tommath.lib'
I think it's because I created tommath.lib using the ar linux command,
and the result is slightly different from the .lib file that msvc
expects.[1][2]
indeed, Cygwin's ar can't be used.
I would have liked to use lib.exe to create tommath.lib instead, which
seems to be the tool on Windows to create a .lib file, but I couldn't
find the appropriate makefile marco to use it (like the LD variable
stores the path of link.exe), since the variable AR stores "ar" in
case of Windows too.
sorry, sent this too early totally missing your question: if the AR
variable is the only problem, just pass in AR=path-to-lib.exe from the
ExternalProject_*.mk... probably that's $(COMPATH)/bin/lib.exe, maybe
it's necessary to use "cygpath" too, see gb_AUTOCONF_WRAPPERS for how
it's done with LD currently.
Am I right about the cause of the issue, and if so, how can I refer to
lib.exe to use it for creating tommath.lib?
looking at com_MSC_class.mk, the command to link a static library goes
like this: link.exe -LIB ***.obj -out:foo.lib
are you using the autoconf_wrappers? then the variable LD points to
link.exe (not to gcc-wrapper.exe) so if tommath makefiles use "$(LD)
-lib" to link you might have some success, but of course there's no
mapping of unix-ld-flags to link.exe flags in this case since link.exe
is directly invoked...
perhaps try overriding LD="$(CXX) -lib" or something along those lines -
there is some translation of unix-ld-flags in gcc-wrapper.exe, see the
function "processccargs".
the gcc-wrappers were intended to be called by autoconf tests and by
libtool, if your project doesn't use libtool i'm not sure they will
translate all of the parameters used etc.
Context
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.