2007/6/12, Brandon Van Every <[EMAIL PROTECTED]>:


On some platforms, I bet the underlying linker AR can't even do it.  I
know it can't put static libraries inside of static libraries, thats' why
everyone wants "convenience libraries" and I had to work on all that object
file fakery.  Possibly it can't take a DLL stub .lib either.  So, if there
is a solution for some platforms, it's not likely to be portable.

I don't know what the MSVC linker can accomplish.  Would suggest reading
the MSVC docs to make sure it can be done.


I *know* that it can be done, since our current hand-written .vcproj files
do it. I simply want CMake to allow me to create a static library using a
command line such as:

lib /out:mystaticlib.lib foo.obj bar.obj mydll.lib

where mydll.lib is an import lib for mydll.dll.

What you're asking for seems kinda weird.  What's the motive?
<http://www.cmake.org/mailman/listinfo/cmake>


foo.obj and bar.obj uses symbols in mydll.dll, and I want to allow users of
mystatic.lib to just have to link with mystaticlib.lib, and not with
mydll.lib.

Note that an import library on Windows *is* a static library (both having
the .lib suffix is not a coincidence). The only special thing with an import
library is that it exports symbols with a note that the symbol really should
be found at runtime in the given dll. So,

lib /out:foo.lib bar.obj fie.lib

puts all the contents of bar.obj and fie.lib into foo.lib. This is very
practical.

Hope that makes it a little clearer.

--
/Jesper
_______________________________________________
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to