sorry for my bad english.
For example :
//
// File : Main.cpp
//
#include <stdlib.h>
int main()
{
printf(TEST_DEFINE);
return (EXIT_SUCCESS);
}
Header :
//
// File : test_define.h
//
#ifndef TEST_DEFINE_H_INCLUDED
#define TEST_DEFINE_H_INCLUDED
#define TEST_DEFINE
#endif
I want include that header, by the compiler or other program. I not want include this header in CPP file.
How can i process ? I’m open to all proposal.
This situation is quite tricky, but necesary for my POC program.
GCC has an option
-includefile which causes the preprocessor to include the header as though the first line of your program said#include "file"See the manual
e.g. given a fixed version of your main (which should
#include <stdio.h>):and your header:
Then I can use it like this: