missing header file in generated .c file
Submitted by Jan Spurny
Link to original bug (#650048)
Description
I'm not sure if this is a bug or I'm doing something wrong (in that case I would expect at least compiler warning)..
When [CCode (cheader_filename = xxx)]
is used before namespace in .vapi file specified via "--pkg=xx", the generated .c file does not contain "#include.." line with the new generated .h file even though --use-header -H ..
is used on commandline.
Proof:
iface.vala:
namespace NS {
public interface Iface: Object {
public abstract void a();
public abstract void b(ClsX x);
}
}
clsx.vapi:
[CCode (cheader_filename = "clsx.h")]
namespace NS {
[CCode (cheader_filename = "clsx.h")]
public class ClsX {
public int a() { return 1; }
}
}
commandline:
valac --use-header -H iface.h -C iface.vala --vapidir=. --pkg=clsx
resulting iface.c's include section:
#include <glib.h>
#include <glib-object.h>
#include "clsx.h"
Note the "iface.h" (although it was properly generated) is missing and therefore resulting iface.c cannot be compiled.
Version: 0.12.x
Edited by Rico Tzschichholz