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\$
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\$
  • 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 at 14:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.