Amédée d'Aboville

  • About
  • Projects

Linking against static and extern in C

January 30, 2020 · 5 minute read · Tags: c , linker , recurse

Earlier this week I was writing some code that used a statically linked C library, and I was trying to use a default the library documentation used in its examples, DEFAULT_CAMERA_CONFIGURATION. I was able to use everything else in the library itself just fine, but when I’d try to use this constant, my program wouldn’t compile and give a linker error instead SYMBOL_NOT_FOUND. When you compile code into a library or an executable, the names (variables, functions, constants) are called symbols.
Continue reading

© 2025 - Powered by Hugo with the Type Theme