GTK issue
GTK issue
I am trying to access the clipboard of Ubuntu. I have tried Coder Jeffs open pipe dcop code but I don't have that here in Ubuntu.
So I want to try some GTK code but it can't find the library files.
I tried sudo apt-get install libgtk-3-dev. That was already up to date.
I installled GTK 2.0. Then I tried to isntall libgtk-2-dev and that was already a newer version.
What do I need to do to get the code here to work?
So I want to try some GTK code but it can't find the library files.
I tried sudo apt-get install libgtk-3-dev. That was already up to date.
I installled GTK 2.0. Then I tried to isntall libgtk-2-dev and that was already a newer version.
What do I need to do to get the code here to work?
-
- Posts: 8586
- Joined: May 28, 2005 3:28
- Contact:
Re: GTK issue
With fltk for FreeBASIC it's totally simple you can use: Fl_Copy and Fl_Paste.
Same code for Windows and Linux and you don't need to install any dev packages on your box.
Joshy
Same code for Windows and Linux and you don't need to install any dev packages on your box.
Joshy
Re: GTK issue
I'll try it. Thanks.
As a heads up, your Ubuntu command is wrong, you missed a 'K':
Cannot find -lGL
Google is not helping.
As it stands, I can't code anything past #include once "FLTK-c.bi" because it crashes poseiden. So I tried copy pasting a couple of demos from the download into Geany and got the library problem.
As a heads up, your Ubuntu command is wrong, you missed a 'K':
I have run into libray issuesudo cp libflt-c*.so /usr/lib
Cannot find -lGL
Google is not helping.
As it stands, I can't code anything past #include once "FLTK-c.bi" because it crashes poseiden. So I tried copy pasting a couple of demos from the download into Geany and got the library problem.
-
- Posts: 8586
- Joined: May 28, 2005 3:28
- Contact:
Re: GTK issue
if you don't need OpenGL or your current system isn't OpenGL compatible
you can replace (on top of any fltk-c code)with:
you can replace (on top of any fltk-c code)
Code: Select all
#include once "fltk-c.bi"
Code: Select all
' #include once "fltk-c.bi"
#include once "fltk-main.bi"
#include once "fltk-tools.bi"
Re: GTK issue
If fbc says lib <xyz> is missing under ubuntu you can try
or similar keywords to show a list of packages that might be related.
Code: Select all
apt-cache search xyz
Re: GTK issue
@DJ:
It still can't find this library.
ld: warning: libXft.so.2, needed by //usr/lib/libfltk-c-1.3.3-32.so, not found (try using -rpath or -rpath-link)
I have that file at /usr/lib/x86_64-linux-gnu. Why can't it see it?
I know I botched something here.
@Lizard:
Thanks for that tip.
It is so very frustrating being at the beginners end of Linux/Ubuntu as an OS. I wish I had made the switch 10 years ago.
It still can't find this library.
ld: warning: libXft.so.2, needed by //usr/lib/libfltk-c-1.3.3-32.so, not found (try using -rpath or -rpath-link)
I have that file at /usr/lib/x86_64-linux-gnu. Why can't it see it?
I know I botched something here.
@Lizard:
Thanks for that tip.
It is so very frustrating being at the beginners end of Linux/Ubuntu as an OS. I wish I had made the switch 10 years ago.
Re: GTK issue
Here it compiles and works OK. And i have no other gtk stuff installed like this:sancho3 wrote: What do I need to do to get the code here to work?
viewtopic.php?f=5&t=26148
Re: GTK issue
Do you have Mesa installed?
Something with GL? (Although this seems strange...)
Do the examples from fbc for gtk compile?
Another thing you could try would be
If some libs from gtk are missing they maybe are added.
Code: Select all
sudo apt-get install libgl1-mesa-dev
Do the examples from fbc for gtk compile?
Another thing you could try would be
Code: Select all
sudo apt-get update
Re: GTK issue
Sancho3, it looks like the problem is you're using the 32-bit version of FB, but your distro is 64-bit. So you'll need to install the 32-bit versions of the libraries and dependencies.
If I'm not mistaken, the incantation would be something like this:
FLTK would need the 32-bit version of the X11 support libraries such as libXft.
If I'm not mistaken, the incantation would be something like this:
Code: Select all
sudo apt-get install libgtk-3-dev:i386
Re: GTK issue
The install 'libgtk-3-dev:i386' failed due to some other dependency needed.
I am going try that route and see how it goes.
EDIT:
I got a GTK sample working with FB64 bit. That is what the problem was as far as GTK goes. This will open some doors for me.
Thanks very much.
'Broken packages' sounds ominous.The following packages have unmet dependencies:
libgtk-3-dev:i386 : Depends: libatk-bridge2.0-dev:i386 but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
What do you recommend going forward? Should I just start using FreeBASIC 64 bit?caseih wrote:it looks like the problem is you're using the 32-bit version of FB, but your distro is 64-bit.
I am going try that route and see how it goes.
EDIT:
I got a GTK sample working with FB64 bit. That is what the problem was as far as GTK goes. This will open some doors for me.
Thanks very much.
Re: GTK issue
Crap. Switching to FB64 runs GTK samples no problem.
But it fails with screenres.
I get 'ld: cannot find -lXpm'. Now what?
But it fails with screenres.
I get 'ld: cannot find -lXpm'. Now what?
Re: GTK issue
sudo apt-get install libxpm-dev
As was said before you can search for these things using apt-cache. Or even better, install synaptic (might be installed already) and search for the library package using the nice GUI.
To answer your other question, probably moving to 64-bit is your best bet. Linux is moving slowly to 64-bit clean more and more (only really wine requires 32-bit these days). But if you do a google search you might be able to find out how to install 32-bit libraries and their dependencies on Ubuntu or Debian. On my fedora box, it's pretty easy for the most part to install 32-bit versions of many libraries.
As was said before you can search for these things using apt-cache. Or even better, install synaptic (might be installed already) and search for the library package using the nice GUI.
To answer your other question, probably moving to 64-bit is your best bet. Linux is moving slowly to 64-bit clean more and more (only really wine requires 32-bit these days). But if you do a google search you might be able to find out how to install 32-bit libraries and their dependencies on Ubuntu or Debian. On my fedora box, it's pretty easy for the most part to install 32-bit versions of many libraries.
Re: GTK issue
I actually found it using the search and fixed it before I saw your post. But I did install another one first libxpm4. I assume that is not an issue.
The problem with the search is that there is a couple of dozen results and none of them exactly match. With limited descriptions and no real idea of what is missing, I am left to guess which library to install. Thus my first guess at libxpm4.
Thanks everyone for walking me through this.
The problem with the search is that there is a couple of dozen results and none of them exactly match. With limited descriptions and no real idea of what is missing, I am left to guess which library to install. Thus my first guess at libxpm4.
Thanks everyone for walking me through this.
Re: GTK issue
xpm4 is probably a different version of Xpm, so named so it won't clash with the version you actually needed. Eventually you'll get a feel for which libraries you need and how to find them. I sometimes do a lot of google seaching for the library itself. For example, "debian libXpm.so". Often helps me identify the package I need. Most of my experience is with RPM-based distros, though, but the process is similar.