Linux version .lib format

Knowledge exchange related to the VPE Report Engine and PDF Library

Moderator: IDEAL Software Support

Linux version .lib format

Postby dCipher » Tue Oct 01, 2019 8:00 pm

Hi

I would like to incorporate VPE into a Linux application using Purebasic but I am having trouble getting the libvpes.so to work. So I wondered if you had a libvpes.lib file instead of libvpes.so. I have been able to use other libraries such as the Advantage Database library in Purebasic by using their ace32.lib.

Thanks,
Simon
dCipher
 
Posts: 21
Joined: Wed Apr 27, 2011 7:41 pm

Re: Linux version .lib format

Postby IDEAL Software Support » Wed Oct 02, 2019 12:11 am

VPE is not available as .lib. According to the Purebasic documentation, you don't need a .lib file.

See the following example:
Code: Select all
;
; ------------------------------------------------------------
;
;   PureBasic - Library
;
;    (c) Fantaisie Software
;
; ------------------------------------------------------------
;

CompilerSelect #PB_Compiler_OS
 
  CompilerCase #PB_OS_Windows

      If OpenLibrary(0, "USER32.DLL")
       
        *MessageBox = GetFunction(0, "MessageBoxW")
        If *MessageBox
          CallFunctionFast(*MessageBox, 0, @"Body", @"Title", 0)
        EndIf
       
        CloseLibrary(0)
      EndIf


  CompilerCase #PB_OS_Linux

      If OpenLibrary(0, "libc.so")
     
        *MAlloc = GetFunction(0, "malloc")
        If *MAlloc
          *Buffer = CallCFunctionFast(*MAlloc, 128)
          If *Buffer
            Debug "Buffer allocated"

            CallCFunction(0, "free", *Buffer)

          EndIf
        EndIf
     
        CloseLibrary(0)
      EndIf

  CompilerCase #PB_OS_MacOS

      If OpenLibrary(0, "libc.dylib")
     
        *MAlloc = GetFunction(0, "malloc")
        If *MAlloc
          *Buffer = CallCFunctionFast(*MAlloc, 128)
          If *Buffer
            Debug "Buffer allocated"

            CallCFunction(0, "free", *Buffer)

          EndIf
        EndIf
     
        CloseLibrary(0)
      EndIf

CompilerEndSelect
IDEAL Software Support
 
Posts: 1633
Joined: Thu Nov 18, 2004 4:03 pm

Re: Linux version .lib format

Postby dCipher » Wed Oct 02, 2019 12:58 am

Yes I am aware of this command except that OpenLibrary always fails to open libvpes.so.4.0.4 so I was looking for alternatives.

Thanks,
Simon
dCipher
 
Posts: 21
Joined: Wed Apr 27, 2011 7:41 pm

Re: Linux version .lib format

Postby IDEAL Software Support » Wed Oct 02, 2019 7:37 am

I see no reason why it should fail, except you are trying to open a 32-bit shared object (.so) with a 64-bit application or vice versa.

Otherwise you should ask in a Purebasic forum, why it fails.
IDEAL Software Support
 
Posts: 1633
Joined: Thu Nov 18, 2004 4:03 pm

Re: Linux version .lib format

Postby dCipher » Wed Oct 02, 2019 3:13 pm

Hi

I did check the 32bit vs 64bit idea and I do think that is the problem. The file I downloaded was trialvpes_linux_x64.tar.gz. I will follow up with Purebasic support.

Thanks,
Simon
dCipher
 
Posts: 21
Joined: Wed Apr 27, 2011 7:41 pm

Re: Linux version .lib format

Postby dCipher » Thu Oct 03, 2019 9:03 pm

Sorry just noticed that my previous reply should have read:

I did check the 32bit vs 64bit idea and I do not think that is the problem.
dCipher
 
Posts: 21
Joined: Wed Apr 27, 2011 7:41 pm


Return to VPE Open Forum

Who is online

Users browsing this forum: No registered users and 12 guests

cron