Help in generating dummy file3

cppheaderbase.h

#include <string>
#include <vector>
using namespace std;

struct A
{
  int a;
};

cppheader1.h

#include "cppheaderbase.h"
int f1(vector<A> &b);

cpp header2.h

#include "cppheaderbase.h"
int f2(vector<A> &b);

what should i use?
1.makecint -mk makefile -dl test.dll -p -H cppheader1.h cppheader2.h -l all.lib
2.makecint -mk makefile -dl test.dll -H cppheader1.h cppheader2.h -l all.lib
3.makecint -mk makefile -dl test.dll -H cppbase.h cppheader1.h cppheader2.h -l all.lib

this is just an simple example ,because i want to incorporate a

Hi,

All 3 should work.

Philippe.

actually it is not!
i have tried that when turn the preprocess on
it will tell you lots of errors

Hi,

we cannot help you if you don’t give us the error messages. I still suspect (given the messages from your many other posts) that you did not install CINT correctly.

Axel.

i suppose it is the reason of cint.
but the cint is i download from the main website of root.
root.cern.ch/drupal/content/cint

u mean it is the fault of the binary cint?

Hi,

If you see message like:In file included from cppheader1.h:2, from G__cpp_test.h:33, from G__cpp_test.cxx:8: cppheaderbase.h:5: error: redefinition of ‘struct A’ cppheaderbase.h:6: error: previous definition of ‘struct A’which I did using your exact example, this simply mean that you header do not have any code guard and it is your responsibility to insure they are included only exactly once per compilation unit. By passing all 3 header to the same makecint command you end up including it 3 times. Note a code guard is:// Start of file myheader.h #ifndef MYHEADER_H #defined MYHEADER_H .... #endif

Cheers,
Philippe.