Trying to use pure mode with a header file #1066
-
Hi. I've had success with cppfront in mixed mode, but decided to try a simple example in pure mode and I'm running into an issue. I can use pure mode with a single cpp2 file, but I am getting an error trying to include a h2 file. hello.cpp2
hello.h2
Compiler output:
I also noticed that the h2 file is generating both a h file and also hpp file. Am I doing something wrong trying to include the header? If I move the function definitions into the cpp2 then the pure mode is working. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
Have you tried to include file name of generated header instead of #include "hello.h2" ? |
Beta Was this translation helpful? Give feedback.
-
I have fixed the problem in my fork of cppfront by moving the function which emits
|
Beta Was this translation helpful? Give feedback.
Some time ago I tried to use h2 headers and I faced with the issue. In my case I just opened the generated file and observed that include is still h2. But I did not use the pure mode that time as I remember.
Also I didnt find documentation on this so I performed some checks of source code that time