csgoGlow icon indicating copy to clipboard operation
csgoGlow copied to clipboard

symbol(s) not found for architecture x86_64

Open stevenaldinger opened this issue 5 years ago • 1 comments

Hello, This is supposed to support 64 bit arch right? I'm on Mojave 10.14.5, attempting to port something similar over to golang but stuck on error: use of undeclared identifier 'dyld_all_image_infos' even though I've got #include <mach-o/dyld_images.h> at the top :( thought I'd make sure this project compiled first to see if it was something I was doing wrong or just isn't going to work on my machine.

Do you have any insight on the symbols not being found (or pointers for what could be going wrong with my golang version? it's C... not C++, but I looked at the header file and it doesn't look like there should be an incompatibility there)?

Undefined symbols for architecture x86_64:
  "_CFMachPortCreateRunLoopSource", referenced from:
      keyBoardListen() in main.o
  "_CFRunLoopAddSource", referenced from:
      keyBoardListen() in main.o
  "_CFRunLoopGetCurrent", referenced from:
      keyBoardListen() in main.o
  "_CFRunLoopRun", referenced from:
      keyBoardListen() in main.o
  "_CGEventGetFlags", referenced from:
      keyBoardCallback(__CGEventTapProxy*, CGEventType, __CGEvent*, void*) in main.o
  "_CGEventGetIntegerValueField", referenced from:
      keyBoardCallback(__CGEventTapProxy*, CGEventType, __CGEvent*, void*) in main.o
  "_CGEventSetFlags", referenced from:
      keyBoardCallback(__CGEventTapProxy*, CGEventType, __CGEvent*, void*) in main.o
  "_CGEventSetIntegerValueField", referenced from:
      keyBoardCallback(__CGEventTapProxy*, CGEventType, __CGEvent*, void*) in main.o
  "_CGEventTapCreate", referenced from:
      keyBoardListen() in main.o
  "_CGEventTapEnable", referenced from:
      keyBoardListen() in main.o
  "_kCFAllocatorDefault", referenced from:
      keyBoardListen() in main.o
  "_kCFRunLoopCommonModes", referenced from:
      keyBoardListen() 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)

stevenaldinger avatar Oct 03 '19 11:10 stevenaldinger

@stevenaldinger

Why not try to compile it with c++? not completely sure why you're experiencing this, but you could also simply not include the keyboard.h file and remove the function call in the main.cpp and see if it still compiles.

Fricker95 avatar Dec 10 '19 22:12 Fricker95