i have an original.h and original.lib,i want to use makecint to incorprate it into the cint.
but when i trying to generate the dummy file,i met some problems:
1.the “#ifdef/#endif” statements
#ifdef __cplusplus
extern "C" {
#endif
#ifndef BYTE
#define BYTE unsigned char
#endif
in my opinion,there is no need to change it.
just use the makecint’s “-p” parameter to startup the preprocess.
2.macro function
#define GETMAJORCLASS(att) (att & 0xF0000000)
in my opinion,it should changed to
long GETMAJORCLASS(long att);
#pragma link MACRO GETMAJORCLASS;
but should i implement the GETMAJORCLASS function in the cpp file?
or how could the cint know it?
3.enum
enum
{
NODENAME = 10;
NODETYPE = 11;
};
how could i transplant it into the dummy header?
4.struct
#define LEN 10
typedef struct tagA{
tagA()
{
memset(szName, 0, LEN);
};
char szName[LEN];
}B;
how could i change it to the dummy file? should i seperate the struct into the declaration and the implement.
dummyheader.h
#define LEN 10
typedef struct tagA
{
tagA();
char szName[LEN];
}B;
dummycpp.cpp
tagA::tagA()
{
memset(szName, 0, LEN);
}
5.typedef statements
typedef A B;
am i right that i don’t need to change it in the dummy header?
6.the “#pragma link XXX;” statemens
should i use the “#pragma link XXX;” each time?