[M3devel] CM3 on windows
Jay K
jay.krell at cornell.edu
Fri Aug 28 07:03:58 CEST 2009
Yes NT386GNU uses X.
Olaf expressed an interest in that.
Apparently the Windows port of Trestle has never been completed.
(I suspect we should punt Trestle and bind to Qt, but that is another matter.)
NT386GMINGNU doesn't use X.
Though it had problems last I checked.
NT386GNU I think also uses pthreads.
And NT386MINGNU does not.
The names should be I386_CYGWIN and I386_MINGW.
There are few variables, and they are largely but not completely independent of each other:
Which cm3 backend, integrated or gcc?
Which C compiler, Visual C++ or gcc? (or Watcom or Borland, etc.)
Which linker, same choices as previous.
Win32 or Posix?
In terms of path syntax. fork/exec vs. CreateProcess.
Which threading library?
Which windowing library?
NT386GNU aka I386_CYGWIN is "very Posix".
NT386MINGNU is totally Win32, except that the compiler backend is gcc.
Oh and maybe the compiler/linker are gcc/GNU ld also.
In future I expect to rename the platforms to I386_CYGWIN and I386_MINGW, and I386_NT (NT386)).
There was good evicence that the gcc backend has never been used to target Win32 GUI.
In particular there wasn't support for __stdcall, and the support is still broken in an usual case.
I put in a workaround.
- Jay
----------------------------------------
> To: jay.krell at cornell.edu
> CC: m3devel at elegosoft.com
> Subject: Re: CM3 on windows
> Date: Thu, 27 Aug 2009 21:50:55 -0700
> From: mika at async.async.caltech.edu
>
> Jay K writes:
>>
>>NT386GNU =3D> Do you have an X Windows server?
>
> Hmm, really, NT386GNU just uses X? I could swear my ancient
> Klagenfurt/PM3 uses Windows windows, not X...
>
>>Compiler -- I meant the C compiler.
>
> As far as I know the compiler I'm using is "cl" that came with VC++ 8.0 ("2003"?)
>
>>=20
>>=20
>>set show:
>> set LIB
>> set PATH
>> set INCLUDE
>>=20
>>=20
>>and then among the directories in LIB=2C and your cm3 install\lib=2C where =
>>is kernel32.lib? Where is winspool.lib?
>
> kernel32 is in
>
> ...Visual Studio 8\VC\lib
>
> aha.. I think the only winspool I have is in C:\cm3, and that directory is
> not in LIB.
>
> That would explain why things aren't compiling, but not why I get the errors
> in mentor, Juno, etc.
>
>
>>=20
>>Cm3 has its own=2C but for /almost/ no good reason.
>> Older cm3 had its own modified ones for reasons related to the VM-sychroni=
>>zed GC.
>> If you were to keep those around=2C they wouldn't work any longer -- proba=
>>bly fail to link.
>> So current cm3 replaces them.
>> As well=2C some much less usual toolsets=2C such as the Visual C++ 2003 Ex=
>>press or somesuch=2C which isn't available any longer=2C only included a C =
>>runtime and no kernel32.lib=2C user32.lib=2C winspool.lib=2C etc. So we pro=
>>vide them for such users. Perhaps we should 1) assume a new clean install=
>>=2C no old cm3 .libs 2) not support that one odd toolset -- heck=2C we can =
>>keep the import-libs directory=2C just remove it from any package set=2C an=
>>d any such users can build it themselves.
>>=20
>>=20
>>Long story short: normally among the directories in %LIB%=2C you should fin=
>>d kernel32.lib=2C msvcrt.lib=2C winspool.lib=2C user32.lib=2C gdi32.lib=2C =
>>comctl32.lib=2C etc.
>>=20
>>=20
>>Windows 2000=2C really?
>>Plan to upgrade to XP or newer any time soon?
>
> Wasn't planning on it.. I try to use Windows as little as possible.. but if
> it's necessary to get CM3 working..
>
> I should mention that my goal is actually to build .exes that can be
> distributed to people with Vista. Is that possible with my system?
>
> Mika
>
>>=20
>>=20
>> - Jay
>>
>>
>>----------------------------------------
>>> To: jay.krell at cornell.edu
>>> CC: m3devel at elegosoft.com
>>> Subject: Re: CM3 on windows
>>> Date: Thu=2C 27 Aug 2009 21:27:15 -0700
>>> From: mika at async.async.caltech.edu
>>>
>>> Jay K writes:
>>>>
>>>>> Compiling in the CMD window fails>> at a link (can't find winspool.lib)=
>>=3D
>>>>=3D3D2C and the binaries have problems
>>>>
>>>>=3D20
>>>>Where is it getting kernel32.lib?
>>>> c:\cm3\lib?
>>>> %LIB%?
>>>>What is your compiler/linker?
>>>>What are the "problems"?
>>>
>>> I installed Visual C++ Express Edition 8.0.
>>>
>>> It appears to use "link.exe" (not the Cygwin one=2C but a Windows one) as=
>> linker.
>>>
>>> Compiler... cm3??
>>>
>>> The "problems" are mentioned in my email (scroll down a bit... mentor=2C =
>>Juno=2C ...)
>>>
>>> I tried NT386GNU as well=2C which does let me do text mode applications b=
>>ut crashes
>>> if I try to open a window. "TrestleComm.Failure"
>>>
>>> I have to warn you I am a *complete* novice when it comes to programming =
>>in
>>> Windows...
>>>
>>> Mika
>>>
>>>>=3D20
>>>>=3D20
>>>> - Jay
>>>>
>>>>
>>>>
>>>>----------------------------------------
>>>>> To: jay.krell at cornell.edu
>>>>> CC: m3devel at elegosoft.com
>>>>> Subject: Re: CM3 on windows
>>>>> Date: Thu=3D2C 27 Aug 2009 20:40:57 -0700
>>>>> From: mika at async.async.caltech.edu
>>>>>
>>>>> Jay K writes:
>>>>>>
>>>>>>I fixed the access on 5.8.2.
>>>>>>Try that?
>>>>>>I can poke around..
>>>>>>=3D3D20
>>>>>>As I recall 5.8.1 used VC 8.0 and 5.8.2 used 9.0.
>>>>>>If that helps.
>>>>>
>>>>> Well I can try but I don't think 9.0 works on Win2k...
>>>>>
>>>>>>=3D3D20
>>>>>> - Jay
>>>>>>
>>>>>>
>>>>>>----------------------------------------
>>>>>>> To: m3devel at elegosoft.com=3D3D3B jay.krell at cornell.edu
>>>>>>> CC: mika at async.caltech.edu
>>>>>>> Subject: CM3 on windows
>>>>>>> Date: Thu=3D3D2C 27 Aug 2009 19:01:44 -0700
>>>>>>> From: mika at async.async.caltech.edu
>>>>>>>
>>>>>>> Hi m3devel=3D3D2C
>>>>>>>
>>>>>>> Not sure if my earlier message today went anywhere. I never saw it on
>>>>>>> the list.
>>>>>>>
>>>>>>> I'd like to try running CM3 on Windows 2000=3D3D2C so I've downloaded
>>>>>>>
>>>>>>> http://www.opencm3.com/uploaded-archives/cm3-std-NT386-d5.8.1.msi
>>>>>>>
>>>>>>> (5.8.2 didn't work---no access).
>>>>>>>
>>>>>>> Having installed it as well as I can figure=3D3D2C following the dire=
>>ctio=3D
>>>>ns a=3D3D
>>>>>>t
>>>>>>>
>>>>>>> http://www.opencm3.com/installation-windows.html
>>>>>>>
>>>>>>> I don't really seem to get all the way. Compiling in the CMD window f=
>>ai=3D
>>>>ls
>>>>>>> at a link (can't find winspool.lib)=3D3D2C and the binaries have prob=
>>lems=3D
>>>>.
>>>>>>>
>>>>>>> Funnily enough=3D3D2C WebScape seems to work (as well or poorly as an=
>>ywhe=3D
>>>>re e=3D3D
>>>>>>lse)=3D3D2C
>>>>>>> but mentor and Juno both fail miserably:
>>>>>>>
>>>>>>>
>>>>>>> mika at scruff /cygdrive/c/cm3/bin
>>>>>>> $ ./mentor
>>>>>>>
>>>>>>>
>>>>>>> ***
>>>>>>> *** runtime error:
>>>>>>> *** Attempt to reference an illegal memory location.
>>>>>>> *** pc =3D3D3D 0x1061634 =3D3D3D GetAttributes + 0x179 in ..\src\lego=
>>\WIN32=3D
>>>>\Scrol=3D3D
>>>>>>lerVBTCl
>>>>>>> ass.m3
>>>>>>> ***
>>>>>>>
>>>>>>> Stack trace:
>>>>>>> FP PC Procedure
>>>>>>> --------- --------- -------------------------------
>>>>>>> 0x30af668 0x6a6e4d SystemError + 0x66 in ..\src\runtime\NT386\RTSigna=
>>l.=3D
>>>>m3
>>>>>>> 0x30af70c 0x1061634 GetAttributes + 0x179 in ..\src\lego\WIN32\Scroll=
>>er=3D
>>>>VB=3D3D
>>>>>>TClas
>>>>>>> s.m3
>>>>>>> 0x30af7e4 0x10993d8 AddView + 0x101e(!) in ..\src\lego\ViewportVBT.m3
>>>>>>> 0x30af830 0x109743e Init + 0x30e in ..\src\lego\ViewportVBT.m3
>>>>>>> 0x30af950 0x1004ee0 pViewport + 0x512 in ..\src\FormsVBT.m3
>>>>>>> 0x30af9b0 0xff33df Item + 0x48b in ..\src\FormsVBT.m3
>>>>>>> 0x30af9dc 0x1010f66 OneChild + 0xf8 in ..\src\FormsVBT.m3
>>>>>>> 0x30afae4 0xff7448 pShape + 0x19c in ..\src\FormsVBT.m3
>>>>>>> 0x30afb44 0xff33df Item + 0x48b in ..\src\FormsVBT.m3
>>>>>>> 0x30afb70 0x1010f66 OneChild + 0xf8 in ..\src\FormsVBT.m3
>>>>>>> ......... ......... ... more frames ...
>>>>>>>
>>>>>>> mika at scruff /cygdrive/c/cm3/bin
>>>>>>> $ ./Juno
>>>>>>>
>>>>>>>
>>>>>>> ***
>>>>>>> *** runtime error:
>>>>>>> *** failed.
>>>>>>> *** file "..\src\winvbt\WinContext.m3"=3D3D2C line 165
>>>>>>> ***
>>>>>>>
>>>>>>> Stack trace:
>>>>>>> FP PC Procedure
>>>>>>> --------- --------- -------------------------------
>>>>>>> 0x1b6f854 0xea1e03 PushPixmap + 0x4cb in ..\src\winvbt\WinContext.m3
>>>>>>> 0x1b6f91c 0xeb10c7 PixmapCom + 0x9ed in ..\src\winvbt\WinPaint.m3
>>>>>>> 0x1b6fd78 0xeaedaf PaintBatch + 0x25f in ..\src\winvbt\WinPaint.m3
>>>>>>> 0x1b6fde4 0xea91f3 PaintBatchVBT + 0x13f in ..\src\winvbt\WinTrestle.=
>>m3
>>>>>>> 0x1b6fe2c 0xea7919 WindowProc + 0x763 in ..\src\winvbt\WinTrestle.m3
>>>>>>> 0x1b6fe4c 0x77e3a454=3D3D20
>>>>>>> 0x1b6fed8 0x77e14605=3D3D20
>>>>>>> 0x1b6ff30 0x77e15b77=3D3D20
>>>>>>> 0x1b6ff88 0x4fb015 RunThread + 0x234 in ..\src\thread\WIN32\ThreadWin=
>>32=3D
>>>>.m=3D3D
>>>>>>3
>>>>>>> 0x1b6ffb4 0x4fad57 ThreadBase + 0x3a in ..\src\thread\WIN32\ThreadWin=
>>32=3D
>>>>.m=3D3D
>>>>>>3
>>>>>>> ......... ......... ... more frames ...
>>>>>>>
>>>>>>> mika at scruff /cygdrive/c/cm3/bin
>>>>>>> $
>>>>>>>
>>>>>>> This is running from the cygwin shell but it doesn't do anything diff=
>>er=3D
>>>>en=3D3D
>>>>>>t
>>>>>>> from CMD...
>>>>>>>
>>>>>>> Should I not expect to be able to get this to work?
>>>>>>>
>>>>>>> Mika=3D3D=3D=
More information about the M3devel
mailing list