tincho   01-11-2020, 04:04
#1
Hola a todos.
Hice una prueba muy rudimentaria con Extern pero no ha funcionado, dejo el código aquí por si alguien tiene ganas de resolverlo.
Código:
Library "/usr/local/lib/libredwg:0.0.11"

'EXPORT int dwg_read_file (const char *restrict filename, Dwg_Data *restrict dwg);
Private Extern dwg_read_file(filename As String, Dwg_Data As Pointer) As Integer

'EXPORT int dxf_read_file (const char *restrict filename, Dwg_Data *restrict dwg);
Private Extern dxf_read_file(filename As String, Dwg_Data As Pointer) As Integer

'EXPORT unsigned int dwg_get_layer_count (const Dwg_Data *restrict dwg);
Private Extern dwg_get_layer_count(Dwg_Data As Pointer) As Integer

Public Function info(f As String) As Pointer
  Dim info As Pointer
  Dim i As Integer
  Dim q As Integer
  i = dwg_read_file(f, info)
  q = dwg_get_layer_count(info)
  Return q
End

El archivo dwg.h se puede consultar aquí
https://git.savannah.gnu.org/cgit/libred...lude/dwg.h
Saludos.

1 Saludo.
  
Usuarios navegando en este tema: 1 invitado(s)
Powered By MyBB, © 2002-2025 MyBB Group.
Made with by Curves UI.