试图编译libdwarf,给出未定义的错误 [英] Trying to compile libdwarf, gives undefined errors

查看:269
本文介绍了试图编译libdwarf,给出未定义的错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图在Windows下构建libdwarf api,但我收到以下编译错误。

 在dwarf_elf_access .c 
undefined类型Elf32_Ehdr,
未定义符号EI_CLASS
未定义符号ELFCLASS64
未定义符号ELFDATA2LSB
...

我做了一个搜索所有的头文件和源文件,我找不到他们定义在任何地方,只要我能告诉。这些是unix / linux特定的定义吗?

解决方案

如果这些错误是在Windows下解决的,

看起来你需要链接libelf库(dwarf库使用它)。


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

解决方案

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

这篇关于试图编译libdwarf,给出未定义的错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