Closed andre2007 closed 4 years ago
All 4 of your examples are macros, not symbols. They don't show up in the resulting D file, they get expanded before the D file is even generated. In fact, with your example I couldn't even get a D file, the C preprocessor failed before that on the translated file.
The Dockerfile was working fine on my side, DPP was able to translate this DPP file except the macros.
#include <gtk/gtk.h>
But it takes around 7 minutes to translate.
The C example I translated to D and replaced the Macros with symbols like GtkWindow, GApplication...
The GtkApplication was compiling and running fine and using Gtk Broadway it was even running within a browser using HTML5 rendering (therefore the docker example).
I will check again the example above wheter it is still running on my side or I can reproduce the C pre processor error.
Attached docker file I am able to build and run
docker build -t t7 . docker run -p 8889:8889 t7
I am not sure, should the macros be available in the generated D module?
I am not sure, should the macros be available in the generated D module?
No. They're available in the .dpp file itself, which gets fed to the C preprocessor, which then produces a valid D file. The flow is gtk.dpp -> gtk.d.tmp (includes get expanded and translated) -> cpp gtk.d.tmp -> gtk.d
I have this dockerfile
and this gtk.dpp file
The resulting file gtk.d is missing several symbols like
The C example is working fine and find all symbols: