Discussion:
ADW compiler errors
(too old to reply)
Rob Solomon
2020-12-05 23:44:24 UTC
Permalink
Hi. After a disk crash, I had to reinstall all of my software. After
reinstalling the ADW M2 compiler, I cannot get it to link programs.
This is on a win10 computer running lastest update, 20H2 IIRC.

The error I'm getting from the linker is:
The following are undefined symbols
WIN32_$InitCode
WINUSER_$InitCode

Why are these now undefined? They're part of the code provided by
ADW.
Brian Knoblauch
2020-12-06 13:48:10 UTC
Permalink
Interesting. I've been fighting with an issue where I can only get old projects to compile and run properly with ADW at this time. New projects will not. My symptoms are different though as the code compiles and links, but at runtime just does not do what it should. I'm also on 20H2, but it was an upgrade from prior versions rather than fresh install.

I have uninstalled and reinstalled ADW with no changes. I've run the failing projects and the working projects in the debugger, copied/pasted simple code back and forth and it's definitely based on if it's a new project or one of my pre-existing ones. The code in the debugger actually looks the same. Tracing through it though, where it CALLs in the libraries the old compiled projects actually work and the new ones just come back with nothing having happened (no error code, just no work done).

Complicating my issue is that all this old projects were with a prior version of ADW... I had not started a new project in years, so I have a lot more variables to troubleshoot. :-/ I've been hoping to find someone that has a stash of old ADW versions so I could go back and see if there is a bug only impacting new projects with it. However, your post makes me think it's more likely a buggy Windows update.
Rob Solomon
2020-12-06 16:22:56 UTC
Permalink
On Sun, 6 Dec 2020 05:48:10 -0800 (PST), Brian Knoblauch
Post by Brian Knoblauch
Interesting. I've been fighting with an issue where I can only get old projects to compile and run properly with ADW at this time. New projects will not. My symptoms are different though as the code compiles and links, but at runtime just does not do what it should. I'm also on 20H2, but it was an upgrade from prior versions rather than fresh install.
I have uninstalled and reinstalled ADW with no changes. I've run the failing projects and the working projects in the debugger, copied/pasted simple code back and forth and it's definitely based on if it's a new project or one of my pre-existing ones. The code in the debugger actually looks the same. Tracing through it though, where it CALLs in the libraries the old compiled projects actually work and the new ones just come back with nothing having happened (no error code, just no work done).
Complicating my issue is that all this old projects were with a prior version of ADW... I had not started a new project in years, so I have a lot more variables to troubleshoot. :-/ I've been hoping to find someone that has a stash of old ADW versions so I could go back and see if there is a bug only impacting new projects with it. However, your post makes me think it's more likely a buggy Windows update.
Reading your post gave me an idea. I'll create a virtual machine of
an old windows iso file I have. I just looked, I have iso files of
win2k, winxp, vista, win7 and earlier versions of win10.

I also checked, and I have earlier versions of ADW M2, going back to
2016. I nuked my current ADW M2, and installed an earlier version.
That didn't make any difference.

I wonder if there is a way to contact the developers of ADW and ask
their advice?

--rob solomon
Brian Knoblauch
2020-12-06 20:02:10 UTC
Permalink
Post by Rob Solomon
I wonder if there is a way to contact the developers of ADW and ask
their advice?
It says no support is given, but I did put a short entry on the feedback form just in case it was a known issue and perhaps an older version might be available I could use. Also, trijezdci said he would attempt to pass along the information I had given him (from a discussion a week or so ago) to ADW. If I hear anything, I'll be sure to pass it along.

Would also love to hear the results of your version experiments. I'm on a rather tight data cap with my Internet connection, so how many things I can install/update/etc is pretty limited...

--Brian
Rob Solomon
2020-12-06 23:33:11 UTC
Permalink
On Sun, 6 Dec 2020 12:02:10 -0800 (PST), Brian Knoblauch
<***@glmotorsports.net> wrote:

I created a VM of winxp, and was able to run the original Stony Brook
M2 development system in that. It works.
I created a VM of vista, and installed the latest ADW M2 from 2019.
That works.

As long as I have something that works, I'm ok for now.

