Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Where to add private frameworks? #15

Closed
JW97 opened this issue Jan 27, 2012 · 18 comments
Closed

Where to add private frameworks? #15

JW97 opened this issue Jan 27, 2012 · 18 comments

Comments

@JW97
Copy link

JW97 commented Jan 27, 2012

Im currently working on a project that requires a private framework, i have the framework but can't figure where to put it in my theos directory and how to add it to the makefile. Sorry for my noobishness, still a newly to theos. Can you help?

Thanks

@bored-engineer
Copy link

tweakname_PRIVATE_FRAMEWORKS = PRIVATEFRAMEWORKSHERE

@JW97
Copy link
Author

JW97 commented Jan 29, 2012

I mean where in the theos directory as in /opt/theos/include/NAME_OF_FRAMEWORK/files?

On 29 Jan 2012, at 21:31, Luke Youngreply@reply.github.com wrote:

tweakname_PRIVATE_FRAMEWORKS = PRIVATEFRAMEWORKSHERE


Reply to this email directly or view it on GitHub:
#15 (comment)

@DHowett
Copy link
Collaborator

DHowett commented Feb 2, 2012

Yeah, that's fine.
Or in the framework itself in 'Headers/'

@DHowett DHowett closed this as completed Feb 2, 2012
@JW97
Copy link
Author

JW97 commented Feb 2, 2012

Thanks, I've added the dylib I need to use to theos/lib but do I reference it in the PRIVATE_FRAMEWORKS?

On 2 Feb 2012, at 17:26, Dustin L. Howett wrote:

Yeah, that's fine.
Or in the framework itself in 'Headers/'


Reply to this email directly or view it on GitHub:
#15 (comment)

@DHowett
Copy link
Collaborator

DHowett commented Feb 2, 2012

But that's a dylib, not a framework. For libraries, you add -llibname to xxx_LDFLAGS. So, libawesome.dylib becomes xxx_LDFLAGS = -lawesome.

@JW97
Copy link
Author

JW97 commented Feb 2, 2012

Ignore that last reply but when doing this i still get ld: library not found for -libname?

On 29 Jan 2012, at 21:31, Luke Young wrote:

tweakname_PRIVATE_FRAMEWORKS = PRIVATEFRAMEWORKSHERE


Reply to this email directly or view it on GitHub:
#15 (comment)

@DHowett
Copy link
Collaborator

DHowett commented Feb 2, 2012

That's because -libname means "libibname.dylib". Like the example I
gave you. Take off the lib and the .dylib and put that after -l.

@DHowett
Copy link
Collaborator

DHowett commented Feb 2, 2012

And really, the library had better be something named better than libname. Examples are just that, examples. They are to have your real-world values substituted into them.

@JW97
Copy link
Author

JW97 commented Feb 2, 2012

Of course. Problem solved and thanks for the help.

On 2 Feb 2012, at 18:37, Dustin L. Howett wrote:

And really, the library had better be something named better than libname. Examples are just that, examples. They are to have your real-world values substituted into them.


Reply to this email directly or view it on GitHub:
#15 (comment)

@DHowett
Copy link
Collaborator

DHowett commented Feb 2, 2012

Sure thing. :)

@ElfeXu
Copy link

ElfeXu commented Jul 13, 2012

Hi DHowett, I have the similar question, but I'm trying to use a framework.

I followed http://brandontreb.com/beginning-jailbroken-ios-development-your-first-tweak/ to write my first tweak, and then I want to use TPAdvanced.a in my tweak.

I put TPAdvanced.h in /opt/theos/include/TPAdvanced/ folder,

I put libTPAdvanced.a under both /opt/theos/lib, /opt/theos/include/TPAdvanced/ folder, and also my tweak project folder (the same folder where my Tweak.xm and Makefile are in)

I have tried modified the makefile with:
WelcomeWagon_PRIVATE_FRAMEWORKS = libTPAdvanced
or WelcomeWagon_PRIVATE_FRAMEWORKS = libTPAdvanced.a
or WelcomeWagon_PRIVATE_FRAMEWORKS = TPAdvanced

But, still no luck.

What do you mean by "in the framework itself in 'Headers/'"
Where should I put my .h and .a file?
What should I write in my makefile?
I could not find any document of how to set these variables in the makefile. Do you have any?

Thanks!
-Elfe

@JW97
Copy link
Author

JW97 commented Jul 13, 2012

Use -lTPAdvanced in your projects LDFLAGS

@ElfeXu
Copy link

ElfeXu commented Jul 16, 2012

Oh, I didn't realize I can still write the make file just like any normal make file...
It works. Thanks!

@justzt
Copy link

justzt commented Feb 7, 2013

Hi, DHowett
I'm use libxml2.dylib. I had add LDFLAGS like this:

widget_INSTALL_PATH = /Library/WeeLoader/Plugins/
widget_FRAMEWORKS = UIKit CoreGraphics
widget_LDFLAGS = -lxml2

the code in my xxx.m

#import "BBWeeAppController-Protocol.h"
#import "libxml/HTMLparser.h" #here need use < instead "

than make , error:

error: libxml/HTMLparser.h: No such file or directory

Why there was still not find libxml?
I have to do something else?

Thanks.

@DHowett
Copy link
Collaborator

DHowett commented Feb 7, 2013

This is not a catch-all bug bandwagon love-in!

@justzt: widget_CFLAGS=-I$(SYSROOT)/usr/include/libxml2 and then switch the include to <> instead of ""
@ElfeXu Sorry - I never noticed your activity on this bug (given that it was closed). You can set xxx_LIBRARIES in your Makefile to TPAdvanced, or add the .a file to xxx_OBJ_FILES where xxx is your instance name.

@justzt
Copy link

justzt commented Feb 7, 2013

Thanks

@DHowett
Copy link
Collaborator

DHowett commented Mar 28, 2013

This is not a support forum. Please stop treating it like one.

@theiostream
Copy link
Collaborator

irc.saurik.com #theos.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants