[M3devel] cm3 -D order vs. config file?
dirk muysers
dmuysers at hotmail.com
Sun Jun 2 15:43:30 CEST 2019
Trying to compile a minimal program.
My compiler: cm3-min_NT386-d5.10.0-VC2015-20160102
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Users\Dirk>develop
C:\Users\Dirk>cd "c:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools
\VC\Auxiliary\Build
c:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Auxiliary\Buil
d>vcvarsamd64_x86.bat
**********************************************************************
** Visual Studio 2019 Developer Command Prompt v16.0
** Copyright (c) 2019 Microsoft Corporation
**********************************************************************
[vcvarsall.bat] Environment initialized for: 'x64_x86'
c:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Auxiliary\Buil
d>
d>cd %homepath%
c:\Users\Dirk>myproject
c:\Users\Dirk>cd dropbox\projects\test\src
c:\Users\Dirk\Dropbox\projects\test\src>cm3
--- building in ..\NT386 ---
new source -> compiling Main.m3
-> linking Hello.exe
"C:\Users\Public\programs\cm3\bin\config\NT.common", line 1234: quake runtime error:
link failed, see c:\Users\Dirk\Dropbox\projects\test\NT386\Hello.lst for more information
--procedure-- -line- -file---
error -- <builtin>
m3_link 1234 C:\Users\Public\programs\cm3\bin\config\NT.common
program -- <builtin>
include_dir 3 c:\Users\Dirk\Dropbox\projects\test\src\m3makefile
4 c:\Users\Dirk\Dropbox\projects\test\NT386\m3make.args
Fatal Error: procedure "m3_link" defined in "C:\Users\Public\programs\cm3\bin\cm3.cfg" failed.
----------------------- Hello.lst -------------------
Microsoft (R) Incremental Linker Version 14.21.27702.2
Copyright (C) Microsoft Corporation. All rights reserved.
-out:Hello.exe
-subsystem:console
-entry:mainCRTStartup
-nodefaultlib
-debug
-incremental:no
-opt:ref
-delayload:ws2_32.dll
-delayload:advapi32.dll
-delayload:gdi32.dll
-delayload:netapi32.dll
-delayload:user32.dll
-delayload:comctl32.dll
-delayload:rpcrt4.dll
-delayload:iphlpapid.dll
delayimp.lib
_m3main.obj
Main.mo
C:\Users\Public\programs\cm3\pkg\m3core\NT386\m3core.lib
iphlpapi.lib
rpcrt4.lib
winspool.lib
comctl32.lib
ws2_32.lib
comdlg32.lib
netapi32.lib
gdi32.lib
user32.lib
advapi32.lib
kernel32.lib
msvcrt.lib
LINK : warning LNK4199: /DELAYLOAD:ws2_32.dll ignored; no imports found from ws2_32.dll
LINK : warning LNK4199: /DELAYLOAD:advapi32.dll ignored; no imports found from advapi32.dll
LINK : warning LNK4199: /DELAYLOAD:gdi32.dll ignored; no imports found from gdi32.dll
LINK : warning LNK4199: /DELAYLOAD:netapi32.dll ignored; no imports found from netapi32.dll
LINK : warning LNK4199: /DELAYLOAD:user32.dll ignored; no imports found from user32.dll
LINK : warning LNK4199: /DELAYLOAD:comctl32.dll ignored; no imports found from comctl32.dll
LINK : warning LNK4199: /DELAYLOAD:rpcrt4.dll ignored; no imports found from rpcrt4.dll
LINK : warning LNK4199: /DELAYLOAD:iphlpapid.dll ignored; no imports found from iphlpapid.dll
msvcrt.lib(exe_main.obj) : error LNK2019: unresolved external symbol __seh_filter_exe referenced in function "int __cdecl __scrt_common_main_seh(void)" (?__scrt_common_main_seh@@YAHXZ)
msvcrt.lib(exe_main.obj) : error LNK2019: unresolved external symbol __set_app_type referenced in function "int __cdecl pre_c_initialization(void)" (?pre_c_initialization@@YAHXZ)
msvcrt.lib(exe_main.obj) : error LNK2019: unresolved external symbol ___setusermatherr referenced in function "int __cdecl pre_c_initialization(void)" (?pre_c_initialization@@YAHXZ)
msvcrt.lib(exe_main.obj) : error LNK2019: unresolved external symbol __configure_narrow_argv referenced in function "int __cdecl pre_c_initialization(void)" (?pre_c_initialization@@YAHXZ)
msvcrt.lib(utility.obj) : error LNK2001: unresolved external symbol __configure_narrow_argv
msvcrt.lib(exe_main.obj) : error LNK2019: unresolved external symbol __initialize_narrow_environment referenced in function "int __cdecl pre_c_initialization(void)" (?pre_c_initialization@@YAHXZ)
msvcrt.lib(utility.obj) : error LNK2001: unresolved external symbol __initialize_narrow_environment
msvcrt.lib(exe_main.obj) : error LNK2019: unresolved external symbol __get_initial_narrow_environment referenced in function "int __cdecl __scrt_common_main_seh(void)" (?__scrt_common_main_seh@@YAHXZ)
msvcrt.lib(exe_main.obj) : error LNK2019: unresolved external symbol __initterm referenced in function "int __cdecl __scrt_common_main_seh(void)" (?__scrt_common_main_seh@@YAHXZ)
msvcrt.lib(exe_main.obj) : error LNK2019: unresolved external symbol __initterm_e referenced in function "int __cdecl __scrt_common_main_seh(void)" (?__scrt_common_main_seh@@YAHXZ)
msvcrt.lib(exe_main.obj) : error LNK2019: unresolved external symbol _exit referenced in function "int __cdecl __scrt_common_main_seh(void)" (?__scrt_common_main_seh@@YAHXZ)
msvcrt.lib(exe_main.obj) : error LNK2019: unresolved external symbol __exit referenced in function "int __cdecl __scrt_common_main_seh(void)" (?__scrt_common_main_seh@@YAHXZ)
msvcrt.lib(exe_main.obj) : error LNK2019: unresolved external symbol __set_fmode referenced in function "int __cdecl pre_c_initialization(void)" (?pre_c_initialization@@YAHXZ)
msvcrt.lib(exe_main.obj) : error LNK2019: unresolved external symbol ___p___argc referenced in function "int __cdecl __scrt_common_main_seh(void)" (?__scrt_common_main_seh@@YAHXZ)
msvcrt.lib(exe_main.obj) : error LNK2019: unresolved external symbol ___p___argv referenced in function "int __cdecl __scrt_common_main_seh(void)" (?__scrt_common_main_seh@@YAHXZ)
msvcrt.lib(exe_main.obj) : error LNK2019: unresolved external symbol __cexit referenced in function "int __cdecl __scrt_common_main_seh(void)" (?__scrt_common_main_seh@@YAHXZ)
msvcrt.lib(utility.obj) : error LNK2001: unresolved external symbol __cexit
msvcrt.lib(exe_main.obj) : error LNK2019: unresolved external symbol __c_exit referenced in function "int __cdecl __scrt_common_main_seh(void)" (?__scrt_common_main_seh@@YAHXZ)
msvcrt.lib(exe_main.obj) : error LNK2019: unresolved external symbol __register_thread_local_exe_atexit_callback referenced in function "int __cdecl __scrt_common_main_seh(void)" (?__scrt_common_main_seh@@YAHXZ)
msvcrt.lib(exe_main.obj) : error LNK2019: unresolved external symbol __configthreadlocale referenced in function "int __cdecl pre_c_initialization(void)" (?pre_c_initialization@@YAHXZ)
msvcrt.lib(exe_main.obj) : error LNK2019: unresolved external symbol __set_new_mode referenced in function "void __cdecl pre_cpp_initialization(void)" (?pre_cpp_initialization@@YAXXZ)
msvcrt.lib(exe_main.obj) : error LNK2019: unresolved external symbol ___p__commode referenced in function "int __cdecl pre_c_initialization(void)" (?pre_c_initialization@@YAHXZ)
msvcrt.lib(utility.obj) : error LNK2019: unresolved external symbol __seh_filter_dll referenced in function ___scrt_dllmain_exception_filter
msvcrt.lib(utility.obj) : error LNK2019: unresolved external symbol __initialize_onexit_table referenced in function ___scrt_initialize_onexit_tables
msvcrt.lib(utility.obj) : error LNK2019: unresolved external symbol __register_onexit_function referenced in function __onexit
msvcrt.lib(utility.obj) : error LNK2019: unresolved external symbol __execute_onexit_table referenced in function ___scrt_dllmain_uninitialize_c
msvcrt.lib(utility.obj) : error LNK2019: unresolved external symbol __crt_atexit referenced in function __onexit
msvcrt.lib(utility.obj) : error LNK2019: unresolved external symbol __crt_at_quick_exit referenced in function _at_quick_exit
msvcrt.lib(tncleanup.obj) : error LNK2019: unresolved external symbol ___std_type_info_destroy_list referenced in function "void __cdecl __scrt_uninitialize_type_info(void)" (?__scrt_uninitialize_type_info@@YAXXZ)
msvcrt.lib(default_precision.obj) : error LNK2019: unresolved external symbol __controlfp_s referenced in function __initialize_default_precision
msvcrt.lib(utility_desktop.obj) : error LNK2019: unresolved external symbol _terminate referenced in function ___scrt_unhandled_exception_filter at 4
msvcrt.lib(utility_desktop.obj) : error LNK2019: unresolved external symbol _memset referenced in function ___scrt_fastfail
msvcrt.lib(chandler4gs.obj) : error LNK2019: unresolved external symbol __except_handler4_common referenced in function __except_handler4
Hello.exe : fatal error LNK1120: 30 unresolved externals
-----------------------
and that's it.
On 01/06/2019 21:29:21, Jay K <jayk123 at hotmail.com> wrote:
I don’t understand what is the problem?
Why not use the start menu “shortcuts”?
I need to add something to pick x86 vs. amd64?
I might take a crack at a cminstall update.
- Jay
- Jay
________________________________
From: vvm at tut.by <vvm at tut.by>
Sent: Saturday, June 1, 2019 8:30:54 AM
To: dirk muysers; Jay K; M3devel at elegosoft.com
Subject: Re: [M3devel] cm3 -D order vs. config file?
Hi!
> I just will wait for an upcoming NT386 amd64/x86 release.
Why You don't want use instructions from issue #47 ?
Today we should use ( as basis ) Visual Studio 2012 , but the "happy end" is most important?
(
I have both 64bit and 32bit Modula-3 for Windows.
But I don't have info about preferred way to upload this binary files.
)
Best regards, Victor Miasnikov
01.06.2019, 16:46, "dirk muysers" <dmuysers at hotmail.com>:
I have installed the MS Build tools, including Windows Kits.
I read:
...The required environment variables are specific to your installation and to the build architecture you choose, and might be changed by product updates or upgrades. Therefore, we strongly recommend that you use one of the installed command prompt shortcuts or command files instead of setting the environment variables in Windows yourself. For more information, see Set the Path and Environment Variables for Command-Line Builds<https://docs.microsoft.com/en-us/cpp/build/setting-the-path-and-environment-variables-for-command-line-builds?view=vs-2019>...
When I click on Visual Studio 2019>Visual Studio Tools>Developer Command Prompts, in order to inspect the required
environment settings, I get:
"Windows is searching for %comspec%. To locate the file yourself, click Browse", and after one minute, it dies,
Meanwhile when I check "set" I get: COMSPEC=C:\Windows\system32\cmd.exe
I then try Visual Studio Installer => Repair
It downloads more than 300 MB and begins "installing package 1 of 96" etc
After more than half an hour, it asks to restart the system, because of their f...g registry.
Other huge softwares, including OSs manage to update in seconds without restarting.
But this being Microsoft, the worst company in the world,...
Well after yet another 5 minutes, having done the whole tapdance: Result, the same.
Enough is enough.
Had the M3 team completed their compiler by writing their own linker as the Oberon people did, it would have saved them --and us users-- thousands of hours of twiddling, quaking and configuring...
I just will wait for an upcoming NT386 amd64/x86 release.
Sorry for my fit of temper.
On 01/06/2019 06:41:11, Jay K <jayk123 at hotmail.com<mailto:jayk123 at hotmail.com>> wrote:
https://github.com/modula3/cm3/commit/ce4a2b5d2fa352ddac21eb…<https://github.com/modula3/cm3/commit/ce4a2b5d2fa352ddac21ebbc4306e587650ef35f>
Works?
- Jay
________________________________
From: Jay K
Sent: Friday, May 31, 2019 9:38:42 PM
To: dirk muysers
Subject: Re: [M3devel] cm3 -D order vs. config file?
Please, maybe what will be most constructive, open github issue and be detailed? Steps & error messages?
- Jay
________________________________
From: dirk muysers <dmuysers at hotmail.com<mailto:dmuysers at hotmail.com>>
Sent: Friday, May 31, 2019 12:55:39 PM
To: Jay K
Subject: Re: [M3devel] cm3 -D order vs. config file?
The relevance is that the last windows release of the M3 compiler doesn't work with the MS BuildTool 2019 and its associated Windows Kits, so I am not able to compile anymore my M3 code base to x86
excutables on my Win 7 Pro amd64 box. And without a working cm3, I can't even try to adapt its source it to the new configuration.
Visual Studio & Co also has become a more and more unwieldy labyrinth like everything Microsoft.
Unfortunately we cannot do without it, because Windows runs 80% of the world's personal computers, OS X 12% and Linux only 1.5 %. So if you want to produce applications, you better do it for Windows.
On 31/05/2019 20:11:03, Jay K <jayk123 at hotmail.com<mailto:jayk123 at hotmail.com>> wrote:
What is the relevance?
Yes, this was done. There were problems. This should help a lot.
Better than to be unmaintained and stagnant?
- Jay
________________________________
From: dirk muysers <dmuysers at hotmail.com<mailto:dmuysers at hotmail.com>>
Sent: Friday, May 31, 2019 10:32 AM
To: Jay K
Subject: Re: [M3devel] cm3 -D order vs. config file?
At Microsoft they changed ("refactored", so they say) nearly everything lately.
see https://devblogs.microsoft.com/cppblog/introducing-the-unive…<https://devblogs.microsoft.com/cppblog/introducing-the-universal-crt/>
On 31/05/2019 11:57:22, Jay K <jayk123 at hotmail.com<mailto:jayk123 at hotmail.com>> wrote:
%
% Unfortunately, command line defines are not currently
% available to the toplevel cm3.cfg.
%
This seems really broken to me.
At least from a Windows point of view.
So you can't say easy things like:
cm3 -DTARGET=AMD64_NT -DROOT=c:/s/cm3
Instead you have to, environment instead:
set CM3_TARGET=x
set CM3_ROOT=y
cm3
or Unix not as bad, somewhat more isomorphic:
CM3_TARGET=x CM3_ROOT=y cm3
Ok if I try to fix it?
I thought I had.
Maybe I was using an old build to bootstrap..
- Jay
_______________________________________________
M3devel mailing list
M3devel at elegosoft.com<mailto:M3devel at elegosoft.com>
https://m3lists.elegosoft.com/mailman/listinfo/m3devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://m3lists.elegosoft.com/pipermail/m3devel/attachments/20190602/844d04c2/attachment-0001.html>
More information about the M3devel
mailing list