[M3devel] cl on windows

Jay K jay.krell at cornell.edu
Thu Jul 30 21:48:38 CEST 2009


Either delete Cygwin's link.exe or make sure VC's is earlier in %PATH%.
Cygwin's link.exe is a synonym for ln.exe.
 
 
> Attached is the shell script I came up with.

Here are my mine for many environments.
Of particular interest are:
env\cm3\cm3.cygwin.bat
env\cm3\cm3.vc90.bat
env\test.bat used to work but I've deleted some of the toolsets

You can see a lot of it works via composition.

cm3.vc90.bat uses env\ms\vc90.bat

 
 - Jay


----------------------------------------
> Date: Thu, 30 Jul 2009 19:23:56 +0200
> From: wagner at elegosoft.com
> To: m3devel at elegosoft.com
> Subject: Re: [M3devel] cl on windows
>
> Thanks for the answer, Randy. I had just remembered that I needed to
> set a number of variables. Attached is the shell script I came up with.
>
> Compilation works now without a problem. I get as far as linking:
>
> new source -> compiling WinUserC.c
> -> archiving m3core.lib
> link: invalid option -- n
> Try `link --help' for more information.
> "C:\cygwin\usr\local\cm3\bin/config\NT386.common", line 725: quake
> runtime error: dynamic link library creation failed, see
> C:\cygwin\home\elego\work\cm3\m3-libs\m3core\NT386\m3core.lst for more
> information
>
>
> --procedure-- -line- -file---
> error -- 
> make_lib 725 C:\cygwin\usr\local\cm3\bin/config\NT386.common
> Library -- 
> include_dir 48
> C:\cygwin\home\elego\work\cm3\m3-libs\m3core\src\m3makefile
> 9
> C:\cygwin\home\elego\work\cm3\m3-libs\m3core\NT386\m3make.args
>
>
> Fatal Error: procedure "make_lib" defined in
> "C:\cygwin\usr\local\cm3\bin\cm3.cfg" failed.
>
> *** execution of cm3 -build -override $RARGS
> -DROOT='C:\\cygwin\\home\\elego\\work\\cm3'
> -DCM3_VERSION_TEXT='d5.8.2' -DCM3_VERSION_NUMBER='050802'
> -DCM3_LAST_CHANGED='2009-07-15' failed ***
>
> This seems to be a problem in the cm3 configuration files, right?
>
> More evidence:
>
> elego at wagner ~/work/cm3
> $ (cd m3-libs/m3core; cm3 -commands -build -keep)
> --- building in NT386 ---
>
> cd NT386
> ignoring ..\src\m3overrides
>
> rm .M3SHIP
> rm .M3OVERRIDES
> inhale m3core.m3x
>
> -> archiving m3core.lib
> rm m3core.lib
> rm m3core.lib
> rm m3core.lib.sa
> rm m3core.dll
> rm m3core.def
> rm m3core.lst
> rm m3core.dll.manifest
> rm m3core.pdb
> rm _m3responsefile0.txt
> rm _m3responsefile1.txt
> rm m3core.ilk
> rm c:\WINDOWS\TEMP\qk
> rm c:\WINDOWS\TEMP\qk
> mklib @_m3responsefile0.txt 2>&1> m3core.lst
> rm m3core.lib
> rm c:\WINDOWS\TEMP\qk
> rm c:\WINDOWS\TEMP\qk
> link @_m3responsefile1.txt 2>&1> m3core.lst
> link: invalid option -- n
> Try `link --help' for more information.
> "C:\cygwin\usr\local\cm3\bin/config\NT386.common", line 725: quake
> runtime error: dynamic link library creation failed, see
> C:\cygwin\home\elego\work\cm3\m3-libs\m3core\NT386\m3core.lst for more
> information
>
>
> --procedure-- -line- -file---
> error -- 
> make_lib 725 C:\cygwin\usr\local\cm3\bin/config\NT386.common
> Library -- 
> include_dir 48
> C:\cygwin\home\elego\work\cm3\m3-libs\m3core\src\m3makefile
> 6
> C:\cygwin\home\elego\work\cm3\m3-libs\m3core\NT386\m3make.args
>
>
> Fatal Error: procedure "make_lib" defined in
> "C:\cygwin\usr\local\cm3\bin\cm3.cfg" failed.
>
> cd ..
>
> elego at wagner ~/work/cm3
> $ cat m3-libs/m3core/NT386/_m3responsefile1.txt
> -nodefaultlib
> -debug
> -incremental:no
> -opt:ref
> -delayload:wsock32.dll
> -delayload:advapi32.dll
> -delayload:gdi32.dll
> -delayload:netapi32.dll
> -delayload:user32.dll
> -delayload:comctl32.dll
> delayimp.lib
> -def:m3core.def
> -dll
> -out:m3core.dll
> -noentry
> hand.obj
> dtoa.obj
> libgcc.obj
> RTHooks.io
> RTHooks.mo
> [...lots of objects removed...]
> kernel32.lib
> msvcrt.lib
>
>
> Olaf
>
> PS: I don't think that just returning 53 is the correct way to remind
> users that some environment settings are missing though :-)
>
> Quoting Randy Coleburn :
>
>> Olaf:
>>
>> I don't think you want to be doing this with cygwin. That would mean
>> you are executing in a cygwin environment, not a true Windows-only
>> environment.
>>
>> For the Visual Studio command line to work, you have to run the script
>> that sets up the environment variables. From the Windows Start menu,
>> there should be a menu tree labeled "Visual C++ 9.0 Express
>> Edition-->Visual Studio Tools-->Visual Studio 2008 Command Prompt".
>> Choosing this item from the menu will bring up a command prompt with the
>> environment set up properly.
>>
>> Alternately, you can run the following command from an existing command
>> prompt window: "C:\Program Files\Microsoft Visual Studio
>> 9.0\VC\vcvarsall.bat x86"
>>
>> Note that the above command line assumes you have installed Visual C++
>> 2008 Express Edition. The paths may be different for different versions
>> of the software.
>>
>> Of course, if you use my CMD files (e.g., cm3PromptHere.CMD or
>> cm3SetupCmdEnv.CMD), they do this all for you.
>>
>> Regards,
>> Randy Coleburn
> --
> Olaf Wagner -- elego Software Solutions GmbH
> Gustav-Meyer-Allee 25 / Gebäude 12, 13355 Berlin, Germany
> phone: +49 30 23 45 86 96 mobile: +49 177 2345 869 fax: +49 30 23 45 86 95
> http://www.elegosoft.com | Geschäftsführer: Olaf Wagner | Sitz: Berlin
> Handelregister: Amtsgericht Charlottenburg HRB 77719 | USt-IdNr: DE163214194
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: env.zip
Type: application/x-zip-compressed
Size: 63495 bytes
Desc: not available
URL: <http://m3lists.elegosoft.com/pipermail/m3devel/attachments/20090730/06390fae/attachment-0002.bin>


More information about the M3devel mailing list