Cygwin / Eclipse / root

OK, I forgot this one… please rename (or delete) /cygwin/bin/link.exe
The error comes because link.exe should be the one from Visual studio, and not the one from cygwin…

Cheers,
Bertrand.

Ok,

Generating the following:

$ make
Generating dictionary RIDEDict.cxx...
cl -Z7 -nologo -I/c/root/include -FIw32pragma.h -MDd -EHs -GR -I'c:\root\include
' -c RIDEDict.cxx
RIDEDict.cxx
link -debug -nologo  RIDEDict.obj TGRootIDE.obj TMRootIDE.obj TMusterdict.obj ma
in.obj -include:_G__cpp_setupG__Net -include:_G__cpp_setupG__IO -include:_G__cpp
_setupG__Hist -include:_G__cpp_setupG__Graf1 -include:_G__cpp_setupG__G3D -inclu
de:_G__cpp_setupG__GPad -include:_G__cpp_setupG__Tree -include:_G__cpp_setupG__R
int -include:_G__cpp_setupG__PostScript -include:_G__cpp_setupG__Matrix -include
:_G__cpp_setupG__Physics -include:_G__cpp_setupG__Gui1 'c:\root\lib\libCore.lib'
 'c:\root\lib\libCint.lib' 'c:\root\lib\libRIO.lib' 'c:\root\lib\libNet.lib' 'c:
\root\lib\libHist.lib' 'c:\root\lib\libGraf.lib' 'c:\root\lib\libGraf3d.lib' 'c:
\root\lib\libGpad.lib' 'c:\root\lib\libTree.lib' 'c:\root\lib\libRint.lib' 'c:\r
oot\lib\libPostscript.lib' 'c:\root\lib\libMatrix.lib' 'c:\root\lib\libPhysics.l
ib' 'c:\root\lib\libGui.lib'  "C:\root/lib/libGuiHtml.lib" "C:\root/lib/libHtml.
lib" -out:RIDE.exe
TMRootIDE.obj : error LNK2005: "private: static class TClass * TGDocument::fgIsA
" (?fgIsA@TGDocument@@0PAVTClass@@A) already defined in RIDEDict.obj
TMRootIDE.obj : error LNK2005: "private: static class TClass * TGRootIDE::fgIsA"
 (?fgIsA@TGRootIDE@@0PAVTClass@@A) already defined in RIDEDict.obj