It does suggest that Windows is what changed and broke ADW M2.
Brian Knoblauch
2020-12-08 12:20:37 UTC
Permalink
Post by Rob Solomon
I created a VM of winxp, and was able to run the original Stony Brook
M2 development system in that. It works.
I created a VM of vista, and installed the latest ADW M2 from 2019.
That works.
Good info. I'm trying to get XDS working right now. Maybe I'll dig around here for my old Windows disks and circle back to ADW next month.
Rob Solomon
2020-12-09 01:26:55 UTC
Permalink
On Tue, 8 Dec 2020 04:20:37 -0800 (PST), Brian Knoblauch
Post by Brian Knoblauch
Post by Rob Solomon
I created a VM of winxp, and was able to run the original Stony Brook
M2 development system in that. It works.
I created a VM of vista, and installed the latest ADW M2 from 2019.
That works.
Good info. I'm trying to get XDS working right now. Maybe I'll dig around here for my old Windows disks and circle back to ADW next month.
I have now created VM using my Win7 64 bit iso, and Win10 1809 iso.
ADW M2 does not work on these; giving the error regarding needing to
compile WIN32 and WINUSER

But Vista works. I'm now lead to believe that when upgrading from
vista -> win7 -> win10 until 20.04, whatever allowed ADW to work under
vista was carried thru to the later windows versions, until 20.04
broke it.
Inistalling fresh Win7 or Win10 firom their respective iso files
results in a system that will not run ADW.

"Fascinating"

--rob solomon
Brian Knoblauch
2020-12-10 00:36:24 UTC
Permalink
But Vista works. I'm now lead to believe that when upgrading from
vista -> win7 -> win10 until 20.04, whatever allowed ADW to work under
vista was carried thru to the later windows versions, until 20.04
broke it.
Inistalling fresh Win7 or Win10 firom their respective iso files
results in a system that will not run ADW.
Good info, thanks for doing all that work! I really love the ADW environment, I hope we get an updated version that can workaround whatever broke.
John Dillon
2021-04-27 15:50:54 UTC
Permalink
But Vista works. I'm now lead to believe that when upgrading from
vista -> win7 -> win10 until 20.04, whatever allowed ADW to work under
vista was carried thru to the later windows versions, until 20.04
broke it.
Inistalling fresh Win7 or Win10 firom their respective iso files
results in a system that will not run ADW.
Good info, thanks for doing all that work! I really love the ADW environment, I hope we get an updated version that can workaround whatever broke.
Hi everyone,

I started messing about with this ADW compiler, having last used Modula2 a "very" long time ago ....!
I saw that there was a recent build of this so I downloaded it and tried to compile the samples given on on the website. They all worked on Win10 so - fantastic!
Except when I tried to create my own "New Project" for a simple hello world program - it would compile fine and give no errors but just not run.

I concluded it had to be something to do with the project(file) itself and then after much trawling the net I came across this helpful page:
https://twu.seanho.com/05fall/cmpt14x/stonybrook/
Check the unchecked checkbox in win32 tab on Linker options.

One less headache. Hope it helps someone.

JD.
Brian Knoblauch
2021-04-27 21:09:55 UTC
Permalink
Post by John Dillon
Except when I tried to create my own "New Project" for a simple hello world program - it would compile fine and give no errors but just not run.
https://twu.seanho.com/05fall/cmpt14x/stonybrook/
Check the unchecked checkbox in win32 tab on Linker options.
One less headache. Hope it helps someone.
BIG help! After reading your post I started a new AMD64 program project, went into the Win32 Linker options and checked the console checkbox, and it solved my issue! So, despite the fact that I'm building 64 bit, the 32-bit linker tab needs to be checked for appropriate settings. Don't know how I never thought to check that, but it's great to be able to use ADW again. Nothing against XDS (32-bit only) which I've been using in the meantime, but since I'm on a 64-bit OS, I'd rather compile 64-bit!
rob
2021-04-28 23:19:54 UTC
Permalink
On Tue, 27 Apr 2021 14:09:55 -0700 (PDT), Brian Knoblauch
Post by Brian Knoblauch
Post by John Dillon
Except when I tried to create my own "New Project" for a simple hello world program - it would compile fine and give no errors but just not run.
https://twu.seanho.com/05fall/cmpt14x/stonybrook/
Check the unchecked checkbox in win32 tab on Linker options.
One less headache. Hope it helps someone.
BIG help! After reading your post I started a new AMD64 program project, went into the Win32 Linker options and checked the console checkbox, and it solved my issue! So, despite the fact that I'm building 64 bit, the 32-bit linker tab needs to be checked for appropriate settings. Don't know how I never thought to check that, but it's great to be able to use ADW again. Nothing against XDS (32-bit only) which I've been using in the meantime, but since I'm on a 64-bit OS, I'd rather compile 64-bit!
Not for me. My code uses the TextWindows module. It compiles but
still fails to link, saying I have undefined symbols from WINUSER and
WIN32, both are part of the Windows interface
Brian Knoblauch
2021-05-28 18:54:25 UTC
Permalink
Not for me. My code uses the TextWindows module. It compiles but
still fails to link, saying I have undefined symbols from WINUSER and
WIN32, both are part of the Windows interface
I see that the latest ADW update was posted to modula2.org just a few days ago. Have you had a chance to grab it and give it a try yet?
Robert Solomon
2021-05-29 13:29:26 UTC
Permalink
Not for me. My code uses the TextWindows module. It compiles but still fails to link, saying I have undefined symbols from WINUSER and
WIN32, both are part of the Windows interface
I see that the latest ADW update was posted to modula2.org just a few days ago. Have you had a chance to grab it and give it a try yet?
I did, and it does not work, either. I do not see a version that is later than Mar 8, 2021. I tried that before I posted in April.

