What are the .imp files in purelibraries?

Just starting out? Need help? Post your questions and find answers here.
dougmo52usr
User
User
Posts: 62
Joined: Mon Jul 18, 2016 6:43 pm

What are the .imp files in purelibraries?

Post 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?
dougmo52usr
User
User
Posts: 62
Joined: Mon Jul 18, 2016 6:43 pm

Re: What are the .imp files in purelibraries?

Post 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.
Fred
Administrator
Administrator
Posts: 18162
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: What are the .imp files in purelibraries?

Post 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.
dougmo52usr
User
User
Posts: 62
Joined: Mon Jul 18, 2016 6:43 pm

Re: What are the .imp files in purelibraries?

Post 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?
DarkDragon
Addict
Addict
Posts: 2344
Joined: Mon Jun 02, 2003 9:16 am
Location: Germany
Contact:

Re: What are the .imp files in purelibraries?

Post 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.
bye,
Daniel
infratec
Always Here
Always Here
Posts: 7582
Joined: Sun Sep 07, 2008 12:45 pm
Location: Germany

Re: What are the .imp files in purelibraries?

Post by infratec »

You can call them directly with a _ at the end: xxxx_()

But you need the full PB version.
dougmo52usr
User
User
Posts: 62
Joined: Mon Jul 18, 2016 6:43 pm

Re: What are the .imp files in purelibraries?

Post 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?
dougmo52usr
User
User
Posts: 62
Joined: Mon Jul 18, 2016 6:43 pm

Re: What are the .imp files in purelibraries?

Post 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.
DarkDragon
Addict
Addict
Posts: 2344
Joined: Mon Jun 02, 2003 9:16 am
Location: Germany
Contact:

Re: What are the .imp files in purelibraries?

Post 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
bye,
Daniel
Post Reply