coronalabs / corona

Solar2D Game Engine main repository (ex Corona SDK)
https://solar2d.com/
MIT License
2.51k stars 269 forks source link

Trouble with corona/librtt/Corona/CoronaObjects.cpp line 268 and 285. Compilation error related to the Rtt::Display class #705

Closed HBL001 closed 3 months ago

HBL001 commented 4 months ago

Hi, I am compiling Solar2D inside a Linux container. Everything is going great until the compiler hits

[  4%] Building CXX object CMakeFiles/Solar2D.dir/librtt/Corona/CoronaObjects.cpp.o
/home/torizon/corona/librtt/Corona/CoronaObjects.cpp: In function 'bool PushFactory(lua_State*, const char*)':
/home/torizon/corona/librtt/Corona/CoronaObjects.cpp:268:18: error: 'class Rtt::Display' has no member named 'PushObjectFactories'
  268 |     if (!display.PushObjectFactories()) // stream, ...[, factories]
      |                  ^~~~~~~~~~~~~~~~~~~
/home/torizon/corona/librtt/Corona/CoronaObjects.cpp: In function 'bool CallNewFactory(lua_State*, const char*, void*)':
/home/torizon/corona/librtt/Corona/CoronaObjects.cpp:285:17: error: 'class Rtt::Display' has no member named 'SetFactoryFunc'
  285 |         display.SetFactoryFunc( funcBox );

So trying to call the PushObjectFactories() , or the SetFactoryFunc() functions, but they are not there !

After I looked in Rtt_Display.cpp and its header , it appears the Rtt::Display class no longer has the PushObjectFactories() , or the SetFactoryFunc() functions

I had a good look around the History

https://github.com/HBL001/corona/commits/master/librtt/Display/Rtt_Display.cpp

And nothing jumped out saying these two functions have been removed / retired.

Any ideas where they have gone, would be greatly helpful.

Kind regards

Richard

ggcrunchy commented 4 months ago

Hmm, I swear I had replied on https://github.com/coronalabs/corona/pull/658#issuecomment-2041116875 but I'm not seeing anything. CoronaObjects.cpp should not be in master; I don't know where it snuck in, but that was a mistake.

clang-clang-clang commented 4 months ago

Consider git repository not clean.

I check the branch master there is not CoronaObjects.cpp in it.

You can try to re-cloned the master branch in the new folder and try compiling again:

Or you can use the git-clean command with --dry-run to find out what files do not belong to the commit.

HBL001 commented 3 months ago

Yes. For some reason pressing "sync" in my fork, did not update the files at my end.

git-clean didnt seem to do anything. So I forked things again and rebuilt it..

Sorry about that - not experienced that before