Visual studio 2013 compile error

Started by slimmeke, 05 July 2013, 12:46:42

slimmeke

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

#1
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.

slimmeke

#2
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 :).

texus

Ok, so the version that I just pushed to github should compile then.

Thanks for taking the time to investigate what was wrong.

slimmeke

Texus tnx for your quick respons now it compiles in VS2013 :).

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

texus

You have a nice day too.
Its hot here in Antwerp as well :).

netrick

It's very nice day here in Poland though :P

"Useless post is useless" - Plato 385 BC