PB6.10+ ARM : DYLIB cannot be loaded from C++ (QT)

Post bugreports for the Mac OSX version here
Niffo
Enthusiast
Enthusiast
Posts: 504
Joined: Tue Jan 31, 2006 9:43 am
Location: France

PB6.10+ ARM : DYLIB cannot be loaded from C++ (QT)

Post by Niffo »

The following code compiled as a shared dylib with PB6.10 ARM (and newer) cannot be opened by a C++ (QT) program. (QLibrary.load() never returns).
The problem does not exist if compiled with PB6.04 ARM.
GetCurrentDirectory() is a content that allow to reproduce but it is not the only one.

Code: Select all

ProcedureDLL EFK_open()
   Define a$ = GetCurrentDirectory()
EndProcedure
  
; IDE Options = PureBasic 6.11 LTS - C Backend (MacOS X - arm64)
; ExecutableFormat = Shared .dylib
Niffo
Niffo
Enthusiast
Enthusiast
Posts: 504
Joined: Tue Jan 31, 2006 9:43 am
Location: France

Re: PB6.10+ ARM : DYLIB cannot be loaded from C++ (QT)

Post by Niffo »

In fact, DLL generation seems to be problematic with the "C - Backend" compiler. Indeed, our library crashes even under MacOS Intel (x64) when compiled with PureBasic > 6.02.
Last edited by Niffo on Mon Nov 18, 2024 6:22 pm, edited 1 time in total.
Niffo
Fred
Administrator
Administrator
Posts: 18207
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: PB6.10+ ARM : DYLIB cannot be loaded from C++ (QT)

Post by Fred »

Moved here as it's not mac only.
Niffo
Enthusiast
Enthusiast
Posts: 504
Joined: Tue Jan 31, 2006 9:43 am
Location: France

Re: PB6.10+ ARM : DYLIB cannot be loaded from C++ (QT)

Post by Niffo »

I made a mistake, it's only on MacOS (ARM and x64) with the "C Backend" compiler. You should be able to put the thread back in "Bugs - MacOS"
Niffo
Fred
Administrator
Administrator
Posts: 18207
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: PB6.10+ ARM : DYLIB cannot be loaded from C++ (QT)

Post by Fred »

I tried in C++ with dlopen() and it works, do you have more info why it could fail with QT ?
Post Reply