macro in .rep file
-
Is it possible to to use c-preprocessor macros in .rep files?
Found nothing regarding this topic. I experimented a bit, without success.
Any ideas?
-
-
@jsulm Is this a rhetorical question?
At some point these .rep files have to be converted into
rep_class_source.h
andrep_class_replica.h
. So assuming there could be a mechanism that handels this use case.@Redman said in macro in .rep file:
Is this a rhetorical question?
No, I don't know what .rep files are.
-
@jsulm Is this a rhetorical question?
At some point these .rep files have to be converted into
rep_class_source.h
andrep_class_replica.h
. So assuming there could be a mechanism that handels this use case.@Redman
Still don't know what this is about. If you have some external.rep
files how do you propose to run them through a C preprocessor? And, if it matters, these days I think the old C preprocessor standalone is no longer a part of C++, I don't know what options your compiler might take to run only some preprocessing stage if that is even available. -
@Redman
Still don't know what this is about. If you have some external.rep
files how do you propose to run them through a C preprocessor? And, if it matters, these days I think the old C preprocessor standalone is no longer a part of C++, I don't know what options your compiler might take to run only some preprocessing stage if that is even available.@JonB I'm simply talking about macros. The wordings seems to be wrong on my end.
The .rep files get compiled by the repc which results in
replica.h
andsource.h
. So there could be a way of using macros since at some point we are working with c++ code.
And AFAIK the repc compilation steps comes before project compilation so macros could be resolved -
@JonB I'm simply talking about macros. The wordings seems to be wrong on my end.
The .rep files get compiled by the repc which results in
replica.h
andsource.h
. So there could be a way of using macros since at some point we are working with c++ code.
And AFAIK the repc compilation steps comes before project compilation so macros could be resolved@Redman You really should have said that you're talking about QtRemoteObjects - I would guess noone knew that repc is a Qt tool when they did not touch QtRemoteObjects until now which would not be that much people.
-
You can run preprocessor on any file you want at any build stage you want. Just make a custom build step and pass it to the compiler with the right options to only run preprocessor stage. MSVC has a
/P
option for that. GCC has-E
. You can then pass the result to repc.