[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Gm2] _M2_EXCEPTIONS_RAISE
From: |
Gaius Mulley |
Subject: |
Re: [Gm2] _M2_EXCEPTIONS_RAISE |
Date: |
Mon, 04 Jan 2010 17:34:13 +0000 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux) |
Martin Kalbfuß <address@hidden> writes:
> Hi,
>
> I try to move my library modula code to c++ code.
>
> I tried to access the ISO exception functions
>
> #################
>
> typedef struct _M2_EXCEPTIONS_ExceptionSource
> _M2_EXCEPTIONS_ExceptionSource;
>
> extern "C" void
> _M2_EXCEPTIONS_AllocateSource(_M2_EXCEPTIONS_ExceptionSource *source);
> extern "C" void _M2_EXCEPTIONS_RAISE(_M2_EXCEPTIONS_ExceptionSource
> *source, unsigned int number, const char *message);
>
> _M2_EXCEPTIONS_ExceptionSource *exSrc;
>
> extern "C" void gnuexcept2_Action (void)
> {
> _M2_EXCEPTIONS_RAISE(exSrc, 1, "Hallo Welt");
> }
>
> extern "C" void _M2_gnuexcept2_init()
> {
> _M2_EXCEPTIONS_AllocateSource(exSrc);
> }
>
> extern "C" void _M2_gnuexcept2_finish()
> {
>
> }
>
> #################
>
> and compiled and linked with
>
>
> #################
>
> g++ -c gnuexcept2.cpp
> gm2 -fiso -c test.mod
> gm2 -fiso test.mod
>
>
> #################
>
> He can't find _M2_EXCEPTIONS_RAISE and _M2_EXCEPTIONS_AllocateSource
> Is there a way to access the ISO exception functions or do I something
> wrong here?
>
> Thanks
Hi Martin,
no it should find the EXCEPTIONS module if you supply the -fiso
option. Please can you email me the test.mod. Could you try:
gm2 -fiso -fsources -c test.mod
gm2 -fiso -fmodules -c test.mod
thanks,
Gaius