Still no-go

--rob
Chris Burrows
2021-05-30 00:17:00 UTC
Permalink
Not for me. My code uses the TextWindows module. It compiles but still fails to link, saying I have undefined symbols from WINUSER and
WIN32, both are part of the Windows interface
I see that the latest ADW update was posted to modula2.org just a few days ago. Have you had a chance to grab it and give it a try yet?
I did, and it does not work, either. I do not see a version that is later than Mar 8, 2021. I tried that before I posted in April.
Still no-go
--rob
Have you tried checking the 'Allow undefined symbols' in Linker Options > Main?
Robert Solomon
2021-05-30 16:21:16 UTC
Permalink
Post by Chris Burrows
Not for me. My code uses the TextWindows module. It compiles but still fails to link, saying I have undefined symbols from WINUSER and WIN32, both are part of the Windows interface
I see that the latest ADW update was posted to modula2.org just a few days ago. Have you had a chance to grab it and give it a try yet?
I did, and it does not work, either. I do not see a version that is later than Mar 8, 2021. I tried that before I posted in April.
Still no-go
Have you tried checking the 'Allow undefined symbols' in Linker Options > Main?
still no-go. Now an .exe is created, but does nothing when I try to run it.

I noticed that the behavior of the M2 environment is different. Back in the day, I would install it, and upon first opening it would compile it's run time library. Stonybrook's would do that (and still does) in my VM of WinXP. This is working for me.

It doesn't do that now under Win10. Every time I open the ADW environment (ASCII in my case), it remains on the sources of the runtime library, and it seems to be expecting me to do something.

Not knowing what to do, I click on the compile all button. That compiles all, AFAICT. I do that for each of the 4 choices, ie, rtl-win-amd64, rtl-win-ia32, rtldll-win-amd64 and rtldll-win-ia32.

I have no idea if that's what it expects me to do, or even if it is expecting me to do anything.

My code compiles, but fails to link. Either I get the undefined symbols from WINUSER and WIN32, or sometimes I get an error saying that i need to compile WINUSER.

It still does not work for me on Win10, now at 21H1

--rob
Brian Knoblauch
2021-05-30 21:34:18 UTC
Permalink
Post by Chris Burrows
Have you tried checking the 'Allow undefined symbols' in Linker Options > Main?
still no-go. Now an .exe is created, but does nothing when I try to run it.
Ah, that's the problem I was having originally. Did you also go check the Win32 Console checkbox for the linker? That was the resolution for me when I was getting the EXE that did nothing.

--Brian
Robert Solomon
2021-05-31 16:26:43 UTC
Permalink
Post by Chris Burrows
Have you tried checking the 'Allow undefined symbols' in Linker Options > Main?
still no-go. Now an .exe is created, but does nothing when I try to run it.
Ah, that's the problem I was having originally. Did you also go check the Win32 Console checkbox for the linker? That was the resolution for me when I was getting the EXE that did nothing.
--Brian
When I was writing console apps, I would need to check that box. Whenever I would get the behavior in a console app that seemed to do nothing, I would know I forgot to check that box.

This isn't a console app.
Brian Knoblauch
2022-01-25 12:04:41 UTC
Permalink
Hey Rob, I see there's a new version of ADW out now (as of 1/22) at https://www.modula2.org/adwm2/. If you didn't get this issue resolved prior to that, have you tried this latest version?

--Brian
Robert Solomon
2022-01-29 19:40:21 UTC
Permalink
I just tried it. I'm still getting this error when I try to link:
Imported modules need compilation:
IMP WIN32
IMP WINUSER

So, that would be "no"
--rob
Hey Rob, I see there's a new version of ADW out now (as of 1/22) at https://www.modula2.org/adwm2/. If you didn't get this issue resolved prior to that, have you tried this latest version?
--Brian
Loading...