UPBGE / upbge

UPBGE, the best integrated game engine in Blender
https://upbge.org
Other
1.39k stars 177 forks source link

Doesn't compile since dc5370d #1822

Closed e2002e closed 1 year ago

e2002e commented 1 year ago

Lattest commit introduces a bug on compilation:

~/Documents/blender_git/upbge/source/blender/editors/screen/screen_edit.cc: In function ‘void ED_screen_refresh_blenderplayer(wmWindow*)’:
~/Documents/blender_git/upbge/source/blender/editors/screen/screen_edit.cc:1977:21: error: invalid conversion from ‘int (*)(const bContext*, const char*, bContextDataResult*)’ to ‘void*’ [-fpermissive]
 1977 |   screen->context = ed_screen_context;
      |                     ^~~~~~~~~~~~~~~~~
      |                     |
      |                     int (*)(const bContext*, const char*, bContextDataResult*)

I tried adding -fpermissive to be to CMAKE_C_FLAGS in the screen/CMakeLists.txt but it doesn't help.

After looking at the file I found the same declaration than line 1977 with a cast, copying it in stead of the faulty line solves the error: reinterpret_cast<void *>(ed_screen_context);

youle31 commented 1 year ago

hi, thanks for the report. Yes i did as you suggested here: https://github.com/UPBGE/upbge/commit/0bb0edf849d354b989489a0c16ee0a203cb05bb0

it happened only on linux. i had other issues in debug builds but idk if i did something wrong or not. But release builds were compiling.

youle31 commented 1 year ago

ok, troubles to build in debug mode were related to bad RAM management with compiler + current chipset drivers.... Then i close this report. Thanks.

e2002e commented 1 year ago

There were a lot of errors that actually don't come from the code indeed. i.e runing make again would solve them. I guess this is the compiler issue you'r refering to. Np. bye.

Le jeu. 13 juil. 2023 22:23, youle31 @.***> a écrit :

Closed #1822 https://github.com/UPBGE/upbge/issues/1822 as completed.

— Reply to this email directly, view it on GitHub https://github.com/UPBGE/upbge/issues/1822#event-9815300027, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHDG6X4FM4EFVRAJYGEQ33DXQBKL3ANCNFSM6AAAAAA2JDCPBM . You are receiving this because you authored the thread.Message ID: @.***>