darc...@163.com
>
>
> *From:* Guillaume Poirier-Morency via vala-list
> *Date:* 2019-12-07 01:32
> *To:* Ken Gilmer
> *CC:* vala-list
> *Subject:* Re: [Vala] Preprocessor defines via Meson or valac
> If I can suggest a small improvement, you could use the
> declare_depen
If I can suggest a small improvement, you could use the
declare_dependency mechanism to add the definition only to the targets
that link against libfuse:
libfuse_dep = dependency('libfuse')
libfuse26_dep = declare_dependency(dependencies: [libfuse_dep].
Thank you Guillaume! For reference this line in my meson.build file
allowed me to define a preprocessor symbol as desired:
add_project_arguments('-DFUSE_USE_VERSION=26', language: 'c')
On Thu, Dec 5, 2019 at 11:45 PM Guillaume Poirier-Morency via vala-list <
vala-list@gnome.org> wrote:
> Le
Le jeudi 05 décembre 2019 à 22:13 -0800, Ken Gilmer via vala-list a
écrit :
> Hello!
>
> I am trying to bind to libfuse from a Vala program. I see that in
> libfuse
> I must specify a define to the version of the API I want to
> use[4]. I read
> the Vala documentation as to how to define a
Hello!
I think that the -D option only applies to the Vala pre-processor
(https://wiki.gnome.org/Projects/Vala/Manual/Preprocessor). I don't
know meson, but either it uses valac to generate the C source files and
then you need to add that option to the CFLAGS, or it does not generate
these