[CMake] Cannot create shared lib under Windows, the error message is unreadable

Bill Hoffman bill.hoffman at kitware.com
Mon Oct 5 10:36:03 EDT 2009


michael kapelko wrote:
> I've tried "Unix Makefiles", "MSYS Makefiles". Both produced "Bad 
> argument number" error during linkage.
> I cannot use "MinGW Makefiles" within MSYS, because CMake complains, 
> that MinGW's make won't work when sh.exe is in the PATH. When I remove 
> sh.exe from the PATH, not a single command works in MSYS any more:
> 
> root at WINSUXX-F3290C7 /c/build/lf2
> $ cmake-gui
> sh: fork: No such file or directory
> 
You need to run cmake-gui from a dos shell for MinGW to work.


> I cannot modify CMake, because I want an end user to be able to build 
> app without any trouble.
> 
I realize that, but if it does work for you, I could push the changes up 
stream.
> I also thought about modifying build script to produce large object 
> files from all sources in directories. Thus making the final linkage 
> deal with a little number of object files. Can you point me to some docs 
> on that?
No, there is not a way to do that.  You can have to shared libraries, 
and have one link to the other one.

-Bill


More information about the CMake mailing list