Hi,
most likely this is a very dumb question and is not really ROOT but Visual Studio 9.0 question, but I simply want to compile and link ROOT applications with the Visual Studio 9.0 IDE, but I’m somehow not able to figure out how to configure Visual Studio under Win XP to successfully do that.
What I did is adding the %ROOTSYS%\include to the include search path and %ROOTSYS%\lib to the library search path (at least I tried…)
So when e.g. trying to build a simple ‘project’ like
#include
#include “TRandom3.h”
using namespace std;
void main()
{
TRandom3 rand;
cout <<rand.Rndm()<<endl;
}
I already get an include error
c:\root\include\rconfig.h(480) : fatal error C1189: #error : Missing #include of %ROOTSYS%\include\w32pragma.h!
When I add an #include “w32pragma.h” (don’t know whether this is appropriate) I get some linker errors:
1>test1.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol ““public: virtual __thiscall TRandom3::~TRandom3(void)” (??1TRandom3@@UAE@XZ)” in Funktion “_main”.
1>test1.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol ““public: virtual double __thiscall TRandom3::Rndm(int)” (?Rndm@TRandom3@@UAENH@Z)” in Funktion “_main”.
1>test1.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol ““public: __thiscall TRandom3::TRandom3(unsigned int)” (??0TRandom3@@QAE@I@Z)” in Funktion “_main”.
1>test1.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol ““public: __thiscall TVersionCheck::TVersionCheck(int)” (??0TVersionCheck@@QAE@H@Z)” in Funktion ““void __cdecl `dynamic initializer for ‘gVersionCheck’’(void)” (??__EgVersionCheck@@YAXXZ)”.
1>C:\Dokumente und Einstellungen\klausg\Eigene Dateien\Visual Studio 2008\Projects\test1\Debug\test1.exe : fatal error LNK1120: 4 nicht aufgelöste externe Verweise.
(Sorry for posting german error messages…)
I presume this is a very trivial error when knowing better about the VC++ IDE. Can anybody help me with this?
Best regards and thanks very much in advance,
Klaus