dotgnu-general
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Mercury ILDasming was ([DotGNU]Mercury on Portable.NET (not successf


From: James Michael DuPont
Subject: Re: Mercury ILDasming was ([DotGNU]Mercury on Portable.NET (not successful))
Date: Mon, 3 Mar 2003 09:10:58 +0100 (CET)

 --- Fergus Henderson <address@hidden> schrieb: > On 02-Mar-2003,
James Michael DuPont <address@hidden> wrote:
> > I get only these errors :
> > address@hidden@?$AA@ : multiply defined
> 
> This one is a definition which is generated by MSVC++.Net for a C
> string
> literal (the empty string, as it happens) which is used in two
> different
> C++ files in the Mercury standard library sources.

OK, i renamed the second instance. and this is ok.


> 
> > _fltused : multiply defined
> 
> This one is because the Mercury compiler emits
> 
>       extern "C" int _fltused=0;
> 
> in every C++ file that we generate.
> 
> In both of these cases, it works fine if each file is compiled to its
> own
> DLL, because each DLL has its own scope, but naturally you will get
> multiple
> definition errors if you try to link them all into a single
> executable.
> 
> The reason why we made the Mercury compiler emit definitions of
> `_fltused' was to work around a bug in early beta versions of
> MSVC++.NET.
> It is probably not needed anymore.  I will test this and if it is not
> needed I will modify the Mercury compiler to not emit those anymore.

ok. 
This perl snippet does the job.
# perl -i.bak -pn clean.pl *.dll.il 
my $str=q[.field public static int32 '_fltused'];
s;$str;//REM $str;g;

> The use of C string literals is also unnecessary and undesirable --
> all we are using them for is to construct .NET strings, so we might
> as well use the .NET string literal syntax (S"..."), rather than
> using C string literals and then converting them to .NET strings.
> I think that too was originally done to work around a bug in an early
> beta version of MSVC++.NET.  I will modify the Mercury standard
> library
> sources to avoid that.
ok
rhys will have to help you with that.

> 
> > a.out.exe: no entry point specified
> 
> The entry point should be hello.mercury_code.main_2;
> it is in hello.exe in the original.
> 
> I think the problem here is just that in your script
> 
> >     echo 'ildasm -q $1 > $1.il' > dasm.sh 
> >     for x in *.dll; do sh ./dasm.sh $x; done
> >     for x in *.dll.il; do ilasm $x; done
> >     ilalink  *.dll.obj
> 
> you missed the ".exe" file.  It should be
> 
>       echo 'ildasm -q $1 > $1.il' > dasm.sh 
>       for x in *.exe *.dll; do sh ./dasm.sh $x; done
>       for x in *.exe.il *.dll.il; do ilasm $x; done
>       ilalink  *.exe.obj *.dll.obj
Thanks!
Here are the unresolved namespaces : 
Diagnostics
VisualC
-----------------------------------
these seem to be from the cpp_code,
array__cpp_code
builtin__cpp_code
exception__cpp_code
private_builtin__cpp_code
profiling_builtin__cpp_code
std_util__cpp_code
table_builtin__cpp_code
------------------------------------------------------

token 0x0A000003: member
`mercury.array__cpp_code.mercury_code.special___Unify___array_1_0' not
found
token 0x0A000006: member
`Microsoft.VisualC.DebugInfoInPDBAttribute..ctor' not found
token 0x0A00000E: member
`mercury.builtin__cpp_code.mercury_code.special___Compare___c_pointer_0_0'
not found
token 0x0A00000F: member
`mercury.builtin__cpp_code.mercury_code.special___Unify___c_pointer_0_0'
not found
token 0x0A000010: member
`mercury.builtin__cpp_code.mercury_code.compare_representation_3' not
found
token 0x0A00001B: member
`mercury.exception__cpp_code.mercury_code.builtin_catch_3_m5' not found
token 0x0A00001C: member
`mercury.exception__cpp_code.mercury_code.builtin_catch_3_m4' not found
token 0x0A00001D: member
`mercury.exception__cpp_code.mercury_code.builtin_catch_3_p_m3' not
found
token 0x0A00001E: member
`mercury.exception__cpp_code.mercury_code.builtin_catch_3_m2' not found
token 0x0A00001F: member
`mercury.exception__cpp_code.mercury_code.builtin_catch_3_p_m1' not
found
token 0x0A000020: member
`mercury.exception__cpp_code.mercury_code.builtin_catch_3' not found
token 0x0A000021: member
`mercury.exception__cpp_code.mercury_code.builtin_throw_1' not found
token 0x0A00002C: member
`Microsoft.VisualC.MiscellaneousBitsAttribute..ctor' not found
token 0x0A00005A: member `System.Diagnostics.Process.Start' not found
token 0x0A00005B: member `System.Diagnostics.Process.WaitForExit' not
found
token 0x0A00005C: member `System.Diagnostics.Process.get_ExitCode' not
found
token 0x0A00006F: member
`mercury.std_util__cpp_code.mercury_code.do_compare__univ_0_0' not
found
token 0x0A000070: member
`mercury.std_util__cpp_code.mercury_code.do_unify__univ_0_0' not found
token 0x0A000073: member
`mercury.private_builtin__cpp_code.mercury_code.special___Compare___typeclass_info_1_0'
not found
token 0x0A000074: member
`mercury.private_builtin__cpp_code.mercury_code.special___Unify___typeclass_info_1_0'
not found
token 0x0A000075: member
`mercury.private_builtin__cpp_code.mercury_code.special___Compare___type_info_1_0'
not found
token 0x0A000076: member
`mercury.private_builtin__cpp_code.mercury_code.special___Unify___type_info_1_0'
not found
token 0x0A000077: member
`mercury.private_builtin__cpp_code.mercury_code.special___Compare___type_ctor_info_1_0'
not found
token 0x0A000078: member
`mercury.private_builtin__cpp_code.mercury_code.special___Unify___type_ctor_info_1_0'
not found
token 0x0A000079: member
`mercury.private_builtin__cpp_code.mercury_code.special___Compare___ref_1_0'
not found
token 0x0A00007A: member
`mercury.private_builtin__cpp_code.mercury_code.special___Unify___ref_1_0'
not found
token 0x0A00007B: member
`mercury.private_builtin__cpp_code.mercury_code.special___Compare___heap_pointer_0_0'
not found
token 0x0A00007C: member
`mercury.private_builtin__cpp_code.mercury_code.special___Unify___heap_pointer_0_0'
not found
token 0x0A00007D: member
`mercury.private_builtin__cpp_code.mercury_code.special___Compare___base_typeclass_info_1_0'
not found
token 0x0A00007E: member
`mercury.private_builtin__cpp_code.mercury_code.special___Unify___base_typeclass_info_1_0'
not found
token 0x0A00007F: member
`mercury.profiling_builtin__cpp_code.mercury_code.non_fail_port_code_sr_3_p'
not found
token 0x0A000080: member
`mercury.profiling_builtin__cpp_code.mercury_code.non_fail_port_code_ac_2_p'
not found
token 0x0A000081: member
`mercury.profiling_builtin__cpp_code.mercury_code.non_redo_port_code_sr_2_p'
not found
token 0x0A000082: member
`mercury.profiling_builtin__cpp_code.mercury_code.non_redo_port_code_ac_2_p'
not found
token 0x0A000083: member
`mercury.profiling_builtin__cpp_code.mercury_code.non_exit_port_code_sr_3'
not found
token 0x0A000084: member
`mercury.profiling_builtin__cpp_code.mercury_code.non_exit_port_code_ac_2'
not found
token 0x0A000085: member
`mercury.profiling_builtin__cpp_code.mercury_code.non_call_port_code_sr_5'
not found
token 0x0A000086: member
`mercury.profiling_builtin__cpp_code.mercury_code.non_call_port_code_ac_4'
not found
token 0x0A000087: member
`mercury.profiling_builtin__cpp_code.mercury_code.semi_fail_port_code_sr_3_p'
not found
token 0x0A000088: member
`mercury.profiling_builtin__cpp_code.mercury_code.semi_fail_port_code_ac_2_p'
not found
token 0x0A000089: member
`mercury.profiling_builtin__cpp_code.mercury_code.semi_exit_port_code_sr_3'
not found
token 0x0A00008A: member
`mercury.profiling_builtin__cpp_code.mercury_code.semi_exit_port_code_ac_2'
not found
token 0x0A00008B: member
`mercury.profiling_builtin__cpp_code.mercury_code.semi_call_port_code_sr_4'
not found
token 0x0A00008C: member
`mercury.profiling_builtin__cpp_code.mercury_code.semi_call_port_code_ac_3'
not found
token 0x0A00008D: member
`mercury.profiling_builtin__cpp_code.mercury_code.det_exit_port_code_sr_3'
not found
token 0x0A00008E: member
`mercury.profiling_builtin__cpp_code.mercury_code.det_exit_port_code_ac_2'
not found
token 0x0A00008F: member
`mercury.profiling_builtin__cpp_code.mercury_code.det_call_port_code_sr_4'
not found
token 0x0A000090: member
`mercury.profiling_builtin__cpp_code.mercury_code.det_call_port_code_ac_3'
not found
token 0x0A00009E: member
`mercury.table_builtin__cpp_code.mercury_code.table_nondet_resume_1'
not found
token 0x0A00009F: member
`mercury.table_builtin__cpp_code.mercury_code.table_nondet_suspend_2'
not found
a.out.exe: unresolved external references


=====
James Michael DuPont
http://introspector.sourceforge.net/

__________________________________________________________________

Gesendet von Yahoo! Mail - http://mail.yahoo.de
Bis zu 100 MB Speicher bei http://premiummail.yahoo.de


reply via email to

[Prev in Thread] Current Thread [Next in Thread]