TMRootIDE.obj : error LNK2005: "class ROOT::TGenericClassInfo * __cdecl ROOT::Ge
nerateInitInstance(class TGDocument const *)" (?GenerateInitInstance@ROOT@@YAPAV
TGenericClassInfo@1@PBVTGDocument@@@Z) already defined in RIDEDict.obj
TMRootIDE.obj : error LNK2005: "class ROOT::TGenericClassInfo * __cdecl ROOT::Ge
nerateInitInstance(class TGRootIDE const *)" (?GenerateInitInstance@ROOT@@YAPAVT
GenericClassInfo@1@PBVTGRootIDE@@@Z) already defined in RIDEDict.obj
TMRootIDE.obj : error LNK2005: "public: static char const * __cdecl TGDocument::
Class_Name(void)" (?Class_Name@TGDocument@@SAPBDXZ) already defined in RIDEDict.
obj
TMRootIDE.obj : error LNK2005: "public: static char const * __cdecl TGDocument::
ImplFileName(void)" (?ImplFileName@TGDocument@@SAPBDXZ) already defined in RIDED
ict.obj
TMRootIDE.obj : error LNK2005: "public: static int __cdecl TGDocument::ImplFileL
ine(void)" (?ImplFileLine@TGDocument@@SAHXZ) already defined in RIDEDict.obj
TMRootIDE.obj : error LNK2005: "public: static void __cdecl TGDocument::Dictiona
ry(void)" (?Dictionary@TGDocument@@SAXXZ) already defined in RIDEDict.obj
TMRootIDE.obj : error LNK2005: "public: static class TClass * __cdecl TGDocument
::Class(void)" (?Class@TGDocument@@SAPAVTClass@@XZ) already defined in RIDEDict.
obj
TMRootIDE.obj : error LNK2005: "public: static char const * __cdecl TGRootIDE::C
lass_Name(void)" (?Class_Name@TGRootIDE@@SAPBDXZ) already defined in RIDEDict.ob
j
TMRootIDE.obj : error LNK2005: "public: static char const * __cdecl TGRootIDE::I
mplFileName(void)" (?ImplFileName@TGRootIDE@@SAPBDXZ) already defined in RIDEDic
t.obj
TMRootIDE.obj : error LNK2005: "public: static int __cdecl TGRootIDE::ImplFileLi
ne(void)" (?ImplFileLine@TGRootIDE@@SAHXZ) already defined in RIDEDict.obj
TMRootIDE.obj : error LNK2005: "public: static void __cdecl TGRootIDE::Dictionar
y(void)" (?Dictionary@TGRootIDE@@SAXXZ) already defined in RIDEDict.obj
TMRootIDE.obj : error LNK2005: "public: static class TClass * __cdecl TGRootIDE:
:Class(void)" (?Class@TGRootIDE@@SAPAVTClass@@XZ) already defined in RIDEDict.ob
j
TMRootIDE.obj : error LNK2005: "public: virtual void __thiscall TGRootIDE::Strea
mer(class TBuffer &)" (?Streamer@TGRootIDE@@UAEXAAVTBuffer@@@Z) already defined
in RIDEDict.obj
TMRootIDE.obj : error LNK2005: "public: virtual void __thiscall TGRootIDE::ShowM
embers(class TMemberInspector &,char *)" (?ShowMembers@TGRootIDE@@UAEXAAVTMember
Inspector@@PAD@Z) already defined in RIDEDict.obj
TMRootIDE.obj : error LNK2005: "public: virtual void __thiscall TGDocument::Stre
amer(class TBuffer &)" (?Streamer@TGDocument@@UAEXAAVTBuffer@@@Z) already define
d in RIDEDict.obj
TMRootIDE.obj : error LNK2005: "public: virtual void __thiscall TGDocument::Show
Members(class TMemberInspector &,char *)" (?ShowMembers@TGDocument@@UAEXAAVTMemb
erInspector@@PAD@Z) already defined in RIDEDict.obj
TMusterdict.obj : error LNK2005: "private: static class TClass * TGDocument::fgI
sA" (?fgIsA@TGDocument@@0PAVTClass@@A) already defined in RIDEDict.obj
TMusterdict.obj : error LNK2005: "private: static class TClass * TGRootIDE::fgIs
A" (?fgIsA@TGRootIDE@@0PAVTClass@@A) already defined in RIDEDict.obj
TMusterdict.obj : error LNK2005: "class ROOT::TGenericClassInfo * __cdecl ROOT::
GenerateInitInstance(class TGDocument const *)" (?GenerateInitInstance@ROOT@@YAP
AVTGenericClassInfo@1@PBVTGDocument@@@Z) already defined in RIDEDict.obj
TMusterdict.obj : error LNK2005: "class ROOT::TGenericClassInfo * __cdecl ROOT::
GenerateInitInstance(class TGRootIDE const *)" (?GenerateInitInstance@ROOT@@YAPA
VTGenericClassInfo@1@PBVTGRootIDE@@@Z) already defined in RIDEDict.obj
TMusterdict.obj : error LNK2005: "public: static char const * __cdecl TGDocument
::Class_Name(void)" (?Class_Name@TGDocument@@SAPBDXZ) already defined in RIDEDic
t.obj
TMusterdict.obj : error LNK2005: "public: static char const * __cdecl TGDocument
::ImplFileName(void)" (?ImplFileName@TGDocument@@SAPBDXZ) already defined in RID
EDict.obj
TMusterdict.obj : error LNK2005: "public: static int __cdecl TGDocument::ImplFil
eLine(void)" (?ImplFileLine@TGDocument@@SAHXZ) already defined in RIDEDict.obj
TMusterdict.obj : error LNK2005: "public: static void __cdecl TGDocument::Dictio
nary(void)" (?Dictionary@TGDocument@@SAXXZ) already defined in RIDEDict.obj
TMusterdict.obj : error LNK2005: "public: static class TClass * __cdecl TGDocume
nt::Class(void)" (?Class@TGDocument@@SAPAVTClass@@XZ) already defined in RIDEDic
t.obj
TMusterdict.obj : error LNK2005: "public: static char const * __cdecl TGRootIDE:
:Class_Name(void)" (?Class_Name@TGRootIDE@@SAPBDXZ) already defined in RIDEDict.
obj
TMusterdict.obj : error LNK2005: "public: static char const * __cdecl TGRootIDE:
:ImplFileName(void)" (?ImplFileName@TGRootIDE@@SAPBDXZ) already defined in RIDED
ict.obj
TMusterdict.obj : error LNK2005: "public: static int __cdecl TGRootIDE::ImplFile
Line(void)" (?ImplFileLine@TGRootIDE@@SAHXZ) already defined in RIDEDict.obj
TMusterdict.obj : error LNK2005: "public: static void __cdecl TGRootIDE::Diction
ary(void)" (?Dictionary@TGRootIDE@@SAXXZ) already defined in RIDEDict.obj
TMusterdict.obj : error LNK2005: "public: static class TClass * __cdecl TGRootID
E::Class(void)" (?Class@TGRootIDE@@SAPAVTClass@@XZ) already defined in RIDEDict.
obj
TMusterdict.obj : error LNK2005: "public: virtual void __thiscall TGRootIDE::Str
eamer(class TBuffer &)" (?Streamer@TGRootIDE@@UAEXAAVTBuffer@@@Z) already define
d in RIDEDict.obj
TMusterdict.obj : error LNK2005: "public: virtual void __thiscall TGRootIDE::Sho
wMembers(class TMemberInspector &,char *)" (?ShowMembers@TGRootIDE@@UAEXAAVTMemb
erInspector@@PAD@Z) already defined in RIDEDict.obj
TMusterdict.obj : error LNK2005: "public: virtual void __thiscall TGDocument::St
reamer(class TBuffer &)" (?Streamer@TGDocument@@UAEXAAVTBuffer@@@Z) already defi
ned in RIDEDict.obj
TMusterdict.obj : error LNK2005: "public: virtual void __thiscall TGDocument::Sh
owMembers(class TMemberInspector &,char *)" (?ShowMembers@TGDocument@@UAEXAAVTMe
mberInspector@@PAD@Z) already defined in RIDEDict.obj
   Creating library RIDE.lib and object RIDE.exp
