kloder-games / godot-admob

Module Admob for Godot engine
MIT License
360 stars 61 forks source link

Error to compile for iOS #140

Closed mununki closed 4 years ago

mununki commented 4 years ago

OS target (Android/iOS): iOS 13.4

Godot version: 3.2

Issue description:

I followed each step successfully and tried to Compile for iOS as per the instruction https://github.com/kloder-games/godot-admob#ios But, I faced the below error when I tried to run scons command.

How can I compile for iOS?

$ scons p=iphone target=debug

scons: Reading SConscript files ...
Checking for C header file mntent.h... no
scons: done reading SConscript files.
scons: Building targets ...
[  2%] Compiling ==> platform/iphone/godot_iphone.cpp
In file included from platform/iphone/godot_iphone.cpp:33:
platform/iphone/os_iphone.h:84:2: error: unknown type name 'VideoMode'
        VideoMode video_mode;
        ^
platform/iphone/os_iphone.h:92:33: error: unknown type name 'VideoMode'
        virtual Error initialize(const VideoMode &p_desired, int p_video_driver, int p_audio_driver);
                                       ^
platform/iphone/os_iphone.h:122:2: error: unknown type name 'InputDefault'
        InputDefault *input;
        ^
platform/iphone/os_iphone.h:149:48: error: use of undeclared identifier 'InputDefault'
        void joy_axis(int p_device, int p_axis, const InputDefault::JoyAxis &p_value);
                                                      ^
platform/iphone/os_iphone.h:166:36: error: unknown type name 'VideoMode'
        virtual void set_video_mode(const VideoMode &p_video_mode, int p_screen = 0);
                                          ^
platform/iphone/os_iphone.h:167:10: error: unknown type name 'VideoMode'
        virtual VideoMode get_video_mode(int p_screen = 0) const;
                ^
platform/iphone/os_iphone.h:168:45: error: use of undeclared identifier 'VideoMode'
        virtual void get_fullscreen_mode_list(List<VideoMode> *p_list, int p_screen = 0) const;
                                                   ^
7 errors generated.
scons: *** [platform/iphone/godot_iphone.iphone.debug.x86_64.o] Error 1
scons: building terminated because of errors.
mununki commented 4 years ago

I finally resolved this issue. I leave my solution for the newcomers who have the same issue later.

Actually I cloned the godot github repository and tried at first try. But the master branch of godot repository is not the newest version. After I did checkout to 3.2 branch, then I can fix the above issue.

gumaciel commented 4 years ago

Thanks, sorry for not answering before!

mununki commented 4 years ago

That's alright. Thank you for your good work.