estoy tratando de utilizar la biblioteca de BFD, y por eso me he instalado el paquete binutils-dev
y han incluido:binutils/bfd.h quiere config.h ahora?
#include <bfd.h>
y estoy llamando bfd_openr
y bfd_close
y así sucesivamente de mi código.
paquetes y recientemente he actualizado ahora me sale un error de aquí:
bfd.h:
/* PR 14072: Ensure that config.h is included first. */
#if !defined PACKAGE && !defined PACKAGE_VERSION
#error config.h must be included before this header
#endif
... que deba incluir config.h
- pero no estoy usando autoconf.
¿Estoy incluyendo el archivo de encabezado incorrecto? ¿Cómo se supone que debes usar binutils-dev?
Aquí es un programa de demostración:
#include <stdio.h>
#include <bfd.h>
int main()
{
bfd_init();
bfd* file = bfd_openr("a.out", 0);
if (!file)
return -1;
if (bfd_check_format(file, bfd_object))
printf("object file\n");
else
printf("not object file\n");
bfd_close(file);
return 0;
}
intento para compilar y ejecutar la siguiente manera:
$ sudo apt-get install binutils-dev
$ gcc test.c
In file included from test.c:3:0:
/usr/include/bfd.h:37:2: error: #error config.h must be included before this header
relacionadas: http://sourceware.org/bugzilla/show_bug.cgi?id= 14243 – cnicutar