steveQuadros / g-LinkingLearning

Learning about g++ by linking folly

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Learnings

  • Install folly library brew install folly
  • includes using -I flag need to follow the directory structure
    • ex. files in: mathutil/include/add.hpp, when compiling with g++ -I. demo/src/main.cpp add.o -lfolly --std=c++17 you would need to use #include <mathutil/include/add.hpp>
  • use the -v flag to see includes directories
  • FINAL WORKING compilation:
    • had to keep tracing the ld: missing symbols and finding which library in /opt/home/includes had that symbol, then -l linking the library
    • compile mathutils into .o file: g++ -c -I./ mathutils/src/add.cpp -o add.o -v
    • g++ -I. demo/src/main.cpp add.o -lfolly --std=c++17 -v -lglog -lboost_context-mt -o main

About

Learning about g++ by linking folly


Languages

Language:Starlark 74.5%Language:C++ 18.9%Language:Makefile 6.6%