RIDE.exe : fatal error LNK1169: one or more multiply defined symbols found
make: *** [RIDE.exe] Error 145

I am sorry to bother you with this… I don’t understand it…

Thanks anyway!

Cheers,
Joachim

Well, can you tell me from where come these files: TMRootIDE.obj TMusterdict.obj - as they don’t exist in the original RootIDE directory…
You should first clean-up the RootIDE directory (remove all the obj files), as apparently it has been messed-up… The only remaining files should be:
LinkDef.h Makefile TGRootIDE.cxx TGRootIDE.h main.cxx

– Bertrand.

Hi,

Thank you, now it compiles. I don’t know where these files came from.
Unfortunately, when I try to run RIDE.exe the computer hangs.

  *******************************************
  *                                         *
  *        W E L C O M E  to  R O O T       *
  *                                         *
  *   Version   5.17/04   16 October 2007   *
  *                                         *
  *  You are welcome to visit our Web site  *
  *          http://root.cern.ch            *
  *                                         *
  *******************************************

ROOT 5.17/04 (trunk@20369, Oct 16 2007, 13:04:44 on win32)

CINT/ROOT C/C++ Interpreter version 5.16.26, Oct 11, 2007
Type ? for help. Commands must be C++ statements.
Enclose multiple statements between { }.

After this, nothing happens. Sometimes(!) I get the following error.

[code]SysError in TWinNTSystem::WinNTRecv: recv (No such file or directory)

==========================================
=============== STACKTRACE ===============

================ Thread 0 ================
libCore!G__cpp_setup_initG__Math::~G__cpp_setup_initG__Math()
ntdll!LdrInitializeThunk()
ntdll!LdrShutdownProcess()
kernel32!IsValidLocale()
kernel32!ExitProcess()
MSVCR71!exit()
MSVCR71!exit()
kernel32!GetModuleFileNameA()

==========================================
============= END STACKTRACE =============
==========================================[/code]

Thanks for help.

Cheers,
Joachim
[/quote]

it looks like you are mixing different versions of run-time libraries…
if you downloaded ROOT binaries, you MUST take the version matching your Visual C++ version. (i.e VC++ 8.0)
If you have built ROOT from source, there should not be any problem…
– Bertrand.

[quote=“bellenot”]it looks like you are mixing different versions of run-time libraries…
if you downloaded ROOT binaries, you MUST take the version matching your Visual C++ version. (i.e VC++ 8.0)
If you have built ROOT from source, there should not be any problem…
– Bertrand.[/quote]

Hi,

I just downloaded the source and recompiled everything. Still the same
problem, the command window crashes. This time with no error
messages.
I think I am going on with wxWidgets. Little more to do but it works.

Thank you and cheers,
Joachim

Are other examples crashing too (i.e. the ones in root/test)?
Did you try to debug it in Visual Studio?

–Bertrand.

Hello,

When I am finished being desperate I try to continue with root. Maybe
I’ll just continue with the interpreter to understand how root really works.
Anyway, thank you very much for your help. I really appreciate that!

See you and cheers,
Joachim

[quote=“bellenot”]Are other examples crashing too (i.e. the ones in root/test)?
Did you try to debug it in Visual Studio?

–Bertrand.[/quote]

No problem, and feel free to re-post if you encounter new problems :wink:

Cheers,
Bertrand.