gm2
[Top][All Lists]
Advanced

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

Re: [Gm2] Cygwin / Windows problem with .def files


From: Gaius Mulley
Subject: Re: [Gm2] Cygwin / Windows problem with .def files
Date: 19 Aug 2004 11:57:41 +0100
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

Izo <address@hidden> writes:

> Gerrit P. Haase wrote:
> 
> >Hello,
> >
> >it seems to confuse gcc (compiled with --enable-languages=c,gm2,...)
> >when I try to link a shared library with a .def file (usual way to
> >tell gcc/ld which symbols to export from the shared library):
> >
> >gcc -shared mylib.def mylib.o other_object.o \
> >    -Wl,--more-linker-flags \
> >    -o mylib.dll
> >gcc tries to execute gm2l now.
> >
> >It is possible to pass the .def file directly to the linker with -Wl,
> >but it is not needed to do so if .def is not a gcc-known gm2 specific
> >suffix.  Even libtool doesn't use -Wl, to pass the .def file to the
> > linker.
> def and mod are extensions for modula-2 modules from Wirth on. It is
> by all means the best to use these. However, I have seen many
> extension sets for modula-2: dm/m , dm/im, d/i etc etc. Maybe Gaius
> would rethink a little bit to allow another extension set beside
> def/mod.

Hi,

I think that the problem is that we would have to disallow gcc from
treating *.def as special Modula-2 files meant for gm2.
For example in gm2/lang-specs.h it defines .def and .mod files to
be associated with the modula-2 language.

  {".mod", "@modula-2", 0},
  {".def", "@modula-2", 0},

Allowing gm2 to treat *.d *.m or *.dm *.m would require quite a few
but simple changes (a case for some rationalisation, maybe).
Any chance you can remove the line:

  {".def", "@modula-2", 0},

and rebuild gm2 and test the dll linking again? I think this should
fix the (gm2l) problem..

Thanks Gaius



reply via email to

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