Compiler warnings

Thanks, for taking the time, ingemar :slight_smile:

Right now I’m trying to get it to work. First try didn’t work, so I’m starting with a fresh copy, just in case.

One thing I do see, is that when I start with a fresh copy of the App folder, I get a lot of errors in xCode and it asks me to do updates to my project. After I do the updates, the errors disappear except one (a Apple Mach-O Linker Warning, but I’ve read that this is okay)

Then I notice that under Linked Frameworks and Libraries (and also under Plugin.xcodeproj/Products) my libplugin_library.a appears in red. 

And this just after opening a fresh project for the first time.

I wonder if this is related to my path problems.

I’ll keep trying and let you know.

Jorge

Nope : /

I did everything correctly (supposedly :wink: but as soon as I try to build I get 2 new errors.

I wonder if I am missing something else in my setup.

The errors seem to be related to i386 architecture:

Undefined symbols for architecture i386:

  “_OBJC_CLASS_$_ASIdentifierManager”, referenced from:

      objc-class-ref in libfacebook.a(FBSettings.o)

ld: symbol(s) not found for architecture i386

clang: error: linker command failed with exit code 1 (use -v to see invocation)

 

I don’t want to bother you anymore, but if you have a clue, please let me know.

Ok. It looks like you’ll need to include the AdSupport framework too.

Unbelievable!

That fixed it!!!

Thank you SO MUCH for taking the time to help me out with this! :slight_smile:

Now I can enjoy my sunday :wink:

Your Welcome.

Enjoy!  :smiley:

Hey Nano Mathias,

I’m getting this too. I’ve spoken with another enterprise developer who tells me he sees it within his own apps using the unmodified template for Corona Enterprise.

He’s submitted an app to the App Store without issue but can anyone from Corona able to provide more information about this warning?

I also get these messages. Any updates on this?

Thanks!

I posted this last year, and I still get them.

However it doesn’t seem to affect anything and I’ve had Enterprise apps approved by Apple as well, so there’s no imminent problem.

It’d be nice *not* to get the warnings though  :wink:

Thanks for the reply. Good to know it doesn’t seem to be a problem.

I am also getting path problems with the Facebook plug-in. I cannot get it to work at all.

And I think this is all related.

If those path problems are while linking, then try adding " " around the paths in your Library Search Paths in build settings.

Thanks, but it didn’t work : /

I’ve been reading forums trying to correct this all day, but I keep getting:

 

Runtime error

module ‘facebook’ not found:resource (facebook.lu) does not exist in archive

 

  • I am calling the plugin in this way: local facebook = require “facebook” (is this correct?)

  • My understanding is that I no longer call it on the build.settings file.

  • Some people say I should move the libfacebook.a plugin to my project folder, but this did not work.

  • Some people say that I should link the file in “Link Binary to Libraries” but this did not work.

  • Some people say that I have to change my search paths to “.”, but this did not work either.

 

If you have any other suggestions, I would appreciate it .

 

Thank you

I just tried adding the Facebook library to one of my projects and it compiled and ran without a runtime error on an iPad.

Things to check:

Use the libfacebook.a plugin from the CoronaEnterprisePlugins folder, and *not* the Enterprise folder.

You need to use Corona SDK 2014.2165 or higher.

I just added the library (.a file) from the original location. I didn’t copy it to my project.

In my main.lua I just added local fb = require(“facebook”).

Thank you, ingemar.

I don’t think I have access to the CoronaEnterprisePlugins folder (I just got the plugin from Corona Enterprise/Plugins/facebook/ios/libfacebook.a )

Perhaps the problem is that I am using the Trial version of Corona Enterprise and I don’t have access to CoronaEnterprisePlugins.

I will ask the people at Corona.

Thanks again!

Aha. That might be it.

The CoronaEnterprisePlugins folder is a separate download from the Enterprise download.

BTW. Which version of Enterprise did you get?

You can do a print(system.getInfo(“build”)) in main.lua if you don’t know.

I have build  2014.2189

I have some questions to try to catch the error:

  • Are you using xCode 5.1.1?

  • Did you drag the libfacebook.a to the Frameworks folder in xCode?

  • Did you copy the libfacebook.a to the root of your project folder in the desktop?

  • Did you have to manually add the libfacebook.a to “Linked Frameworks and Libraries”?

  • What do your search paths look like?

I currently have those 3 on Framework, Header, Library, User Header Search Paths

$(inherited)

$(SRCROOT)/CoronaEnterprise/Corona/ios/lib

.

I tried many other combinations and nothing has worked : /

Thanks,

Jorge

OK. Just for the heck of it, I tried the plugin from the Enterprise folder. And it works as well.

This means that for some reason your library is not being linked.

First you need to add libfacebook.a to the app’s Frameworks:

In the General tab scroll down to the end of the list and click the (+) sign to add it.

My Library Search paths are as follows:

(They’re added automatically, so you usually don’t need to modify this manually. You can ignore everything except the first and last rows)

I see you asked some questions while I was writing my previous post :slight_smile:
 
Q: Are you using xCode 5.1.1?
A: Yes
 
Q: Did you drag the libfacebook.a to the Frameworks folder in xCode?
A: No, I added them by clicking the (+) at the bottom of the list. (but I don’t think that matters)
 
Q: Did you copy the libfacebook.a to the root of your project folder in the desktop?
A: No
 
Q: Did you have to manually add the libfacebook.a to “Linked Frameworks and Libraries”?
A: Yes, as described above by clicking (+)
 
Your paths:

$(inherited) $(SRCROOT)/CoronaEnterprise/Corona/ios/lib .

You’re missing the Facebook plugin path (see my post above).

Thanks, for taking the time, ingemar :slight_smile:

Right now I’m trying to get it to work. First try didn’t work, so I’m starting with a fresh copy, just in case.

One thing I do see, is that when I start with a fresh copy of the App folder, I get a lot of errors in xCode and it asks me to do updates to my project. After I do the updates, the errors disappear except one (a Apple Mach-O Linker Warning, but I’ve read that this is okay)

Then I notice that under Linked Frameworks and Libraries (and also under Plugin.xcodeproj/Products) my libplugin_library.a appears in red. 

And this just after opening a fresh project for the first time.

I wonder if this is related to my path problems.

I’ll keep trying and let you know.

Jorge

Nope : /

I did everything correctly (supposedly :wink: but as soon as I try to build I get 2 new errors.

I wonder if I am missing something else in my setup.

The errors seem to be related to i386 architecture:

Undefined symbols for architecture i386:

  “_OBJC_CLASS_$_ASIdentifierManager”, referenced from:

      objc-class-ref in libfacebook.a(FBSettings.o)

ld: symbol(s) not found for architecture i386

clang: error: linker command failed with exit code 1 (use -v to see invocation)

 

I don’t want to bother you anymore, but if you have a clue, please let me know.