[M3devel] cl on windows
Olaf Wagner
wagner at elegosoft.com
Thu Jul 30 19:23:56 CEST 2009
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 -- <builtin>
make_lib 725 C:\cygwin\usr\local\cm3\bin/config\NT386.common
Library -- <builtin>
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 -- <builtin>
make_lib 725 C:\cygwin\usr\local\cm3\bin/config\NT386.common
Library -- <builtin>
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 <rcoleburn at scires.com>:
> 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
More information about the M3devel
mailing list