[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: can't compile `stdlib.h` on mxe
From: |
Werner LEMBERG |
Subject: |
Re: can't compile `stdlib.h` on mxe |
Date: |
Sun, 23 May 2021 05:30:25 +0000 (UTC) |
>> It doesn't – it is an auto-generated Qt file. However, the file
>> starts
>> with
>> ```
>> #include <memory>
>> #include "ddlineedit.h"
>
> You could instead compile a file ddlineedit.config-moc.cpp, with the
> following contents:
>
> #include <config.h>
> #include "ddlineedit.moc.cpp"
Yeah, this came to my mind, too, thanks! However, I've now
implemented the following rule in my `Makefile.am` file, which seems
to work fine.
```
SUFFIXES = .moc.cpp .h
moc_verbose = $(moc_verbose_@AM_V@)
moc_verbose_ = $(moc_verbose_@AM_DEFAULT_V@)
moc_verbose_0 = @echo " MOC " $@;
.h.moc.cpp:
$(moc_verbose){ \
echo '#include <config.h>'; \
$(MOC) ... $< ; \
} > $@.tmp
@mv $@.tmp $@
```
Werner