Vector<float> and rootcint

Hello,

I am trying to include a “vector abcd” in a header file.

Doing
"rootcint -f guiDict.cxx -c ReciSpace_Gui.h guiLinkDef.h"

I get

“Symbol vector is not defined in current scope”

I tried to include

#pragma link C++ class vector;

in guiLinkDef.h but it does not help.

I include below the header file:

#include <TQObject.h>
#include <RQ_OBJECT.h>

class TGWindow;
class TGMainFrame;
class TRootEmbeddedCanvas;
class TGButton;
class TGFrame;
class TGLabel;
class TGFrame;
class TGTextEntry;
class TGGroupFrame;
class TGLayoutHints;
class TCanvas;

//using namespace std;
using std::vector;

class ReciSpace_Gui{
RQ_OBJECT(“ReciSpace_Gui”);
private:
TGMainFrame *Main_Window;
TGGroupFrame *sample_group,*scatplane_group,*energy_group,*a3_group,*a4_group,*options_group;
TGLayoutHints *fL3;
TGLabel *as_label, *bs_label, *cs_label, *aa_label, *bb_label, *cc_label;
TGTextEntry *as_input, *bs_input, *cs_input, *aa_input, *bb_input, *cc_input;

vector abcd;

struct lattice {
// lattice parameters
Double_t AS, BS, CS;
// cell angles
Double_t AA, BB, CC;
}lt;
TGLabel *ax_label, *ay_label, *az_label, *bx_label, *by_label, *bz_label;
TGTextEntry *ax_input, *ay_input, *az_input, *bx_input, *by_input, *bz_input;
// scattering plane
struct ScatPlane {
// first vector along ki
Double_t Ax, Ay, Az;
// second vector
Double_t Bx, By, Bz;
}sp;

TGLabel *E_inc_label, *E_scat_label;
TGTextEntry *E_inc_input, *E_scat_input;
// Ei/Ef
Double_t Ei, Ef;
Double_t k_i,k_f;

TGLabel *A3_start_label, *A3_stop_label, *A3_step_label;
TGTextEntry *A3_start_input, *A3_stop_input, *A3_step_input;
TGLabel *A4_start_label, *A4_stop_label, *A4_step_label;
TGTextEntry *A4_start_input, *A4_stop_input, *A4_step_input;

//Experiment
Double_t A3_start, A3_stop, A3_step;
Double_t A4_start, A4_stop, A4_step;
Double_t A3_pos, A4_pos;

TRootEmbeddedCanvas *fEcanvas;
TCanvas *fCanvas;

public:
ReciSpace_Gui(const TGWindow *p, UInt_t w, UInt_t h);
~ReciSpace_Gui();

void Get_AS();
void Get_BS();
void Get_CS();
void Get_AA();
void Get_BB();
void Get_CC();
void Get_Ax();
void Get_Ay();
void Get_Az();
void Get_Bx();
void Get_By();
void Get_Bz();
void Get_E_inc();
void Get_E_scat();
void Get_A3_start();
void Get_A3_stop();
void Get_A3_step();
void Get_A4_start();
void Get_A4_stop();
void Get_A4_step();

void DoDraw();
void DoPrint();
};

I would appreciate any help, thank you in advance,

Bertrand Roessli

PS: I am running root 5.18

Hi,

You need to add:#include <vector>

Cheers,
Philippe.