iamamused / iOS-Static-Library-Template

XCode Template for iPhone OS Static Libraries
http://jeffreysambells.com/iphone-os-static-library-template/
8 stars 1 forks source link

library not found for -lMyLibraryKitMobile #1

Open Deminem opened 14 years ago

Deminem commented 14 years ago

Hey Jeffery,

Thanks for making such useful niche utility, I always thinking about to separate all the libraries from core project and this really helps me a lot! Just a quick question I’ve followed up your instructions and made new project which creates two static lib[ProjectName]Mobile.a library and [ProjectName]Mobile bundle but when tried to compile it gives the below error:

Project Name: MyLibraryKit Error: Id: library not found for -lMyLibraryKitMobile

I guess it’s looking for the wrong static library name prefix “-l”. Can you please let me know what’s happening here.

Thanks, Deminem

iamamused commented 14 years ago

It's possible that this could be because you haven't added any additional headers to the library. I was getting a similar error when I first tried to build a project with an "empty" library but I haven't had a chance to look into why.

Deminem commented 14 years ago

Hey Jeff,

Sorry for getting back on this late coz busy around some other projects. Yes that's right I missed to include any additional headers to the library and when tried to build the project compiler doesn't produce the static library file. Another important point to be note that it's necessary to include both (h, m) to the library otherwise compiler still won't generate the static library file.

There's a slight difference between your template and coca pre-installed template, which automatically include (h, m) to the library whenever you create/add new file inside static library.

Thanks, Deminem