[mercury-users] Re: Compilation errors with Mercury and GTK--
Andy Coates
coates_andy at hotmail.com
Tue Feb 5 22:58:44 AEDT 2002
>
>Try compiling with `-DMR_NO_BACKWARDS_COMPAT' or `-DMERCURY_BOOTSTRAP_H'.
>
>Previous versions of the Mercury header files were not completely
>namespace-clean. This can lead to name clashes if you try to mix
>them with other headers that are also not namespace-clean.
>
>The problem is mostly fixed in 0.10.1, but we left a lot of the
>problematic names still defined by default, to avoid breaking
>existing code which depends on them. But they can be disable
>by defining MR_NO_BACKWARDS_COMPAT or MERCURY_BOOTSTRAP_H.
>
>If that doesn't solve the problem, try building using the latest
>release-of-the-day release. Or try using `--high-level-code'
>(in which case you need mercury.h rather than mercury_imp.h).
>
thanks for the advice,
Compiling the NLP module with highlevel code enabled like so:
mmc -EcH --no-line-numbers skaNLP
and including mercury.h instead, seemed to yield 'better errors' since I now
get the same errors no matter which order I put the #includes which i guess
is a good thing! However, I have no clue of how to solve them. (compiling
using make and g++)
In file included from skaMain.cc:3:
skaNLP.h:30: `MR_Word' was not declared in this scope
skaNLP.h:30: parse error before `,'
skaNLP.h:36: syntax error before `;'
...etc
I also get similar errors from skaMain.cc since it does not know of MR_Word
either.
Is there an extra file I need to include somewhere?
If I try the other approach, ie using mmake (with g++) passing the
-DMERCURY_NO_BOOTSTRAP_H option, and also using the highlevel code flag,
running mmake depend, followed by mmake yields many errors of the following
types:
bash-2.05$ mmake
rm -f skaNLP.c
mmc --compile-to-c --high-level-code skaNLP.m > skaNLP.err 2>&1
MERCURY_C_COMPILER=g++ mgnuc --high-level-code -g -c skaNLP.c -o
skaNLP.o
skaNLP.c:38: uninitialized const
`skaNLP__skaNLP__enum_name_ordered_v_type_0'
skaNLP.m:221: redefinition of `const struct MR_EnumFunctorDesc *const
skaNLP__skaNLP__enum_name_ordered_v_type_0[2]'
skaNLP.m:247: ANSI C++ forbids implicit conversion from `void *' in
initialization
..etc
Much of this is way over my head, and I'm going round in circles reading the
documentation, so any tips would be great.
thanks,
Andy
Attached my Mmakefile incase you'd like to see it.
end
_________________________________________________________________
MSN Photos is the easiest way to share and print your photos:
http://photos.msn.com/support/worldwide.aspx
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Mmakefile
Type: application/octet-stream
Size: 2700 bytes
Desc: not available
URL: <http://lists.mercurylang.org/archives/users/attachments/20020205/498879f5/attachment.obj>
More information about the users
mailing list