[M3devel] Trouble installing cm3 compiler

marco.barentsz at bt.com marco.barentsz at bt.com
Tue Jul 31 17:32:57 CEST 2018


Hi,
I don't really know where to start, but I just can't get any modula-3 example code compiled/build.
http://www.opencm3.net/installation-windows.html
So that's where I start and I am just trying to follow that.
But the hello.m3 program I already can not compile.
Now that has most likely to do with the C compiler backends that I have installed.

-          Microsoft (R) C/C++ Optimizing Compiler Version 19.14.26431 for x86

-          gcc version 7.3.0 (Rev2, Built by MSYS2 project), i686-w64-mingw32
I have this version of cm3 installed: cm3-min-WIN32-NT386-d5.5.0.zip in c:\cm3
I have cloned the latest github repository in c:\projects\modula3.
I started a command prompt
Added the path to c:\cm3\bin
Executed batch file vcvars32.bat to get the C compiler setup.

When I try compiling the hello.m3 program i get the following error.

C:\projects\modula3\cm3\scratch\hello>cm3
--- building in NT386 ---

-> linking prog.exe
link @C:\Users\701314~1\AppData\Local\Temp\qk > prog.lst
"c:\cm3\bin\cm3.cfg", line 455: quake runtime error: link failed, see C:\project
s\modula3\cm3\scratch\hello\NT386\prog.lst for more information


--procedure--  -line-  -file---
error              --  <builtin>
m3_link           455  c:\cm3\bin\cm3.cfg
program            --  <builtin>
                    6  C:\projects\modula3\cm3\scratch\hello\NT386\m3make.args


Fatal Error: procedure "m3_link" defined in "c:\cm3\bin\cm3.cfg" failed.

>From that point on I am lost.
I hope someone can point me in the right direction and help  me in setting up my modula3 environment.

Below the linker output:

Microsoft (R) Incremental Linker Version 14.14.26431.0
Copyright (C) Microsoft Corporation.  All rights reserved.

/out:prog.exe
/subsystem:console
/entry:mainCRTStartup
/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
_m3main.obj
Hello.mo
c:\cm3\pkg\libm3\NT386\m3.lib
c:\cm3\pkg\m3core\NT386\m3core.lib
winspool.lib
comctl32.lib
wsock32.lib
comdlg32.lib
netapi32.lib
gdi32.lib
user32.lib
advapi32.lib
kernel32.lib
msvcrt.lib
LINK : warning LNK4199: /DELAYLOAD:wsock32.dll ignored; no imports found from wsock32.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
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
prog.exe : fatal error LNK1120: 30 unresolved externals




Kind Regards,

Marco Barentsz


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://m3lists.elegosoft.com/pipermail/m3devel/attachments/20180731/a0a4888b/attachment.html>


More information about the M3devel mailing list