[mercury-users] compilation problem, all, some

Maurizio Colucci seguso.forever at tin.it
Sat Jul 17 09:53:42 AEST 2004


On Friday 16 July 2004 06:19, David Overton wrote:
> On Fri, Jul 16, 2004 at 02:24:44PM -0700, Maurizio Colucci wrote:
> > I don't understand... I tried
> >
> >   mmc --fno-strict-aliasing main.m
> >
> > but the option is not accepted by mmc.
> >
> > Could you please give me the full command line needed to compile?
>
> This option needs to be passed to GCC.  You can do this using
>
> 	mmc --cflags --fno-strict-aliasing main.m

I'm terribly sorry, but that won't work either. First of all, 
gcc 3.3.3 has no option --fno-strict-aliasing. The closest I
could find is --mno-strict-aliasing. Secondly, neither of those options
works. I tried various combinations of commands, and none of them works. 
Particularly interesting is the last error: undefined reference to
<predicate 'main'/2 mode 0>.

mau at dhcppc0:/dat/pub/src/by-mau/tests/mercury>  mmc --cflags --fno-strict-aliasing main.m
cc1: error: unrecognized option `-ffno-strict-aliasing'
For more information, try recompiling with `-E'.
mau at dhcppc0:/dat/pub/src/by-mau/tests/mercury>  mmc --cflags "--fno-strict-aliasing" main.m
cc1: error: unrecognized option `-ffno-strict-aliasing'
For more information, try recompiling with `-E'.
mau at dhcppc0:/dat/pub/src/by-mau/tests/mercury>  mmc --cflags --mno-strict-aliasing main.m
cc1: error: unrecognized option `-fmno-strict-aliasing'
For more information, try recompiling with `-E'.
mau at dhcppc0:/dat/pub/src/by-mau/tests/mercury>  mmc --cflags "-mno-strict-aliasing" main.m
cc1: error: invalid option `no-strict-aliasing'
For more information, try recompiling with `-E'.
mau at dhcppc0:/dat/pub/src/by-mau/tests/mercury>  mmc --cflags "-fno-strict-aliasing" main.m
main_init.o(.text+0x179): In function `mercury_init':
: undefined reference to `<predicate 'main'/2 mode 0>'
collect2: ld returned 1 exit status




Here is the code I am trying to compile:

:- module main.

:- interface.

:- import_module io.

:- pred main(io__state, io__state).
:- mode main(di, uo) is det.

:- implementation.

	

main(IO, IO3):-
	io__print("ciao", IO, IO3).


Maurizio
--------------------------------------------------------------------------
mercury-users mailing list
post:  mercury-users at cs.mu.oz.au
administrative address: owner-mercury-users at cs.mu.oz.au
unsubscribe: Address: mercury-users-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-users-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the users mailing list