# Problem with root,VS2013 and ROOT guiBuilder

**URL:** <https://root-forum.cern.ch/t/problem-with-root-vs2013-and-root-guibuilder/27123>\
**Category:** ROOT\
**Created:** [November 30, 2017, 6:29pm UTC](https://root-forum.cern.ch/t/problem-with-root-vs2013-and-root-guibuilder/27123 "2017-11-30T18:29:18Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![brazoayeye](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/b/ec9cab/32.png) [@brazoayeye](https://root-forum.cern.ch/u/brazoayeye)\
**Post date:** [November 30, 2017, 6:29pm UTC](https://root-forum.cern.ch/t/problem-with-root-vs2013-and-root-guibuilder/27123/1 "2017-11-30T18:29:18Z")

</div>

I’m trying to use root with VS2013. I donwloaded latest root version working with windows and [the guide](https://root.cern.ch/how/how-use-root-gui-builder) i made a very simple UI

```auto
// Mainframe macro generated from application: C:\root_v5.34.36\bin\root.exe
// By ROOT version 5.34/36 on 2017-11-30 18:59:26

#ifndef ROOT_TGDockableFrame
#include "TGDockableFrame.h"
#endif
#ifndef ROOT_TGMenu
#include "TGMenu.h"
#endif
#ifndef ROOT_TGMdiDecorFrame
#include "TGMdiDecorFrame.h"
#endif
#ifndef ROOT_TG3DLine
#include "TG3DLine.h"
#endif
#ifndef ROOT_TGMdiFrame
#include "TGMdiFrame.h"
#endif
#ifndef ROOT_TGMdiMainFrame
#include "TGMdiMainFrame.h"
#endif
#ifndef ROOT_TGMdiMenu
#include "TGMdiMenu.h"
#endif
#ifndef ROOT_TGListBox
#include "TGListBox.h"
#endif
#ifndef ROOT_TGNumberEntry
#include "TGNumberEntry.h"
#endif
#ifndef ROOT_TGScrollBar
#include "TGScrollBar.h"
#endif
#ifndef ROOT_TGComboBox
#include "TGComboBox.h"
#endif
#ifndef ROOT_TGuiBldHintsEditor
#include "TGuiBldHintsEditor.h"
#endif
#ifndef ROOT_TGuiBldNameFrame
#include "TGuiBldNameFrame.h"
#endif
#ifndef ROOT_TGFrame
#include "TGFrame.h"
#endif
#ifndef ROOT_TGFileDialog
#include "TGFileDialog.h"
#endif
#ifndef ROOT_TGShutter
#include "TGShutter.h"
#endif
#ifndef ROOT_TGButtonGroup
#include "TGButtonGroup.h"
#endif
#ifndef ROOT_TGCanvas
#include "TGCanvas.h"
#endif
#ifndef ROOT_TGFSContainer
#include "TGFSContainer.h"
#endif
#ifndef ROOT_TGuiBldEditor
#include "TGuiBldEditor.h"
#endif
#ifndef ROOT_TGColorSelect
#include "TGColorSelect.h"
#endif
#ifndef ROOT_TGButton
#include "TGButton.h"
#endif
#ifndef ROOT_TGFSComboBox
#include "TGFSComboBox.h"
#endif
#ifndef ROOT_TGLabel
#include "TGLabel.h"
#endif
#ifndef ROOT_TRootGuiBuilder
#include "TRootGuiBuilder.h"
#endif
#ifndef ROOT_TGTab
#include "TGTab.h"
#endif
#ifndef ROOT_TGListView
#include "TGListView.h"
#endif
#ifndef ROOT_TGStatusBar
#include "TGStatusBar.h"
#endif
#ifndef ROOT_TGListTree
#include "TGListTree.h"
#endif
#ifndef ROOT_TGuiBldGeometryFrame
#include "TGuiBldGeometryFrame.h"
#endif
#ifndef ROOT_TGToolBar
#include "TGToolBar.h"
#endif
#ifndef ROOT_TGuiBldDragManager
#include "TGuiBldDragManager.h"
#endif
#ifndef ROOT_TGObject
#include "TGObject.h"
#endif

#include "Riostream.h"

void test()
{

   // main frame
   TGMainFrame *fMainFrame1353 = new TGMainFrame(gClient->GetRoot(),10,10,kMainFrame | kVerticalFrame);
   fMainFrame1353->SetName("fMainFrame1353");
   fMainFrame1353->SetLayoutBroken(kTRUE);
   TGTextButton *fTextButton939 = new TGTextButton(fMainFrame1353,"fTextButton939",-1,TGTextButton::GetDefaultGC()(),TGTextButton::GetDefaultFontStruct(),kRaisedFrame);
   fTextButton939->SetTextJustify(36);
   fTextButton939->SetMargins(0,0,0,0);
   fTextButton939->SetWrapLength(-1);
   fTextButton939->Resize(91,24);
   fMainFrame1353->AddFrame(fTextButton939, new TGLayoutHints(kLHintsLeft | kLHintsTop,2,2,2,2));
   fTextButton939->MoveResize(80,56,91,24);

   fMainFrame1353->SetMWMHints(kMWMDecorAll,
                        kMWMFuncAll,
                        kMWMInputModeless);
   fMainFrame1353->MapSubwindows();

   fMainFrame1353->Resize(fMainFrame1353->GetDefaultSize());
   fMainFrame1353->MapWindow();
   fMainFrame1353->Resize(490,372);
}  

```

I have the following main:

```auto
#include <iostream>
#include <windows.h>
#include "test.cpp"

using namespace std;

int main(){
	test();
	Sleep(10000);
}

```

I set on preprocessor \_CRT\_SECURE\_NO\_WARNINGS to avoid a sprintf error but it’s still not compiling and i also have a lot of warnings:

> 1\>------ Build started: Project: OscilloC, Configuration: Debug Win32 ------  
> 1\> test.cpp  
> 1\>c:\root\_v5.34.36\include\tgframe.h(336): warning C4800: ‘int’ : forcing value to bool ‘true’ or ‘false’ (performance warning)  
> 1\>c:\root\_v5.34.36\include\tgframe.h(427): warning C4800: ‘int’ : forcing value to bool ‘true’ or ‘false’ (performance warning)  
> 1\>c:\root\_v5.34.36\include\tgshutter.h(116): warning C4800: ‘TGShutterItem \*’ : forcing value to bool ‘true’ or ‘false’ (performance warning)  
> 1\>c:\root\_v5.34.36\include\tglisttree.h(134): warning C4800: ‘int’ : forcing value to bool ‘true’ or ‘false’ (performance warning)  
> 1\> Source.cpp  
> 1\>c:\root\_v5.34.36\include\tvirtualx.h(202): error C2059: syntax error : ‘constant’  
> 1\>c:\root\_v5.34.36\include\tgframe.h(336): warning C4800: ‘int’ : forcing value to bool ‘true’ or ‘false’ (performance warning)  
> 1\>c:\root\_v5.34.36\include\tgframe.h(427): warning C4800: ‘int’ : forcing value to bool ‘true’ or ‘false’ (performance warning)  
> 1\>c:\root\_v5.34.36\include\tgshutter.h(116): warning C4800: ‘TGShutterItem \*’ : forcing value to bool ‘true’ or ‘false’ (performance warning)  
> 1\>c:\root\_v5.34.36\include\tgfscontainer.h(200): error C2628: ‘Bool\_t’ followed by ‘char’ is illegal (did you forget a ‘;’?)  
> 1\>c:\root\_v5.34.36\include\tglisttree.h(134): warning C4800: ‘int’ : forcing value to bool ‘true’ or ‘false’ (performance warning)  
> 1\> Generating Code…  
> ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

Is it normal? [Screenshot by Lightshot](http://prntscr.com/hhdtff)

---

<div class="post-metadata">

**Author:** ![bellenot](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/bellenot/32/29217_2.png) [@bellenot](https://root-forum.cern.ch/u/bellenot)\
**Post date:** [November 30, 2017, 7:32pm UTC](https://root-forum.cern.ch/t/problem-with-root-vs2013-and-root-guibuilder/27123/2 "2017-11-30T19:32:44Z")

</div>

First of all, don’t use `#include <windows.h>`, but use `#include "Windows4Root.h"` instead, then let me know how it goes…

---

<div class="post-metadata">

**Author:** ![brazoayeye](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/b/ec9cab/32.png) [@brazoayeye](https://root-forum.cern.ch/u/brazoayeye)\
**Post date:** [November 30, 2017, 7:57pm UTC](https://root-forum.cern.ch/t/problem-with-root-vs2013-and-root-guibuilder/27123/3 "2017-11-30T19:57:14Z")

</div>

> 1\>------ Build started: Project: OscilloC, Configuration: Debug Win32 ------  
> 1\> Source.cpp  
> 1\>c:\root\_v5.34.36\include\tgframe.h(336): warning C4800: ‘int’ : forcing value to bool ‘true’ or ‘false’ (performance warning)  
> 1\>c:\root\_v5.34.36\include\tgframe.h(427): warning C4800: ‘int’ : forcing value to bool ‘true’ or ‘false’ (performance warning)  
> 1\>c:\root\_v5.34.36\include\tgshutter.h(116): warning C4800: ‘TGShutterItem \*’ : forcing value to bool ‘true’ or ‘false’ (performance warning)  
> 1\>c:\root\_v5.34.36\include\tgfscontainer.h(200): error C2628: ‘Bool\_t’ followed by ‘char’ is illegal (did you forget a ‘;’?)  
> 1\>c:\root\_v5.34.36\include\tglisttree.h(134): warning C4800: ‘int’ : forcing value to bool ‘true’ or ‘false’ (performance warning)  
> ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

The main problem is the same, small (used from c:\root\_v5.34.36\include\TGFSContainer.h) sems to be #defined on c:\Program Files (x86)\Windows Kits\8.1\Include\shared\rpcndr.h (#define small char), maybe something regarding var type?

Since it seems a prototype arguments name should not be used, so i canged small to \> smalla, here the compiling result:

```auto
1>------ Build started: Project: OscilloC, Configuration: Debug Win32 ------
1> Source.cpp
1>c:\root_v5.34.36\include\tgframe.h(336): warning C4800: 'int' : forcing value to bool 'true' or 'false' (performance warning)
1>c:\root_v5.34.36\include\tgframe.h(427): warning C4800: 'int' : forcing value to bool 'true' or 'false' (performance warning)
1>c:\root_v5.34.36\include\tgshutter.h(116): warning C4800: 'TGShutterItem *' : forcing value to bool 'true' or 'false' (performance warning)
1>c:\root_v5.34.36\include\tglisttree.h(134): warning C4800: 'int' : forcing value to bool 'true' or 'false' (performance warning)
1> Generating Code...
1> Skipping... (no relevant changes detected)
1> test.cpp
1>test.obj : error LNK2005: "void __cdecl test(void)" (?test@@YAXXZ) already defined in Source.obj
1>Source.obj : error LNK2019: unresolved external symbol "public: static void * __cdecl TStorage::ObjectAlloc(unsigned int)" (?ObjectAlloc@TStorage@@SAPAXI@Z) referenced in function "public: static void *__cdecl TObject::operator new(unsigned int)" (??2TObject@@SAPAXI@Z)
1>test.obj : error LNK2001: unresolved external symbol "public: static void * __cdecl TStorage::ObjectAlloc(unsigned int)" (?ObjectAlloc@TStorage@@SAPAXI@Z)
1>Source.obj : error LNK2019: unresolved external symbol "public: __thiscall TVersionCheck::TVersionCheck(int)" (??0TVersionCheck@@QAE@H@Z) referenced in function "void__cdecl `dynamic initializer for 'gVersionCheck''(void)" (??__EgVersionCheck@@YAXXZ)
1>test.obj : error LNK2001: unresolved external symbol "public: __thiscall TVersionCheck::TVersionCheck(int)" (??0TVersionCheck@@QAE@H@Z)
1>Source.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall TObject::DoError(int,char const *,char const *,char *)const " (?DoError@TObject@@MBEXHPBD0PAD@Z)
1>test.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall TObject::DoError(int,char const *,char const *,char *)const " (?DoError@TObject@@MBEXHPBD0PAD@Z)
1>Source.obj : error LNK2019: unresolved external symbol "public: __thiscall TObject::TObject(void)" (??0TObject@@QAE@XZ) referenced in function "public:__thiscall TGLayoutHints::TGLayoutHints(unsigned long,int,int,int,int)" (??0TGLayoutHints@@QAE@KHHHH@Z)
1>test.obj : error LNK2001: unresolved external symbol "public: __thiscall TObject::TObject(void)" (??0TObject@@QAE@XZ)
1>Source.obj : error LNK2019: unresolved external symbol "public: virtual __thiscall TObject::~TObject(void)" (??1TObject@@UAE@XZ) referenced in function__unwindfunclet$??0TGLayoutHints@@QAE@KHHHH@Z$0
1>test.obj : error LNK2001: unresolved external symbol "public: virtual __thiscall TObject::~TObject(void)" (??1TObject@@UAE@XZ)
1>Source.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall TObject::AppendPad(char const *)" (?AppendPad@TObject@@UAEXPBD@Z)
1>test.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall TObject::AppendPad(char const *)" (?AppendPad@TObject@@UAEXPBD@Z)
1>Source.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall TObject::Browse(class TBrowser *)" (?Browse@TObject@@UAEXPAVTBrowser@@@Z)
1>test.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall TObject::Browse(class TBrowser *)" (?Browse@TObject@@UAEXPAVTBrowser@@@Z)
1>Source.obj : error LNK2001: unresolved external symbol "public: virtual char const * __thiscall TObject::ClassName(void)const " (?ClassName@TObject@@UBEPBDXZ)
1>test.obj : error LNK2001: unresolved external symbol "public: virtual char const * __thiscall TObject::ClassName(void)const " (?ClassName@TObject@@UBEPBDXZ)
1>Source.obj : error LNK2001: unresolved external symbol "public: virtual class TObject * __thiscall TObject::Clone(char const *)const " (?Clone@TObject@@UBEPAV1@PBD@Z)
1>test.obj : error LNK2001: unresolved external symbol "public: virtual class TObject * __thiscall TObject::Clone(char const *)const " (?Clone@TObject@@UBEPAV1@PBD@Z)
1>Source.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall TObject::Compare(class TObject const *)const " (?Compare@TObject@@UBEHPBV1@@Z)
1>test.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall TObject::Compare(class TObject const *)const " (?Compare@TObject@@UBEHPBV1@@Z)
1>Source.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall TObject::Copy(class TObject &)const " (?Copy@TObject@@UBEXAAV1@@Z)
1>test.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall TObject::Copy(class TObject &)const " (?Copy@TObject@@UBEXAAV1@@Z)
1>Source.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall TObject::Delete(char const *)" (?Delete@TObject@@UAEXPBD@Z)
1>test.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall TObject::Delete(char const *)" (?Delete@TObject@@UAEXPBD@Z)
1>Source.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall TObject::DistancetoPrimitive(int,int)" (?DistancetoPrimitive@TObject@@UAEHHH@Z)
1>test.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall TObject::DistancetoPrimitive(int,int)" (?DistancetoPrimitive@TObject@@UAEHHH@Z)
1>Source.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall TObject::Draw(char const *)" (?Draw@TObject@@UAEXPBD@Z)
1>test.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall TObject::Draw(char const *)" (?Draw@TObject@@UAEXPBD@Z)
1>Source.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall TObject::DrawClass(void)const " (?DrawClass@TObject@@UBEXXZ)
1>test.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall TObject::DrawClass(void)const " (?DrawClass@TObject@@UBEXXZ)
1>Source.obj : error LNK2001: unresolved external symbol "public: virtual class TObject * __thiscall TObject::DrawClone(char const *)const " (?DrawClone@TObject@@UBEPAV1@PBD@Z)
1>test.obj : error LNK2001: unresolved external symbol "public: virtual class TObject * __thiscall TObject::DrawClone(char const *)const " (?DrawClone@TObject@@UBEPAV1@PBD@Z)
1>Source.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall TObject::Dump(void)const " (?Dump@TObject@@UBEXXZ)
1>test.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall TObject::Dump(void)const " (?Dump@TObject@@UBEXXZ)
1>Source.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall TObject::Execute(char const *,char const *,int *)" (?Execute@TObject@@UAEXPBD0PAH@Z)
1>test.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall TObject::Execute(char const *,char const *,int *)" (?Execute@TObject@@UAEXPBD0PAH@Z)
1>Source.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall TObject::Execute(class TMethod *,class TObjArray *,int *)" (?Execute@TObject@@UAEXPAVTMethod@@PAVTObjArray@@PAH@Z)
1>test.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall TObject::Execute(class TMethod *,class TObjArray *,int *)" (?Execute@TObject@@UAEXPAVTMethod@@PAVTObjArray@@PAH@Z)
1>Source.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall TObject::ExecuteEvent(int,int,int)" (?ExecuteEvent@TObject@@UAEXHHH@Z)
1>test.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall TObject::ExecuteEvent(int,int,int)" (?ExecuteEvent@TObject@@UAEXHHH@Z)
1>Source.obj : error LNK2001: unresolved external symbol "public: virtual class TObject * __thiscall TObject::FindObject(char const *)const " (?FindObject@TObject@@UBEPAV1@PBD@Z)
1>test.obj : error LNK2001: unresolved external symbol "public: virtual class TObject * __thiscall TObject::FindObject(char const *)const " (?FindObject@TObject@@UBEPAV1@PBD@Z)
1>Source.obj : error LNK2001: unresolved external symbol "public: virtual class TObject * __thiscall TObject::FindObject(class TObject const *)const " (?FindObject@TObject@@UBEPAV1@PBV1@@Z)
1>test.obj : error LNK2001: unresolved external symbol "public: virtual class TObject * __thiscall TObject::FindObject(class TObject const *)const " (?FindObject@TObject@@UBEPAV1@PBV1@@Z)
1>Source.obj : error LNK2001: unresolved external symbol "public: virtual char const * __thiscall TObject::GetDrawOption(void)const " (?GetDrawOption@TObject@@UBEPBDXZ)
1>test.obj : error LNK2001: unresolved external symbol "public: virtual char const * __thiscall TObject::GetDrawOption(void)const " (?GetDrawOption@TObject@@UBEPBDXZ)
1>Source.obj : error LNK2001: unresolved external symbol "public: virtual unsigned int __thiscall TObject::GetUniqueID(void)const " (?GetUniqueID@TObject@@UBEIXZ)
1>test.obj : error LNK2001: unresolved external symbol "public: virtual unsigned int __thiscall TObject::GetUniqueID(void)const " (?GetUniqueID@TObject@@UBEIXZ)
1>Source.obj : error LNK2001: unresolved external symbol "public: virtual char const * __thiscall TObject::GetName(void)const " (?GetName@TObject@@UBEPBDXZ)
1>test.obj : error LNK2001: unresolved external symbol "public: virtual char const * __thiscall TObject::GetName(void)const " (?GetName@TObject@@UBEPBDXZ)
1>Source.obj : error LNK2001: unresolved external symbol "public: virtual char const * __thiscall TObject::GetIconName(void)const " (?GetIconName@TObject@@UBEPBDXZ)
1>test.obj : error LNK2001: unresolved external symbol "public: virtual char const * __thiscall TObject::GetIconName(void)const " (?GetIconName@TObject@@UBEPBDXZ)
1>Source.obj : error LNK2001: unresolved external symbol "public: virtual char * __thiscall TObject::GetObjectInfo(int,int)const " (?GetObjectInfo@TObject@@UBEPADHH@Z)
1>test.obj : error LNK2001: unresolved external symbol "public: virtual char * __thiscall TObject::GetObjectInfo(int,int)const " (?GetObjectInfo@TObject@@UBEPADHH@Z)
1>Source.obj : error LNK2001: unresolved external symbol "public: virtual char const * __thiscall TObject::GetTitle(void)const " (?GetTitle@TObject@@UBEPBDXZ)
1>test.obj : error LNK2001: unresolved external symbol "public: virtual char const * __thiscall TObject::GetTitle(void)const " (?GetTitle@TObject@@UBEPBDXZ)
1>Source.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall TObject::HandleTimer(class TTimer *)" (?HandleTimer@TObject@@UAE_NPAVTTimer@@@Z)
1>test.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall TObject::HandleTimer(class TTimer *)" (?HandleTimer@TObject@@UAE_NPAVTTimer@@@Z)
1>Source.obj : error LNK2001: unresolved external symbol "public: virtual unsigned long __thiscall TObject::Hash(void)const " (?Hash@TObject@@UBEKXZ)
1>test.obj : error LNK2001: unresolved external symbol "public: virtual unsigned long __thiscall TObject::Hash(void)const " (?Hash@TObject@@UBEKXZ)
1>Source.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall TObject::InheritsFrom(char const *)const " (?InheritsFrom@TObject@@UBE_NPBD@Z)
1>test.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall TObject::InheritsFrom(char const *)const " (?InheritsFrom@TObject@@UBE_NPBD@Z)
1>Source.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall TObject::InheritsFrom(class TClass const *)const " (?InheritsFrom@TObject@@UBE_NPBVTClass@@@Z)
1>test.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall TObject::InheritsFrom(class TClass const *)const " (?InheritsFrom@TObject@@UBE_NPBVTClass@@@Z)
1>Source.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall TObject::Inspect(void)const " (?Inspect@TObject@@UBEXXZ)
1>test.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall TObject::Inspect(void)const " (?Inspect@TObject@@UBEXXZ)
1>Source.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall TObject::IsFolder(void)const " (?IsFolder@TObject@@UBE_NXZ)
1>test.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall TObject::IsFolder(void)const " (?IsFolder@TObject@@UBE_NXZ)
1>Source.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall TObject::IsEqual(class TObject const *)const " (?IsEqual@TObject@@UBE_NPBV1@@Z)
1>test.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall TObject::IsEqual(class TObject const *)const " (?IsEqual@TObject@@UBE_NPBV1@@Z)
1>Source.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall TObject::Notify(void)" (?Notify@TObject@@UAE_NXZ)
1>test.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall TObject::Notify(void)" (?Notify@TObject@@UAE_NXZ)
1>Source.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall TObject::Paint(char const *)" (?Paint@TObject@@UAEXPBD@Z)
1>test.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall TObject::Paint(char const *)" (?Paint@TObject@@UAEXPBD@Z)
1>Source.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall TObject::Pop(void)" (?Pop@TObject@@UAEXXZ)
1>test.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall TObject::Pop(void)" (?Pop@TObject@@UAEXXZ)
1>Source.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall TObject::Read(char const *)" (?Read@TObject@@UAEHPBD@Z)
1>test.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall TObject::Read(char const *)" (?Read@TObject@@UAEHPBD@Z)
1>Source.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall TObject::RecursiveRemove(class TObject *)" (?RecursiveRemove@TObject@@UAEXPAV1@@Z)
1>test.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall TObject::RecursiveRemove(class TObject *)" (?RecursiveRemove@TObject@@UAEXPAV1@@Z)
1>Source.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall TObject::SaveAs(char const *,char const *)const " (?SaveAs@TObject@@UBEXPBD0@Z)
1>test.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall TObject::SaveAs(char const *,char const *)const " (?SaveAs@TObject@@UBEXPBD0@Z)
1>Source.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall TObject::SetDrawOption(char const *)" (?SetDrawOption@TObject@@UAEXPBD@Z)
1>test.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall TObject::SetDrawOption(char const *)" (?SetDrawOption@TObject@@UAEXPBD@Z)
1>Source.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall TObject::SetUniqueID(unsigned int)" (?SetUniqueID@TObject@@UAEXI@Z)
1>test.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall TObject::SetUniqueID(unsigned int)" (?SetUniqueID@TObject@@UAEXI@Z)
1>Source.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall TObject::UseCurrentStyle(void)" (?UseCurrentStyle@TObject@@UAEXXZ)
1>test.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall TObject::UseCurrentStyle(void)" (?UseCurrentStyle@TObject@@UAEXXZ)
1>Source.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall TObject::Write(char const *,int,int)" (?Write@TObject@@UAEHPBDHH@Z)
1>test.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall TObject::Write(char const *,int,int)" (?Write@TObject@@UAEHPBDHH@Z)
1>Source.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall TObject::Write(char const *,int,int)const " (?Write@TObject@@UBEHPBDHH@Z)
1>test.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall TObject::Write(char const *,int,int)const " (?Write@TObject@@UBEHPBDHH@Z)
1>Source.obj : error LNK2019: unresolved external symbol "public: static void __cdecl TObject::operator delete(void *)" (??3TObject@@SAXPAX@Z) referenced in function "public: virtual void *__thiscall TGLayoutHints::`scalar deleting destructor'(unsigned int)" (??_GTGLayoutHints@@UAEPAXI@Z)
1>test.obj : error LNK2001: unresolved external symbol "public: static void __cdecl TObject::operator delete(void *)" (??3TObject@@SAXPAX@Z)
1>Source.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl TObject::Info(char const *,char const *,...)const " (?Info@TObject@@UBAXPBD0ZZ)
1>test.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl TObject::Info(char const *,char const *,...)const " (?Info@TObject@@UBAXPBD0ZZ)
1>Source.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl TObject::Warning(char const *,char const *,...)const " (?Warning@TObject@@UBAXPBD0ZZ)
1>test.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl TObject::Warning(char const *,char const *,...)const " (?Warning@TObject@@UBAXPBD0ZZ)
1>Source.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl TObject::Error(char const *,char const *,...)const " (?Error@TObject@@UBAXPBD0ZZ)
1>test.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl TObject::Error(char const *,char const *,...)const " (?Error@TObject@@UBAXPBD0ZZ)
1>Source.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl TObject::SysError(char const *,char const *,...)const " (?SysError@TObject@@UBAXPBD0ZZ)
1>test.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl TObject::SysError(char const *,char const *,...)const " (?SysError@TObject@@UBAXPBD0ZZ)
1>Source.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl TObject::Fatal(char const *,char const *,...)const " (?Fatal@TObject@@UBAXPBD0ZZ)
1>test.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl TObject::Fatal(char const *,char const *,...)const " (?Fatal@TObject@@UBAXPBD0ZZ)
1>Source.obj : error LNK2019: unresolved external symbol "public: class TGWindow const * __thiscall TGClient::GetRoot(void)const " (?GetRoot@TGClient@@QBEPBVTGWindow@@XZ) referenced in function "void__cdecl test(void)" (?test@@YAXXZ)
1>test.obj : error LNK2001: unresolved external symbol "public: class TGWindow const * __thiscall TGClient::GetRoot(void)const " (?GetRoot@TGClient@@QBEPBVTGWindow@@XZ)
1>Source.obj : error LNK2019: unresolved external symbol "public: unsigned long __thiscall TGGC::operator()(void)const " (??RTGGC@@QBEKXZ) referenced in function "void__cdecl test(void)" (?test@@YAXXZ)
1>test.obj : error LNK2001: unresolved external symbol "public: unsigned long __thiscall TGGC::operator()(void)const " (??RTGGC@@QBEKXZ)
1>Source.obj : error LNK2019: unresolved external symbol "public: virtual __thiscall TGLayoutHints::~TGLayoutHints(void)" (??1TGLayoutHints@@UAE@XZ) referenced in function "public: virtual void *__thiscall TGLayoutHints::`scalar deleting destructor'(unsigned int)" (??_GTGLayoutHints@@UAEPAXI@Z)
1>test.obj : error LNK2001: unresolved external symbol "public: virtual __thiscall TGLayoutHints::~TGLayoutHints(void)" (??1TGLayoutHints@@UAE@XZ)
1>Source.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall TGLayoutHints::Print(char const *)const " (?Print@TGLayoutHints@@UBEXPBD@Z)
1>test.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall TGLayoutHints::Print(char const *)const " (?Print@TGLayoutHints@@UBEXPBD@Z)
1>Source.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall TGLayoutHints::SavePrimitive(class std::basic_ostream<char,struct std::char_traits<char> > &,char const *)" (?SavePrimitive@TGLayoutHints@@UAEXAAV?$basic_ostream@DU?$char_traits@D@std@@@std@@PBD@Z)
1>test.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall TGLayoutHints::SavePrimitive(class std::basic_ostream<char,struct std::char_traits<char> > &,char const *)" (?SavePrimitive@TGLayoutHints@@UAEXAAV?$basic_ostream@DU?$char_traits@D@std@@@std@@PBD@Z)
1>Source.obj : error LNK2019: unresolved external symbol "public: static class TClass * __cdecl TGLayoutHints::Class(void)" (?Class@TGLayoutHints@@SAPAVTClass@@XZ) referenced in function "public: virtual class TClass *__thiscall TGLayoutHints::IsA(void)const " (?IsA@TGLayoutHints@@UBEPAVTClass@@XZ)
1>test.obj : error LNK2001: unresolved external symbol "public: static class TClass * __cdecl TGLayoutHints::Class(void)" (?Class@TGLayoutHints@@SAPAVTClass@@XZ)
1>Source.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall TGLayoutHints::ShowMembers(class TMemberInspector &)" (?ShowMembers@TGLayoutHints@@UAEXAAVTMemberInspector@@@Z)
1>test.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall TGLayoutHints::ShowMembers(class TMemberInspector &)" (?ShowMembers@TGLayoutHints@@UAEXAAVTMemberInspector@@@Z)
1>Source.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall TGLayoutHints::Streamer(class TBuffer &)" (?Streamer@TGLayoutHints@@UAEXAAVTBuffer@@@Z)
1>test.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall TGLayoutHints::Streamer(class TBuffer &)" (?Streamer@TGLayoutHints@@UAEXAAVTBuffer@@@Z)
1>Source.obj : error LNK2019: unresolved external symbol "public: __thiscall TGMainFrame::TGMainFrame(class TGWindow const *,unsigned int,unsigned int,unsigned int)" (??0TGMainFrame@@QAE@PBVTGWindow@@III@Z) referenced in function "void__cdecl test(void)" (?test@@YAXXZ)
1>test.obj : error LNK2001: unresolved external symbol "public: __thiscall TGMainFrame::TGMainFrame(class TGWindow const *,unsigned int,unsigned int,unsigned int)" (??0TGMainFrame@@QAE@PBVTGWindow@@III@Z)
1>Source.obj : error LNK2019: unresolved external symbol "public: void __thiscall TGMainFrame::SetMWMHints(unsigned int,unsigned int,unsigned int)" (?SetMWMHints@TGMainFrame@@QAEXIII@Z) referenced in function "void__cdecl test(void)" (?test@@YAXXZ)
1>test.obj : error LNK2001: unresolved external symbol "public: void __thiscall TGMainFrame::SetMWMHints(unsigned int,unsigned int,unsigned int)" (?SetMWMHints@TGMainFrame@@QAEXIII@Z)
1>Source.obj : error LNK2019: unresolved external symbol "public: static class TGGC const & __cdecl TGButton::GetDefaultGC(void)" (?GetDefaultGC@TGButton@@SAABVTGGC@@XZ) referenced in function "void__cdecl test(void)" (?test@@YAXXZ)
1>test.obj : error LNK2001: unresolved external symbol "public: static class TGGC const & __cdecl TGButton::GetDefaultGC(void)" (?GetDefaultGC@TGButton@@SAABVTGGC@@XZ)
1>Source.obj : error LNK2019: unresolved external symbol "public: static unsigned long __cdecl TGTextButton::GetDefaultFontStruct(void)" (?GetDefaultFontStruct@TGTextButton@@SAKXZ) referenced in function "void__cdecl test(void)" (?test@@YAXXZ)
1>test.obj : error LNK2001: unresolved external symbol "public: static unsigned long __cdecl TGTextButton::GetDefaultFontStruct(void)" (?GetDefaultFontStruct@TGTextButton@@SAKXZ)
1>Source.obj : error LNK2019: unresolved external symbol "public: __thiscall TGTextButton::TGTextButton(class TGWindow const *,char const *,int,unsigned long,unsigned long,unsigned int)" (??0TGTextButton@@QAE@PBVTGWindow@@PBDHKKI@Z) referenced in function "void__cdecl test(void)" (?test@@YAXXZ)
1>test.obj : error LNK2001: unresolved external symbol "public: __thiscall TGTextButton::TGTextButton(class TGWindow const *,char const *,int,unsigned long,unsigned long,unsigned int)" (??0TGTextButton@@QAE@PBVTGWindow@@PBDHKKI@Z)
1>Source.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) class TGClient * gClient" (__imp_?gClient@@3PAVTGClient@@A)
1>test.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) class TGClient * gClient" (__imp_?gClient@@3PAVTGClient@@A)
1>D:\OscilloC\Debug\OscilloC.exe : fatal error LNK1120: 66 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

```

---

<div class="post-metadata">

**Author:** ![bellenot](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/bellenot/32/29217_2.png) [@bellenot](https://root-forum.cern.ch/u/bellenot)\
**Post date:** [November 30, 2017, 8:17pm UTC](https://root-forum.cern.ch/t/problem-with-root-vs2013-and-root-guibuilder/27123/4 "2017-11-30T20:17:47Z")

</div>

This works for me:

```auto
#include <iostream>
#include "TApplication.h"
#include "test.cpp"

using namespace std;

int main(int argc, char **argv)
{
   TApplication theApp("TestControlBar", &argc, argv);
   test();
// Sleep(10000);
   theApp.Run();
   return 0;
}

```

compiling with:

```auto
cl -nologo -MD -GR -EHsc main.cpp -I %ROOTSYS%\include /link -LIBPATH:%ROOTSYS%\lib libCore.lib libCint.lib libGpad.lib libGui.lib

```

Cheers, Bertrand.

---

<div class="post-metadata">

**Author:** ![brazoayeye](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/b/ec9cab/32.png) [@brazoayeye](https://root-forum.cern.ch/u/brazoayeye)\
**Post date:** [December 1, 2017, 6:59am UTC](https://root-forum.cern.ch/t/problem-with-root-vs2013-and-root-guibuilder/27123/8 "2017-12-01T06:59:15Z")

</div>

Which compiler are you using and which version? I’m using VS2013 with default compiler and options (I only added the \_CRT\_SECURE\_NO\_WARNINGS and the include folder) and it’s not working even with your main. I used that configuration because from repository (Release 5.34/36 - 2016-04-05) it seems to be the most supported bundle.

I never used VS2013 so I don’t know how to set parameters you mentioned, i can use other compilers - editors if they are more supported. (I’m using windows 10, and you?)

---

<div class="post-metadata">

**Author:** ![bellenot](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/bellenot/32/29217_2.png) [@bellenot](https://root-forum.cern.ch/u/bellenot)\
**Post date:** [December 1, 2017, 7:56am UTC](https://root-forum.cern.ch/t/problem-with-root-vs2013-and-root-guibuilder/27123/9 "2017-12-01T07:56:29Z")

</div>

I’m using VS2012 and VS2013, from the ‘Developer Command Prompt for VS2013’, and on Windows 10. But it doesn’t matter, it works on Windows 7 & VS2012 as well:  
 ![image](https://root-forum.cern.ch/uploads/default/original/2X/5/5b2eedff9db0e67d02b3fa85c431f447ff27be6c.png)

---

<div class="post-metadata">

**Author:** ![brazoayeye](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/b/ec9cab/32.png) [@brazoayeye](https://root-forum.cern.ch/u/brazoayeye)\
**Post date:** [December 10, 2017, 11:22am UTC](https://root-forum.cern.ch/t/problem-with-root-vs2013-and-root-guibuilder/27123/10 "2017-12-10T11:22:37Z")

</div>

You are right, with console and your parameters it works.

I also downloaded the template from [here](https://root-forum.cern.ch/t/root-project-template-for-visual-studio-2013/18900) to get a set of working parameters and I get following results:  
`cl /c /IC:\root_v5.34.36D\include /ZI /W3 /WX- /Od /Oy- /D WIN32 /D _CRT_SECURE_NO_WARNINGS /D _DEBUG /D _CONSOLE /D _UNICODE /D UNICODE /Gm /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Fo"Debug\\" /Fd"Debug\vc120.pdb" /Gd /TP /analyze- /errorReport:prompt oscilloC.cpp`

I always have the previous problem:

> The main problem is the same, small (used from c:\root\_v5.34.36\include\TGFSContainer.h) sems to be #defined on c:\Program Files (x86)\Windows Kits\8.1\Include\shared\rpcndr.h (#define small char)

but i solved modifying the root file c:\root\_v5.34.36\include\TGFSContainer.h

from

```auto
   virtual void GetFilePictures(const TGPicture **pic, const TGPicture** lpic,
                                Int_t file_type, Bool_t is_link, const char *ext,
                                Bool_t small);

```

to

```auto
   virtual void GetFilePictures(const TGPicture **pic, const TGPicture** lpic,
                                Int_t file_type, Bool_t is_link, const char *ext,
                                Bool_t smalle);

```

hoping it will not cause problems in other part of code.

---

<div class="post-metadata">

**Author:** ![system](https://root-forum.cern.ch/uploads/default/original/3X/e/f/efe4f24398fd8ffeb76bccb6ecc46d9d9c003376.png) [@system](https://root-forum.cern.ch/u/system)\
**Post date:** [December 24, 2017, 11:22am UTC](https://root-forum.cern.ch/t/problem-with-root-vs2013-and-root-guibuilder/27123/11 "2017-12-24T11:22:37Z")

</div>

Closed on December 24, 2017, 11:22am UTC

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
