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

Undefined symbols for architecture x86_64 #2

Open
stevenaldinger opened this issue Oct 4, 2019 · 4 comments
Open

Undefined symbols for architecture x86_64 #2

stevenaldinger opened this issue Oct 4, 2019 · 4 comments

Comments

@stevenaldinger
Copy link

Hey! I'm trying to learn how these things work so I can write a golang version but I can't find a working example. Is this what you meant by outdated or were you talking about offsets and things being outdated?

Thanks for taking a look!

Undefined symbols for architecture x86_64:
  "_CFMachPortCreateRunLoopSource", referenced from:
      startListen() in main.o
  "_CFRunLoopAddSource", referenced from:
      startListen() in main.o
  "_CFRunLoopGetCurrent", referenced from:
      startListen() in main.o
  "_CFRunLoopRun", referenced from:
      startListen() in main.o
  "_CGEventGetIntegerValueField", referenced from:
      myCGEventCallback(__CGEventTapProxy*, CGEventType, __CGEvent*, void*) in main.o
  "_CGEventTapCreate", referenced from:
      startListen() in main.o
  "_CGEventTapEnable", referenced from:
      startListen() in main.o
  "_kCFAllocatorDefault", referenced from:
      startListen() in main.o
  "_kCFRunLoopCommonModes", referenced from:
      startListen() in main.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
@gabsens
Copy link
Owner

gabsens commented Oct 5, 2019

The offsets are surely outdated, but the rest of the code should only require minor modifications. Can you make sure you have all the libraries installed ?

@stevenaldinger
Copy link
Author

I'm sure that's all it is. That's just the Core Foundation I'd need though right? I didn't pick up on any other dependencies from lookin at the headers.
Thanks for the response! I'll open source my golang version when I get it working and definitely give you a shout out.

@JobsSteve
Copy link

@stevenaldinger have you finished your golang version?

@stevenaldinger
Copy link
Author

no, I wasn't able to figure out how to get this code to run to begin with so ended up abandoning the project. I've got no experience with C/don't know anybody to lean on and can't confirm or deny if dependencies were the issue here.

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

3 participants