Trying to compile libdwarf, gives undefined errors

你说的曾经没有我的故事 提交于 2019-12-10 18:19:57

问题


I'm trying to build the libdwarf api under windows but I'm receiving the following compile errors.

in dwarf_elf_access.c
undefined type Elf32_Ehdr,
undefined symbol EI_CLASS
undefined symbol ELFCLASS64
undefined symbol ELFDATA2LSB
...

I did a search through all the header files and source files and I couldn't find them defined anywhere as far as I could tell. Are these unix/linux specific definitions? If it is how should these errors be resolved under windows?

Thanks


回答1:


It seems you need to link the libelf library too (the dwarf library uses it).




回答2:


Terminus is right, libdwarf depends on the libelf library.

I successfully compiled this one with msvc2008 and 2010. http://directory.fsf.org/project/libelf/



来源:https://stackoverflow.com/questions/3581931/trying-to-compile-libdwarf-gives-undefined-errors

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!