Jump to content

8 posts in this topic

Recommended Posts

Posted

I'm currently making a library with Theos which needs to hook, so I took the Tweak project in Theos. Problem is, it generates a .dylib file so I don't know how to include it as a static library inside another project.

Posted
1 hour ago, bR34Kr said:

This'll not make it static though

Its better to use a framework since it can be static I don’t think theos has the ability to link static libraries yet :(

Posted
4 hours ago, Red16 said:

Its better to use a framework since it can be static I don’t think theos has the ability to link static libraries yet :(

Ah no was more asking of how to compile a Tweak as a static library since Theos does support linking to one but not compiling a Tweak to one, or at least I think so

Posted (edited)
On 2/19/2021 at 7:51 PM, bR34Kr said:

Ah no was more asking of how to compile a Tweak as a static library since Theos does support linking to one but not compiling a Tweak to one, or at least I think so

alright i figured it out you need to add to your makefile

XXX_LINKAGETYPE = static

XXX name of your project

when you compile the library you will get a .a file

then in your tweak project add these to make file

$(TWEAK_NAME)_OBJ_FILES = somelib.a
$(TWEAK_NAME)_LDFLAGS = -lsomelib

examplefolder

$(TWEAK_NAME)_OBJ_FILES = examplefolder/somelib.a
$(TWEAK_NAME)_LDFLAGS = examplefolder/somelib.a

also add to makefile at the top set true

DEBUG = 1

add any headers you want to include etc :) i recently just did this

 

Updated by Red16
+= in front of LDFLAGS
Posted
On 4/10/2021 at 9:28 AM, Red16 said:

alright i figured it out you need to add to your makefile

XXX_LINKAGETYPE = static

XXX name of your project

when you compile the library you will get a .a file

then in your tweak project add these to make file

$(TWEAK_NAME)_OBJ_FILES = somelib.a
$(TWEAK_NAME)_LDFLAGS = -lsomelib

examplefolder

$(TWEAK_NAME)_OBJ_FILES = examplefolder/somelib.a
$(TWEAK_NAME)_LDFLAGS = examplefolder/somelib.a

also add to makefile at the top set true

DEBUG = 1

add any headers you want to include etc :) i recently just did this

 

hmm static framework nốt work

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...

Important Information

We would like to place cookies on your device to help make this website better. The website cannot give you the best user experience without cookies. You can accept or decline our cookies. You may also adjust your cookie settings. Privacy Policy - Guidelines