[mercury-users] Set linker command for 'mmc --make'?

Ondrej Bojar obo at cuni.cz
Mon Nov 27 17:54:43 AEDT 2006


Is there a way to set the linker command for 'mmc --make'? The default 
linker is gcc but this is not sufficient for linking with C++ objects 
(depending on libstdc++).

I failed with adding -lstdc++ or other options via --ld-flags, because 
my libstdc++ is shared only.

A simple workaround is running 'mmc --make ...' with --verbose and then 
replacing 'gcc' with 'g++' in the command used for linking, but I prefer 
the replacement to be done by mmc itself.

Passing "--cc g++" to mmc does not set the linker command (while 
breaking compilation of mercury modules). Setting the environment 
variable MERCURY_C_COMPILER=g++ works only for 'ml', not for 'mmc'. (I 
prefer mmc because it will take care of all the subdirs etc.)

In short, a '--ld' option for mmc is probably missing.

Thanks, Ondrej.

Ondrej Bojar (mailto:obo at cuni.cz)
mercury-users mailing list
Post messages to:       mercury-users at csse.unimelb.edu.au
Administrative Queries: owner-mercury-users at csse.unimelb.edu.au
Subscriptions:          mercury-users-request at csse.unimelb.edu.au

More information about the users mailing list