<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=text/html;charset=iso-8859-1 http-equiv=Content-Type>
<STYLE><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></STYLE>
<META name=GENERATOR content="MSHTML 8.00.6001.19328"></HEAD>
<BODY style="PADDING-LEFT: 10px; PADDING-RIGHT: 10px; PADDING-TOP: 15px"
id=MailContainerBody class=hmmessage leftMargin=0 topMargin=0
CanvasTabStop="true" name="Compose message area">
<DIV><FONT face=Arial>Both solutions 1. as well as 2. work only from within the
shell where vcvars32 was called.</FONT></DIV>
<DIV><FONT face=Arial>Let's say you use the second solution and open a unix
shell (e.g. UWIN's korn shell) the</FONT></DIV>
<DIV><FONT face=Arial>effect of vcvars32 is not visible from with that shell,
and also if you open vim from within</FONT></DIV>
<DIV><FONT face=Arial>the ms command shell after calling "cmd /k" and then cm3
from within vim, the same thing</FONT></DIV>
<DIV><FONT face=Arial>happens, the effect of vcvars is strictly limited to the
"CMD" environment.</FONT></DIV>
<DIV><FONT face=Arial>A brute force approach such as copying
"link.exe" to cm3/bin doesn't work either because</FONT></DIV>
<DIV><FONT face=Arial>"link" refers to many (how many?) other files within the
VS environment (e.g. mspdb100.dll).</FONT></DIV>
<DIV><FONT face=Arial></FONT> </DIV>
<DIV><FONT face=Arial>Now, the the interest of calling cm3 from within VIM
resides in the fact that it leads one</FONT></DIV>
<DIV><FONT face=Arial>directly to the faulty lines in your preferred editor,
sure, not as elegantly as in a real IDE</FONT></DIV>
<DIV><FONT face=Arial>such as Visual Studio or Eclipse, but fair enough if you
are used to it.</FONT></DIV>
<DIV><FONT face=Arial>And Microsoft's command shell is a pain in the
backside to say the least.</FONT></DIV>
<DIV><FONT face=Arial>(it uses a weird file syntax, it can't remember its
history between incarnations, it doesn't</FONT></DIV>
<DIV><FONT face=Arial>allow copy-paste etc etc) </FONT><FONT face=Arial>One is
bound to hate it.</FONT></DIV>
<DIV><FONT face=Arial></FONT> </DIV>
<DIV><FONT face=Arial>And also, sorry to say so, cm3ide is far from being an
elegant development tool, you can</FONT></DIV>
<DIV><FONT face=Arial>inspect only one file at a time and using VIM from cm3ide
brings you back to the above</FONT></DIV>
<DIV><FONT face=Arial>dilemma.</FONT></DIV>
<DIV style="FONT: 10pt Tahoma">
<DIV><FONT size=3 face=Arial></FONT><FONT size=3 face=Arial></FONT><FONT size=3
face=Arial></FONT><FONT size=3 face=Arial></FONT><FONT size=3
face=Arial></FONT><FONT size=3 face=Arial></FONT><BR></DIV>
<DIV style="BACKGROUND: #f5f5f5">
<DIV style="font-color: black"><B>From:</B> <A title=jay.krell@cornell.edu
href="mailto:jay.krell@cornell.edu">Jay K</A> </DIV>
<DIV><B>Sent:</B> Friday, October 19, 2012 5:51 PM</DIV>
<DIV><B>To:</B> <A title=hosking@cs.purdue.edu
href="mailto:hosking@cs.purdue.edu">Tony</A> ; <A title=m3devel@elegosoft.com
href="mailto:m3devel@elegosoft.com">m3devel</A> </DIV>
<DIV><B>Subject:</B> Re: [M3devel] Windows issue</DIV></DIV></DIV>
<DIV><BR></DIV>
<DIV dir=ltr><FONT face=Arial> > I know there exists vcvars32.bat,
but its effect is not permanent.</FONT><BR><BR> <BR>Sure it is. If you use
it right. Permance is relative.<BR>There are two easy
ways.<BR> <BR> <BR>1. start; run; run vcvars32.bat; stay in same cmd
and use cm3<BR> <BR> <BR>2. somewhere on the start menu is a link
that will do #1 -- opens up a cmd that runs vcvars32.bat and sticks around; the
command line for the shortcut is roughly cmd /k c:\program files (x86)\visual
studio\vcvars32.bat -- that /k means "run and don't exit" as opposed to the
Unix-shell-like /c which means "run and exit". (see cmd /? for plenty more
decent documentation -- cmd isn't great, but it is better than people realize,
and the command line editor and text output performance are a lot better than
anything else I've used; the scripting language aspect of it is not good though
-- use Python instead...).<BR> <BR><FONT face=Arial></FONT> <BR><FONT
face=Arial> > It should be invoked somewhere by
cm3/bin/config/NT386.common etc.</FONT><BR><FONT
face=Arial></FONT> <BR><FONT face=Arial></FONT> <BR><FONT
face=Arial>Not really. But maybe/kind of/store of. If we could find
vcvars32.bat, then we can likely know all that it does and just do it ourselves.
Granted, past versions did try to do something like that, but they didn't work
well. They hunted around in a few places for C compiler and linker, asked user
to confirm, and tried to form up short paths to them. Short paths aren't
predictable, aren't necessarily stable across backup/restore (APIs added only as
recently as Windows XP to set them), and aren't available on all file systems --
either tools should tolerate spaces, or depend on %PATH%, %LIB%, and
%INCLUDE%.</FONT><BR><FONT face=Arial></FONT> <BR><FONT
face=Arial></FONT> <BR><FONT face=Arial>Perhaps an option to configure
where vcvars32.bat is and run it, and then run other stuff, should be
considered. Because "it isn't permanant", what one can do is generate a little
temporary .cmd file that runs vcvars32.bat, then does whatever you "really"
wanted to do, then exists.</FONT><BR><FONT face=Arial></FONT> <BR><FONT
face=Arial></FONT> <BR><FONT face=Arial>Another thing we can consider is
symlinks or hardlinks.</FONT><BR><FONT face=Arial>We could create
\cm3\bin\cl.exe, \cm3\bin\link.exe that..er..nevermind that..matter of setting
%INCLUDE% and %LIB% not dealt with.., but this:</FONT><BR><FONT
face=Arial></FONT> <BR><FONT face=Arial></FONT> <BR><FONT
face=Arial>We could create \cm3\bin\cl.cmd and \cm3\bin\link.cmd that run
vcvars32.bat and then cl.exe/link.exe -- they'd be considered user editable to
find vcvars.bat.</FONT><BR><FONT face=Arial></FONT> <BR><FONT
face=Arial></FONT> <BR><FONT face=Arial>On the other hand..I have a LOT of
history with wrapper programs and such..might be better to create
cl.exe/link.exe or cl.com/link.com that read some input and then run the
real cl.exe/link.exe.</FONT><BR><FONT face=Arial>I've been through a similar
exercise with nmake and I'm happier to have nmake.com than nmake.cmd. ".com"
comes before ".exe" in %PATHEXT% so if you run "foo" and there is "foo.com" and
"foo.exe", "foo.com" will be run. Whereas ".cmd" is after ".exe" so if you have
foo.cmd and foo.exe and run "foo", "foo.exe" will be run.</FONT><BR><FONT
face=Arial></FONT> <BR><FONT face=Arial></FONT> <BR><FONT
face=Arial>The lesson is "users should run foo" and "creative environments"
should introduce "foo.com".</FONT><BR><FONT face=Arial></FONT> <BR><FONT
face=Arial></FONT> <BR><FONT face=Arial>But still, cl.cmd/link.cmd are
easier because they would look like this:</FONT><BR><FONT face=Arial>call
c:\program files\...vcvars32.bat -- user editable line</FONT><BR><FONT
face=Arial>%~0.exe %* -- foo.cmd => foo.exe, with repeated command
line.</FONT><BR><FONT face=Arial></FONT> <BR><FONT
face=Arial></FONT> <BR><FONT face=Arial>whereas foo.com would have to
either replicate vcvars32.bat somehow, or create a wrapper
.cmd..</FONT><BR><FONT face=Arial></FONT> <BR><FONT
face=Arial></FONT> <BR><FONT face=Arial>Thoughts?</FONT><BR><FONT
face=Arial>Really asis is not bad -- run vcvars32.bat yourself, and then use
cm3.</FONT><BR><FONT face=Arial></FONT> <BR><FONT
face=Arial></FONT> <BR> - Jay<BR> <BR>
<DIV>
<DIV id=SkyDrivePlaceholder></DIV>
<HR id=stopSpelling>
From: hosking@cs.purdue.edu<BR>Date: Fri, 19 Oct 2012 09:56:11 -0400<BR>To:
m3devel@elegosoft.com<BR>Subject: [M3devel] Windows issue<BR><BR>
<DIV>I have had a query from a user of CM3 regarding Windows installation.
I am completely at sea answering since I never use Windows.</DIV>
<DIV><BR></DIV>
<DIV>Here is his question:</DIV>
<DIV><BR></DIV>
<DIV>
<DIV><FONT face=Arial>I have a problem with the M3 compiler since I have
installed Visual Studio 10.</FONT></DIV>
<DIV><FONT face=Arial>cm3 does not find the Windows linker. I work with vim and
have configured the</FONT></DIV>
<DIV><FONT face=Arial>make macro to call cm3/bin/cm3.exe and the error happens
when quake tries to</FONT></DIV>
<DIV><FONT face=Arial>invoke the MS tools. I know there exists vcvars32.bat, but
its effect is not permanent.</FONT></DIV>
<DIV><FONT face=Arial>It should be invoked somewhere by
cm3/bin/config/NT386.common etc.</FONT></DIV>
<DIV><BR></DIV></DIV>
<DIV><FONT face=Arial>Can anyone help?</FONT></DIV><BR>
<DIV><SPAN style="BORDER-SPACING: 0px; BORDER-COLLAPSE: separate"
class=ecxApple-style-span><SPAN
style="WIDOWS: 2; TEXT-TRANSFORM: none; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; FONT: 12px Helvetica; WHITE-SPACE: normal; ORPHANS: 2; LETTER-SPACING: normal; COLOR: rgb(0,0,0); WORD-SPACING: 0px; font-size-adjust: none; font-stretch: normal"
class=ecxApple-style-span>
<DIV style="WORD-WRAP: break-word"><SPAN
style="WIDOWS: 2; TEXT-TRANSFORM: none; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; FONT: 12px Helvetica; WHITE-SPACE: normal; ORPHANS: 2; LETTER-SPACING: normal; COLOR: rgb(0,0,0); WORD-SPACING: 0px; font-size-adjust: none; font-stretch: normal"
class=ecxApple-style-span>
<DIV style="WORD-WRAP: break-word"><SPAN
style="WIDOWS: 2; TEXT-TRANSFORM: none; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; FONT: 12px Helvetica; WHITE-SPACE: normal; ORPHANS: 2; LETTER-SPACING: normal; COLOR: rgb(0,0,0); WORD-SPACING: 0px; font-size-adjust: none; font-stretch: normal"
class=ecxApple-style-span><SPAN
style="WIDOWS: 2; TEXT-TRANSFORM: none; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; FONT: 12px Helvetica; WHITE-SPACE: normal; ORPHANS: 2; LETTER-SPACING: normal; COLOR: rgb(0,0,0); WORD-SPACING: 0px; font-size-adjust: none; font-stretch: normal"
class=ecxApple-style-span><SPAN
style="WIDOWS: 2; TEXT-TRANSFORM: none; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; FONT: 12px Helvetica; WHITE-SPACE: normal; ORPHANS: 2; LETTER-SPACING: normal; COLOR: rgb(0,0,0); WORD-SPACING: 0px; font-size-adjust: none; font-stretch: normal"
class=ecxApple-style-span><SPAN
style="WIDOWS: 2; TEXT-TRANSFORM: none; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; FONT: 12px Helvetica; WHITE-SPACE: normal; ORPHANS: 2; LETTER-SPACING: normal; COLOR: rgb(0,0,0); WORD-SPACING: 0px; font-size-adjust: none; font-stretch: normal"
class=ecxApple-style-span><SPAN
style="WIDOWS: 2; TEXT-TRANSFORM: none; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; FONT: 12px Helvetica; WHITE-SPACE: normal; ORPHANS: 2; LETTER-SPACING: normal; COLOR: rgb(0,0,0); WORD-SPACING: 0px; font-size-adjust: none; font-stretch: normal"
class=ecxApple-style-span><SPAN
style="WIDOWS: 2; TEXT-TRANSFORM: none; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; FONT: 12px Helvetica; WHITE-SPACE: normal; ORPHANS: 2; LETTER-SPACING: normal; COLOR: rgb(0,0,0); WORD-SPACING: 0px; font-size-adjust: none; font-stretch: normal"
class=ecxApple-style-span><SPAN
style="WIDOWS: 2; TEXT-TRANSFORM: none; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; FONT: 12px Helvetica; WHITE-SPACE: normal; ORPHANS: 2; LETTER-SPACING: normal; COLOR: rgb(0,0,0); WORD-SPACING: 0px; font-size-adjust: none; font-stretch: normal"
class=ecxApple-style-span><SPAN
style="WIDOWS: 2; TEXT-TRANSFORM: none; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; FONT: 12px Helvetica; WHITE-SPACE: normal; ORPHANS: 2; LETTER-SPACING: normal; COLOR: rgb(0,0,0); WORD-SPACING: 0px; font-size-adjust: none; font-stretch: normal"
class=ecxApple-style-span>
<DIV><FONT class=ecxApple-style-span color=#0000ff><FONT
class=ecxApple-style-span face="Gill Sans"><SPAN
style="FONT-FAMILY: 'Gill Sans'; COLOR: rgb(0,0,255)"
class=ecxApple-style-span><SPAN
style="FONT-FAMILY: 'Gill Sans'; COLOR: rgb(0,0,255)"
class=ecxApple-style-span>Antony Hosking</SPAN></SPAN></FONT></FONT><FONT
class=ecxApple-style-span face="Gill Sans"><SPAN
style="FONT-FAMILY: 'Gill Sans'" class=ecxApple-style-span><SPAN
style="FONT-FAMILY: 'Gill Sans'" class=ecxApple-style-span><SPAN
class=ecxApple-converted-space> </SPAN>|<SPAN
class=ecxApple-converted-space> </SPAN></SPAN></SPAN><SPAN
style="FONT-FAMILY: 'Gill Sans'" class=ecxApple-style-span><SPAN
style="FONT-FAMILY: 'Gill Sans'" class=ecxApple-style-span>Associate
Professor</SPAN></SPAN><SPAN style="FONT-FAMILY: 'Gill Sans'"
class=ecxApple-style-span><SPAN style="FONT-FAMILY: 'Gill Sans'"
class=ecxApple-style-span> | Computer Science | Purdue
University</SPAN></SPAN></FONT></DIV>
<DIV><FONT class=ecxApple-style-span face=GillSans-Light><SPAN
style="FONT-FAMILY: GillSans-Light" class=ecxApple-style-span>305 N. University
Street | West Lafayette | IN 47907 | USA</SPAN></FONT></DIV>
<DIV><FONT class=ecxApple-style-span color=#0000ff face="Gill Sans"><SPAN
style="FONT-FAMILY: 'Gill Sans'; COLOR: rgb(0,0,255)"
class=ecxApple-style-span><SPAN
style="FONT-FAMILY: 'Gill Sans'; COLOR: rgb(0,0,255)"
class=ecxApple-style-span>Mobile</SPAN></SPAN></FONT><FONT
class=ecxApple-style-span face=GillSans-Light><SPAN
style="FONT-FAMILY: GillSans-Light" class=ecxApple-style-span><SPAN
style="FONT-FAMILY: GillSans-Light" class=ecxApple-style-span><SPAN
class=ecxApple-converted-space> </SPAN>+1 765 427
5484</SPAN></SPAN></FONT></DIV>
<DIV><FONT class=ecxApple-style-span face=GillSans-Light><BR
class=ecxkhtml-block-placeholder></FONT></DIV></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN><BR
class=ecxApple-interchange-newline></SPAN></DIV></SPAN></DIV></SPAN><BR
class=ecxApple-interchange-newline></SPAN><BR
class=ecxApple-interchange-newline></DIV><BR></DIV></DIV></BODY></HTML>