Page 1 of 1

What are the .imp files in purelibraries?

Posted: Thu Aug 17, 2023 12:44 pm
by dougmo52usr
I tried calling gtk functions by name but they are not recognized. I have been able to call gtk using OpenLibrary and CallFunction, but it seems like PB may include declarations/prototypes for gtk, glib, gdk, etc. PureBasic must open the gtk library since it uses gtk under the hood in the linux version.

What are the .imp files in the installed purelibraries folder? Can they be used similar to an Import/EndImport?

Re: What are the .imp files in purelibraries?

Posted: Thu Aug 17, 2023 1:01 pm
by dougmo52usr
Just found out about appending a _ to the function name. I also saw references to pbsoimporter in multiple posts, but I presume the purelibraries have been imported and are ready to use as is.

Re: What are the .imp files in purelibraries?

Posted: Thu Aug 17, 2023 3:16 pm
by Fred
Yes, all the available imported functions can be found here: https://github.com/fantaisie-software/p ... on/Imports . If you want to support more, you can do a PR and it will be available in the next PB version.

Re: What are the .imp files in purelibraries?

Posted: Fri Jan 05, 2024 8:53 pm
by dougmo52usr
I'm embarrassed to ask about the .imp files again, but I can't figure out how to use the .imp files in /purebasic_6.04_LTS/purelibraries/linux. I'm running PureBasic 6.04 LTS (Linux - x64). Are these files supposed to be automatically imported? I don't see any indication that they are present in the IDE autocompletion.

How do configure the compiler to load them so I can access the functions in gtk, glib, etc?

Re: What are the .imp files in purelibraries?

Posted: Fri Jan 05, 2024 9:14 pm
by DarkDragon
dougmo52usr wrote: Fri Jan 05, 2024 8:53 pm I'm embarrassed to ask about the .imp files again, but I can't figure out how to use the .imp files in /purebasic_6.04_LTS/purelibraries/linux. I'm running PureBasic 6.04 LTS (Linux - x64). Are these files supposed to be automatically imported? I don't see any indication that they are present in the IDE autocompletion.

How do configure the compiler to load them so I can access the functions in gtk, glib, etc?
They should be automatically there. Just like WinAPI calls on Windows the gtk functions should be there on Linux. All these libraries are accessible right from the beginning.

Re: What are the .imp files in purelibraries?

Posted: Fri Jan 05, 2024 9:22 pm
by infratec
You can call them directly with a _ at the end: xxxx_()

But you need the full PB version.

Re: What are the .imp files in purelibraries?

Posted: Fri Jan 05, 2024 10:28 pm
by dougmo52usr
I bought the product several years back. I assume purchasing it means I have the full version. Is there anything in the about that tells me I am not running the full version?

Re: What are the .imp files in purelibraries?

Posted: Fri Jan 05, 2024 10:30 pm
by dougmo52usr
Sorry, I typed gtk_init and got a list. Not sure why I did not see anything the last time I tried it.

Re: What are the .imp files in purelibraries?

Posted: Fri Jan 05, 2024 10:31 pm
by DarkDragon
dougmo52usr wrote: Fri Jan 05, 2024 10:28 pm I bought the product several years back. I assume purchasing it means I have the full version. Is there anything in the about that tells me I am not running the full version?
Did you download it from the login area or the download area? I often confuse it, too and download the demo accidentally.

Edit:
Nvm