Do NOT use "Dynamic CPU" in Compiler Settings for DLL's in Purebasic

Started by Theo Gottwald, December 27, 2024, 12:19:45 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Theo Gottwald

I'm currently using version 6.2.0 Beta 2 of PureBasic, but I've been facing this issue for several months across previous versions as well.

When the Dynamic CPU option is enabled in the PureBasic compiler settings and DLLs are created for use in a PowerBasic program, the PowerBasic executable fails to start. There's no error message indicating a DLL issue; it simply states that the file cannot be launched, which is quite unhelpful. Therefore, it's best to avoid using the Dynamic CPU setting in PureBasic's compiler settings for DLLs.

#PureBasic #PowerBasic #DLLs #CompilerSettings #SoftwareDevelopment 🚀💻🔧❗️🛠�✨

[German/deutscch]
Ich verwende derzeit Version 6.2.0 Beta 2 von PureBasic, aber ich habe seit einigen Monaten ein Problem, das auch bei früheren Versionen auftrat. Wenn die Option "Dynamic CPU" in den PureBasic Compiler-Einstellungen aktiviert ist und DLLs zur Verwendung in einem PowerBasic-Programm erstellt werden, startet das PowerBasic-Executable nicht. Es gibt keine Fehlermeldung, die auf ein DLL-Problem hinweist; es heißt lediglich, dass die Datei nicht gestartet werden kann, was ziemlich wenig hilfreich ist. Daher ist es am besten, die Verwendung der Dynamic CPU-Einstellung in PureBasic's Compiler-Einstellungen für DLLs zu vermeiden.

#PureBasic #PowerBasic #DLLs #CompilerEinstellungen #SoftwareEntwicklung

Charles Pegge

Hi Theo,

Have you tried late-loading the PureBasic DLLs with LoadLibrary and GetProcAddress to see if you can get valid function pointers ?