[m-users.] C include dir

Volker Wysk post at volker-wysk.de
Thu Apr 22 00:25:16 AEST 2021


Am Mittwoch, den 21.04.2021, 20:09 +1000 schrieb Julien Fischer:
> 
> On Wed, 21 Apr 2021, Volker Wysk wrote:
> 
> > Am Mittwoch, den 21.04.2021, 10:08 +0100 schrieb Sean Charles
> > (emacstheviking):
> > > Hi Volker,
> > > 
> > > I saw that option the other day, if you do `man mmc` and search for -I…
> > > 
> > >  -I <dir>, --search-directory <dir>
> > >         Append <dir> to the list of directories to be searched for imported modules.
> > > 
> > > So it does have -I but it just doesn’t do what you thought and hence the need for —c-include-dir I guess.
> > 
> > You're right, "-I" is already in use.
> > 
> > However, one can make do like this:
> > 
> > INC=`pkg-config --cflags glib-2.0 | sed 's/-I/--c-include-dir /g'`
> 
> Alternatively, you could just pass the output of pkg-config directly
> to the C compiler using mmc's --cflags option, e.g
> 
>      $ mmc --cflags "$(pkg-config --cflags glib-2.0)" ...

Perfect. So this is the "right" way to do it.

Cheers,
Volker

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part
URL: <http://lists.mercurylang.org/archives/users/attachments/20210421/7c73800e/attachment.sig>


More information about the users mailing list