1
\$\begingroup\$

I'm trying to add Share module in my game for iOS platform. i have this repo for sharing module Godot-Share.

I'm using godot 3.1 and i download latest godot source code from Link.

To implement share module i follow this step to compile custom module.

  1. Copy share folder to godot/modules folder.
  2. Then i compile for iOS using this Link. I used following command to compile.

    scons p=iphone tools=no target=debug arch=arm
    
    scons p=iphone tools=no target=debug arch=arm64
    

    In godot/bin i get as result two files :

libgodot.iphone.debug.arm.a

libgodot.iphone.debug.arm64.a

  1. After i used following command to generate *.debug.fat.a file.

    lipo -create bin/libgodot.iphone.debug.arm64.a bin/libgodot.iphone.debug.arm.a -output bin/libgodot.iphone.debug.fat.a
    

as result i get libgodot.iphone.debug.fat.a file in godot/bin folder.

  1. i replaced libgodot.iphone.debug.fat.a file into godot/misc/dist/ios_xcode folder
  2. i copied ios_xcode folder in documents, rename ios_xcode to iphone, then zip it. i get result file iphone.zip in Document folder.

  3. Then i add iphone.zip file to Project>Export>Options>Custom Package>Debug

enter image description here

  1. Then Export project.

    Error I'm Facing :

    Undefined symbols for architecture armv7:
    "_z_verbose", referenced from:
    _inflateInit2_ in FBLogin.a(ftgzip.iphone.debug.arm.o)
    _inflate in FBLogin.a(ftgzip.iphone.debug.arm.o)
    _inflateEnd in FBLogin.a(ftgzip.iphone.debug.arm.o)
    _inflateReset in FBLogin.a(ftgzip.iphone.debug.arm.o)
    _inflate_blocks_reset in FBLogin.a(ftgzip.iphone.debug.arm.o)
    _inflate_codes_free in FBLogin.a(ftgzip.iphone.debug.arm.o)
    _inflate_blocks_new in FBLogin.a(ftgzip.iphone.debug.arm.o)
    ...
    "_z_error", referenced from:
    _inflate_codes in FBLogin.a(ftgzip.iphone.debug.arm.o)
    ld: symbol(s) not found for architecture armv7
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    

So my question is : Am i compiling and linking custom module for iOS is right?

How do i solve above issue?

\$\endgroup\$

1 Answer 1

0
\$\begingroup\$

i'm facing this error because because i'm trying to build custom binary from different version source code and provide to different version of godot engine.

I found solution from godot github repo.

Answer : To generate custom binary for custom module you need same version of godot engine and same version source code of engine. In my case i solve using Godot 3.1 stable version for engine and source.

Here is link that provide step-by-step explanation of compile process.

Full Tutorial for Facebook Module Compile is here : Link

\$\endgroup\$
4
  • 1
    \$\begingroup\$ You might want to give the gist of it in the Answer instead of redirecting users to an external site. Right now, it can be considered as a link only answer. You can keep the link, but it shouldn't be the highlight of the Answer. \$\endgroup\$
    – Vaillancourt
    May 14, 2019 at 14:55
  • \$\begingroup\$ I am doing everything by the book to build iOS custom module for Godot 3.2.1. The "Engine.has_singleton" always returns NULL for me. \$\endgroup\$
    – bashan
    Apr 21, 2020 at 19:29
  • \$\begingroup\$ @bashan can show you code ? \$\endgroup\$ Apr 23, 2020 at 2:51
  • \$\begingroup\$ The code of the custom module is on Git: github.com/DrMoriarty/godot-facebook. I am calling it on my script this way: if (Engine.has_singleton("GodotFacebook")): \$\endgroup\$
    – bashan
    Apr 24, 2020 at 17:27

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .