Problems with libraries and prototypes

Raspberry PI specific forum
User avatar
holzhacker
Enthusiast
Enthusiast
Posts: 123
Joined: Mon Mar 08, 2010 9:14 pm
Location: "Mens sana in corpore sano"
Contact:

Problems with libraries and prototypes

Post by holzhacker »

First of all, THANK YOU SO MUCH FRED, I love FANTAISIE Software. As I was hoping for an ARM version for PB <3. Unfortunately with my busy life, only this week I managed to get my ARMs out of the box and start testing.

Everything I've seen so far excites me a lot. FRED, put some voluntary donations button on the site, or do some crowdfunding campaign to support PB that I will definitely help (a little at a time, but whenever I can).

Let's go to the problem found in PB6.0-Beta3 Arm32:

Code: Select all

If OpenLibrary(0, #PB_Compiler_Home + "compilers/libmariadb.dll")
   If ExamineLibraryFunctions(0)
     For i=0 To CountLibraryFunctions(0) -1
       Debug "["+Str(i)+"] -  " + LibraryFunctionName()
       NextLibraryFunction()
     Next
     
   Else
    Debug "Error: " + Str(i)  
   EndIf
  
Else
  Debug "Error" 
EndIf

Debug "Total functions: " + Str(i)

There is a problem with the library handling functions, with the code above, the function names are not displayed, I also noticed that there is a difference in the number and of the functions for the windows version of the library libmariadb win<>arm.

As for Prototyping:

I'm prototyping a specific library and I could see that it doesn't work with the native subsystem, but when I switch to gtk2 or qt it works, still without returning the name of the functions, but the prototyping starts to work as expected . It works fine on Windows32, 64, I couldn't test on Linux64 because my main computer burned and I'm waiting for the spare parts to arrive so I can test on Linux64.

Code: Select all

System used in compilation (compiles well +faster):
OrangePi Plus 2e - 2Gb RAM - 16Gb EMMC Flash (internal)
OS: Armbian 21.08 Focal XFCE / Kernel 5.10.y, Size: 902Mb, Updated: Aug 26, 2021

System used in tests: OrangePi Plus 2e and RaspiberryPi 2B
Soon I will test on my other boards: RPB2+, RPB3, Odroid, OrangePi Zero and BananaPi
Greetings and thanks!

Romerio Medeiros
romerio@gmail.com
User avatar
mk-soft
Always Here
Always Here
Posts: 5335
Joined: Fri May 12, 2006 6:51 pm
Location: Germany

Re: Problems with libraries and prototypes

Post by mk-soft »

Library '*.dll' :?:
I think library '*.so' is better :wink:

Returning the function names of a library has not worked for a long time, I think.
Does not work under Linux 64 with PB v5.73 and v.6.00.
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
User avatar
holzhacker
Enthusiast
Enthusiast
Posts: 123
Joined: Mon Mar 08, 2010 9:14 pm
Location: "Mens sana in corpore sano"
Contact:

Re: Problems with libraries and prototypes

Post by holzhacker »

Library '*.dll' :?:
I think library '*.so' is better
Yes my, just tested the operation in version PB6.0-B3 on windows friend to report. :wink:

Code: Select all

  EnableExplicit

DeclareModule NFe
  
  CompilerSelect #PB_Compiler_Processor
    CompilerCase #PB_Processor_Arm32
      #ACBrLibNFe$ = "libacbrnfearm.so"
      #Plataforma$ = "Arm32"
    CompilerCase #PB_Processor_x86
      #Plataforma$ = "x86"
      If #PB_Compiler_OS = #PB_OS_Windows
        #ACBrLibNFe$ = "ACBrLibNFe.dll"    
      ElseIf #PB_Compiler_OS = #PB_OS_Linux
        #ACBrLibNFe$ = "libacbrnfe32.so"    
      EndIf
    CompilerCase #PB_Processor_x64
      #Plataforma$ = "x64"
      If #PB_Compiler_OS = #PB_OS_Windows
        #ACBrLibNFe$ = "ACBrLibNFe64.dll"    
      ElseIf #PB_Compiler_OS = #PB_OS_Linux
        #ACBrLibNFe$ = "libacbrnfe64.so"    
      EndIf
    CompilerDefault
      MessageRequester("Atenção!", "Os recursos da: " + #ACBrLibNFe$ + " não estão disponíveis para este sistema!", 
                       #PB_MessageRequester_Error)
      End      
  CompilerEndSelect
  
  ...
  
  

In the version of my app that I checked the problem, it is mentioned for compatible platforms.

Note: This library (ACBrLib) in question is a tax library that interfaces sales tax documents with the government tax server, sending digitally signed XML files (SOAP), I compile them in Lazarus. As reported in the initial post, prototyping doesn't work with the default subsystem, however changing to GTK2 or QT does.
Greetings and thanks!

Romerio Medeiros
romerio@gmail.com
Post Reply