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

Unable to run Makefile & include in my project #2

Open
irfan-cloudnix opened this issue May 24, 2018 · 1 comment
Open

Unable to run Makefile & include in my project #2

irfan-cloudnix opened this issue May 24, 2018 · 1 comment

Comments

@irfan-cloudnix
Copy link

Thank for great article & the code to trace method calls on objective-c. but i'm facing some issues while running makefile, request you to provide steps to include your library into my project.

Below is the error i'm getting while running your Makefile

ldid -Sent.xml libobjc_trace.dylib
make: ldid: No such file or directory
make: *** [libobjc_trace] Error 1

And also if I directly include the objc_trace.m file into my project, i'm unable to understand how to include & invoke the method to start tracing the calls.

@TRGoCPftF
Copy link

I have a bad habit of responding to year old issues, but here’s some info on how it’s initialized.

If you look around like 503? If my memory serves here on mobile, you will see a static initializer or attribute(constructor()).

C constructors like this are invoked prior to an application entering main(). And you technically do not need to do anything else to initialize it. Constructors can have priority settings when you declare them starting at 101 up, as 0-100 are reserved by the compiler? If I recall correctly.

But there is no need for “initializing” this code, it’s designed to do so with the use of that constructor, such that if you make it into the dylib like the makefile intended, simply including the library will invoke the code within the constructor block.

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

2 participants