Visual studio 2013 compile error
« on: 05 July 2013, 12:46:42 »
When I compile Tgui with Visual Studio 2013 I got following errors:
error C1001: An internal error has occurred in the compiler.   \TGUI\Container.cpp   line 2273

He stop compiling at if (m_EventManager.m_Widgets == widget).

I use newest boost for it to work with VS2013.

Hope someone can help me with this compile error.

*

texus

  • *****
  • 1143
    • View Profile
    • Texus's Blog
Re: Visual studio 2013 compile error
« Reply #1 on: 05 July 2013, 14:12:58 »
Did you read the msdn page about the error? Did you try changing optimization?

The error happens on line 2273, but the place that you say it stopped compiling in on a different line. Is this just a mistake or are there errors for other lines than 2273?
EDIT: The line numbers were messed up in my browser for some reason. Now I see that that code is indeed on line 2273.

I don't think I can change the code to solve this, it seems to be a problem with the compiler.
« Last Edit: 05 July 2013, 14:17:39 by texus »

Re: Visual studio 2013 compile error
« Reply #2 on: 07 July 2013, 13:43:07 »
hey

I have found the problem and a sollution for that problem :).
U use a custom made pointer SharedWidgetPtr and you check it with a default C++ pointer. And the compiler can't compare it with each other. Now the sollution is to add a getPointer method that returns the m_Widgetptr

template <class T>
    class TGUI_API SharedWidgetPtr
{

public:
      Widget* getPointer()
      {
         return m_WidgetPtr;
      }
}

In Grid.cpp you must change line 127:
From: if (m_GridWidgets[row][col] == widget)
To:     if (m_GridWidgets[row][col].getPointer() == widget)

And in Container line 2273.
From: if (m_EventManager.m_Widgets == widget)
To: if (m_EventManager.m_Widgets.getPointer() == widget)

And if you change this than you have a working version in VS2013 (with boost) :).

I can mail you the source if you want :).
« Last Edit: 07 July 2013, 13:44:40 by slimmeke »

*

texus

  • *****
  • 1143
    • View Profile
    • Texus's Blog
Re: Visual studio 2013 compile error
« Reply #3 on: 07 July 2013, 13:54:27 »
Ok, so the version that I just pushed to github should compile then.

Thanks for taking the time to investigate what was wrong.

Re: Visual studio 2013 compile error
« Reply #4 on: 07 July 2013, 13:59:12 »
Texus tnx for your quick respons now it compiles in VS2013 :).

Have a nice day in Belgium :). It's hot here in Mechelen :).

*

texus

  • *****
  • 1143
    • View Profile
    • Texus's Blog
Re: Visual studio 2013 compile error
« Reply #5 on: 07 July 2013, 14:23:02 »
You have a nice day too.
Its hot here in Antwerp as well :).

Re: Visual studio 2013 compile error
« Reply #6 on: 07 July 2013, 20:35:52 »
It's very nice day here in Poland though :P

"Useless post is useless" - Plato 385 BC