Xcode Export Problem

I was getting same errors even after copying files. I was only able to fix errors by removing reference to files and then manually adding them from XCode app settings. My music file is also not linking now from Dropbox so I’m going to have to figure that out.

@yojimbo2000 I fixed it pretty easily. I wasn’t sure if it was connected.

I’m getting an error message that the file path is null

Has this been fixed? I just got this same error. Copying an old Lib folder does not work for me. The lib tools.a.gz files keeps coming back.

gunzip: /Appname/Libs/libtools.a.gz: not in gzip format

@zapaper look further up on this thread this problem has already been established and fixed. The files are missing when initially exported, add the two lib files to fix the error. @MrCoxall has offered copies of the files

Thanks CamelCoder. it gives another error now. Is anyone else having this issue? I have enabled Game Center and Iadaddon under capabilities.

undefined symbols for architecture i386:
“_luaL_requiref”, referenced from:
-[GameCenterAddon codea:didCreateLuaState:] in GameCenterAddon.o
“_luaL_setfuncs”, referenced from:
_luaopen_gamecenter in GameCenterAddon.o
“_lua_setglobal”, referenced from:
-[iAdsAddon codea:didCreateLuaState:] in iAdsAddon.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

@zapaper can you tell me how you enabled them, it seems to be a problem with the luaxlib file. Also, iAds don’t work anymore, if you want ads, you have to make your own files with a different ad company

same problem here - after adding the two lib files I get same error as above:

Undefined symbols for architecture x86_64:
“_lua_setglobal”, referenced from:
-[iAdsAddon codea:didCreateLuaState:] in iAdsAddon.o
“_luaL_setfuncs”, referenced from:
_luaopen_gamecenter in GameCenterAddon.o
“_luaL_requiref”, referenced from:
-[GameCenterAddon codea:didCreateLuaState:] in GameCenterAddon.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Unsetting Gamecenter in XCode Capabilities Tab does not help (nad iAds is not shown at all in this tab)

XCode Version 8.2.1

If I try to build nor for the simulator but for my ipad I get this error:

ld: ‘/Users/sti/Desktop/Acquire/Libs/libcodea.a(ccGLStateCache.o)’ does not contain bitcode. You must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE), obtain an updated library from the vendor, or disable bitcode for this target. for architecture arm64

BUT bit_code is enabled !

@ein_STein I think the error message is telling you to disable bitcode for the build target.

Unfortunately disabling BIT_CODE just brings the same error as if building for the simulator

how should I proceed - who solved the undefined symbols problem?
Downloading the libs did not help

big advance - at least I get my code app compiled now:

  1. export Project from codea (e.g project.zip to Dropbox)
  2. export Project Xcode from codea (e.g. projectXcode.zip to Dropbox)
  3. unzip both on mac
  4. copy project.codea folder into projectXcode folder)
  5. edit libversion in projectXcode folder (change 3.2.3 to 3.2.2 - https://codea.io/lib/libcodea-3.2.3.a.gz does not exist!)
  6. manually create an empty Assets folder in projectXcode folder

now I can compile and run the simulator … BUT I am using Soda as dependancy. I copied Soda.codea also into the Xcode folder but I get
a nil error for global Soda:

and now ?

That’s interesting. First, I would raise a bug in the Codea issue tracker, as project export should handle dependencies.

A few things to try

First, move all of the lua files except for Main.lua out of the Soda.codea folder and into the same .codea folder as the main project (you can’t have two main files)

Now it might be that that step alone is enough to make it run.

However, I suspect you’ll also have to merge the two info.plist files in the .codea folders (be careful not to edit the Xcode file at the root of the project, which is also called info.plist). Plist files are xml, so it’ll help if you use a text editor with xml or plist syntax highlighting/ checking. The significant section of the plist is the “buffer order” array, which lists all of the tabs (Lua files) in a project, in the order that Codea will compile them. Copy and paste the entries from the buffer order of the Soda info.plist into the buffer order of your project info.plist (make sure you’re editing the info.plist files that are inside the .codea folders), except for the entry for “Main”. Paste the Soda entries above the entries for your project (as dependencies get compiled before your project does).

The idea is that you end up with a single .codea folder, containing all the lua files and a single info.plist file, which has a buffer order array listing all of the lua files in the folder, in the order they should be compiled, starting with the dependency files, then with your project files.

Hopefully, that ought to do it.

@ein_STein I experienced the same thing as you, where it would give me silly errors, even though they were setup properly in the setup() function. Thankfully, I know why. This happens when there is an issue with Codea compiling the code. For example, if you say:

if x==y then
    print(x)

and you don’t have the word “end”, Codea won’t let you run the program, until you fix it, but when you have it in xCode, Codea must execute the program, even tho there are syntax issues, which causes the setup() to fail. Therefore, there must be an error with your lua syntax, Soda and everything is fine, it’s just some lua syntax errors.

Finally I got it compiled and running in the simulator - last step was to merge the info.plist files as recommended by yojimbo2000

Thanks to all!