[m-rev.] diff: implement io__set_environment_variable for .NET

Peter Ross pro at missioncriticalit.com
Mon Nov 4 21:55:56 AEDT 2002


On Sat, Nov 02, 2002 at 05:07:15PM +1100, Fergus Henderson wrote:
> library/Mmakefile:
> 	A tweak needed to get things to link properly after the above
> 	change to io.m.
> 
I am not so sure about this change, my nightly install of .NET now falls
over with this error message

cl -CLR -AI`cygpath -w ../runtime` -I`cygpath -w ../runtime` -I"C:\cygwin\include"  \
        -I`cygpath -w //dotnet/usr/local/mercury-latest/lib/mercury/inc` \
        -AI`cygpath -w //dotnet/usr/local/mercury-latest/lib/mercury/lib/il/i686-pc-cygwin` io__cpp_code.cpp \
        -link -noentry mscoree.lib -dll /link /noassembly -out:io__cpp_code.dll
Microsoft (R) C/C++ Optimizing Compiler Version 13.00.9466 for .NET
Framework
Copyright (C) Microsoft Corporation 1984-2001. All rights reserved.

io__cpp_code.cpp
Microsoft (R) Incremental Linker Version 7.00.9466
Copyright (C) Microsoft Corporation.  All rights reserved.

/out:io__cpp_code.exe
-noentry
mscoree.lib
-dll
/link
/noassembly
-out:io__cpp_code.dll
io__cpp_code.obj
LINK : warning LNK4044: unrecognized option '/link'; ignored
LIBCMT.lib(crt0.obj) : error LNK2019: unresolved external symbol _main
reference
d in function _mainCRTStartup
io__cpp_code.dll : fatal error LNK1120: 1 unresolved externals
make[1]: *** [io__cpp_code.dll] Error 2
make[1]: Leaving directory `/home/petdr/tests/mercury/stage2/library'
Cleaning up from apparent failed install in `./boehm_gc'...
Done.
Cleaning up from apparent failed install in `./browser'...
Done.
Cleaning up from apparent failed install in `./library'...
Done.
Cleaning up from apparent failed install in `./runtime'...
Done.
Cleaning up from apparent failed install in `./trace'...
Done.
make: *** [install_grades] Error 1


> Index: Mmakefile
> ===================================================================
> RCS file: /home/mercury1/repository/mercury/library/Mmakefile,v
> retrieving revision 1.99
> diff -u -d -u -r1.99 Mmakefile
> --- Mmakefile	2 Nov 2002 06:07:07 -0000	1.99
> +++ Mmakefile	2 Nov 2002 06:08:42 -0000
> @@ -212,7 +212,11 @@
>  
>  	# -AI sets the assembly search path (just like -I for assemblies)
>  MS_CLFLAGS  =	-AI`$(FIX_PATH_FOR_CL) $(RUNTIME_DIR)` -I`$(FIX_PATH_FOR_CL) $(RUNTIME_DIR)` $(DEBUG_MS_CLFLAGS)
> -MS_CL_NOASM=:noAssembly
> +# For some reason, using /clr:noAssembly results in a link error when
> +# building io__cpp_code.dll, because it doesn't link in the native library
> +# needed for putenv().  So we need to use /link /noassembly instead.
> +# MS_CL_NOASM=:noAssembly
> +MS_CL_LIBS=/link /noassembly
>  MS_CSCFLAGS=/t:module $(DEBUG_MS_CSCFLAGS)
>  MS_ILASMFLAGS=$(DEBUG_MS_ILASMFLAGS)
>  
--------------------------------------------------------------------------
mercury-reviews mailing list
post:  mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the reviews mailing list