Dwarf error

Jumping back in with troubleshooting on the Makefile and build process in my game engine project in hopes of being able to:

  1. Build on the target device (ClockworkPi GameShell)
  2. Migrate to KDevelop for my new main IDE

I’ve come across a curious DWARF error.

No not one of these guys:

DWARF errors are simply the format that GCC debugger uses. User tuxdev on linuxquestions says that you should clean your project, check the includes and dependencies and then rebuild.

/usr/bin/ld: ./src/main.o: in function `main':
/home/ayoungblood/Git/sdl2-engine/Debug/../src/main.cpp:32: undefined reference to `cJSON_Parse'

Well wouldn’t you know it, but if I look in the build directory at the objects that compiled there’s a certain piece of source code that is not there.

~/Git/sdl2-engine/Debug master*
❯ ls src      
AssetManager.d  Collision.d  ECS     Game.o        GameObject.o  main.o  Map.o           MusicManager.o  TextureManager.d  UINineSlice.d  UIText.d  Vector2D.d
AssetManager.o  Collision.o  Game.d  GameObject.d  main.d        Map.d   MusicManager.d  subdir.mk       TextureManager.o  UINineSlice.o  UIText.o  Vector2D.o

Next steps will be figuring out how to compile the cJSON libraries which are simply a single .c and .h file.

Leave a Reply

Your email address will not be published. Required fields are marked *