LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   installing gtk3.0 for use with eclipse c++ projects (https://www.linuxquestions.org/questions/linux-software-2/installing-gtk3-0-for-use-with-eclipse-c-projects-4175563585/)

zeshanuk 01-10-2016 05:57 PM

installing gtk3.0 for use with eclipse c++ projects
 
i have used apt-get to install some stuff to get gtk3.0, not working yet. can anyone guide me through the process please?

John VV 01-10-2016 06:08 PM

if you are not going to inform us as to What distro you are using
and WHAT you installed ...

There is not much we can do

install the missing ???-dev.deb files

zeshanuk 01-11-2016 03:38 AM

im using debian jessie and i installed gtk+-3.0 using apt-get.

BW-userx 01-11-2016 05:35 AM

Code:


add to search box

eclipse c++ and gtk3

click google search button

pick results

results 1

results 2

how to set up gtk in eclipse c++ debian

results 3


results 4

they may help you along

zeshanuk 01-11-2016 07:44 AM

hi i have checked i have nothing in the opt directory i dont think those instructions will help

BW-userx 01-11-2016 08:26 AM

Quote:

Originally Posted by zeshanuk (Post 5476379)
hi i have checked i have nothing in the opt directory i dont think those instructions will help

command line

Code:

find "path to look in" -name gtk3

#or

whereis gtk3

#or any variation of gtk

let me install Debain on VB and see what I can do to get it running. it'll be a few I got a download the ISO and install debain and whatever else is needed.

zeshanuk 01-11-2016 10:39 AM

Quote:

Originally Posted by BW-userx (Post 5476399)
command line

Code:

find "path to look in" -name gtk3

#or

whereis gtk3

#or any variation of gtk

let me install Debain on VB and see what I can do to get it running. it'll be a few I got a download the ISO and install debain and whatever else is needed.


Thanks for your help on this. I have searched for :

Code:

pkg-config --list-all | grep gtk
gtk-sharp-3.0                  Gtk - Gtk
gtk+-3.0                      GTK+ - GTK+ Graphical UI Library
gtk+-broadway-3.0              GTK+ - GTK+ Graphical UI Library
gtk+-unix-print-3.0            GTK+ - GTK+ Unix print support
gtk+-wayland-3.0              GTK+ - GTK+ Graphical UI Library
gtk+-x11-3.0                  GTK+ - GTK+ Graphical UI Library

then

Code:

root@Debian:/home/zeshan/workspace/chat client# whereis gtk+-3.0
gtk+-3:
root@Debian:/home/zeshan/workspace/chat client#

not sure why this happens???

then i try:

Code:

root@Debian:/home/zeshan/workspace/chat client# find / -name gtk+-3.0
root@Debian:/home/zeshan/workspace/chat client#

not sure why it doesnt find it. anyway there is something in /usr/share/gtk-3.0/blah

thanks in advance.

BW-userx 01-11-2016 11:13 AM

Quote:

Originally Posted by zeshanuk (Post 5476465)
Thanks for your help on this. I have searched for :

Code:

pkg-config --list-all | grep gtk
gtk-sharp-3.0                  Gtk - Gtk
gtk+-3.0                      GTK+ - GTK+ Graphical UI Library
gtk+-broadway-3.0              GTK+ - GTK+ Graphical UI Library
gtk+-unix-print-3.0            GTK+ - GTK+ Unix print support
gtk+-wayland-3.0              GTK+ - GTK+ Graphical UI Library
gtk+-x11-3.0                  GTK+ - GTK+ Graphical UI Library

then

Code:

root@Debian:/home/zeshan/workspace/chat client# whereis gtk+-3.0
gtk+-3:
root@Debian:/home/zeshan/workspace/chat client#

not sure why this happens???

then i try:

Code:

root@Debian:/home/zeshan/workspace/chat client# find / -name gtk+-3.0
root@Debian:/home/zeshan/workspace/chat client#

not sure why it doesnt find it. anyway there is something in /usr/share/gtk-3.0/blah

thanks in advance.

this is what I am working on now with eclipse getting it set up for c++ gtk3

I ran this
Code:

find / -name gtk*
and got this out put after installing everything that webpage said to.
Code:

.... /usr/lib/python3/dist-packages/orca/scripts/toolkits/gtk
/usr/lib/x86_64-linux-gnu/pkgconfig/gtk+-broadway-3.0.pc
/usr/lib/x86_64-linux-gnu/pkgconfig/gtk+-wayland-3.0.pc
/usr/lib/x86_64-linux-gnu/pkgconfig/gtk+-3.0.pc
/usr/lib/x86_64-linux-gnu/pkgconfig/gtk+-unix-print-3.0.pc
/usr/lib/x86_64-linux-gnu/pkgconfig/gtk+-x11-3.0.pc
....

so Maybe you do not have the proper stuff installed ...

go here and see if this will help you..

zeshanuk 01-11-2016 11:51 AM

ok i did:

Code:

apt-get install libgtk-3-dev gdb eclipse-cdt build-essential cmake git pkg-config
then:

root@Debian:/home/zeshan/workspace/chat client# find / -name gtk*
/home/zeshan/workspace/chat client/gtkwindow.cpp
root@Debian:/home/zeshan/workspace/chat client#

it seems to not find anything........

BW-userx 01-11-2016 12:20 PM

Quote:

Originally Posted by zeshanuk (Post 5476495)
ok i did:

Code:

apt-get install libgtk-3-dev gdb eclipse-cdt build-essential cmake git pkg-config
then:

root@Debian:/home/zeshan/workspace/chat client# find / -name gtk*
/home/zeshan/workspace/chat client/gtkwindow.cpp
root@Debian:/home/zeshan/workspace/chat client#

it seems to not find anything........

what are you doing in ROOT for one, and I have no idea if you installed all of them apts then you should be getting something --

ROOT is just to admin you should be in a user account using sudo or su to install apts within your user account...

if you do not want to type passwords then mod your sudoers file
Code:

nano /etc/sudoers

..

userName or (persent-sign)groupName ALL=(ALL:ALL) NOPASSWD: ALL


zeshanuk 01-11-2016 01:09 PM

Quote:

Originally Posted by BW-userx (Post 5476505)
what are you doing in ROOT for one, and I have no idea if you installed all of them apts then you should be getting something --

ROOT is just to admin you should be in a user account using sudo or su to install apts within your user account...

if you do not want to type passwords then mod your sudoers file
Code:

nano /etc/sudoers

..

userName or (persent-sign)groupName ALL=(ALL:ALL) NOPASSWD: ALL


thanks for the sudoers tip, there is data in /usr/share/gtk*

is there no way you can still help, maybe we can start over somehow...?

zeshanuk 01-11-2016 01:20 PM

reboot has done something good,

now after find / -name gtk*

Quote:

/usr/include/gtk-3.0/gtk/gtkwidget.h
/usr/include/gtk-3.0/gtk/gtkappchooserdialog.h
/usr/include/gtk-3.0/gtk/gtkprintoperation.h
/usr/include/gtk-3.0/gtk/gtkcellrenderer.h
/usr/include/gtk-3.0/gtk/gtkcalendar.h
/usr/include/gtk-3.0/gtk/gtkseparator.h
/usr/include/gtk-3.0/gtk/gtkcssprovider.h
/usr/include/gtk-3.0/gtk/gtkgesture.h
/usr/include/gtk-3.0/gtk/gtkframe.h
/usr/include/gtk-3.0/gtk/gtkcellareabox.h
/usr/include/gtk-3.0/gtk/gtkseparatormenuitem.h
/usr/include/gtk-3.0/gtk/gtktexttagtable.h
/usr/include/gtk-3.0/gtk/gtkbuildable.h
/usr/include/gtk-3.0/gtk/gtkbutton.h
/usr/include/gtk-3.0/gtk/gtkwindow.h
/usr/include/gtk-3.0/gtk/gtkgesturesingle.h
/usr/include/gtk-3.0/gtk/gtkstylecontext.h
/usr/include/gtk-3.0/gtk/gtkgesturelongpress.h
/usr/include/gtk-3.0/gtk/gtkcolorchooser.h
/usr/include/gtk-3.0/gtk/gtkbox.h
/usr/include/gtk-3.0/gtk/gtktreeview.h
/usr/include/gtk-3.0/gtk/gtkeventcontroller.h
/usr/include/gtk-3.0/gtk/gtkcelleditable.h
/usr/include/gtk-3.0/gtk/gtklayout.h
/usr/include/gtk-3.0/gtk/gtkrecentchooserwidget.h
/usr/include/gtk-3.0/gtk/gtkfilechooser.h
/usr/include/gtk-3.0/gtk/gtklistbox.h
/usr/include/gtk-3.0/gtk/gtkimcontext.h
/usr/include/gtk-3.0/gtk/gtkplug.h
/usr/include/gtk-3.0/gtk/gtkcellrendererspin.h
/usr/include/gtk-3.0/gtk/gtkbin.h
/usr/include/gtk-3.0/gtk/gtkmenutoolbutton.h
/usr/include/gtk-3.0/gtk/gtkicontheme.h
/usr/include/gtk-3.0/gtk/gtkcellrendereraccel.h
/usr/include/gtk-3.0/gtk/gtktextbuffer.h
/usr/include/gtk-3.0/gtk/gtktoolbutton.h
/usr/include/gtk-3.0/gtk/gtkappchooser.h
/usr/include/gtk-3.0/gtk/gtkfontbutton.h
/usr/include/gtk-3.0/gtk/gtkcellrenderertext.h
/usr/include/gtk-3.0/gtk/gtkentrycompletion.h
/usr/include/gtk-3.0/gtk/gtkenums.h
/usr/include/gtk-3.0/gtk/gtkfontchooser.h
/usr/include/gtk-3.0/gtk/gtkbuilder.h
/usr/include/gtk-3.0/gtk/gtkdialog.h
/usr/include/gtk-3.0/gtk/gtkdnd.h
/usr/include/gtk-3.0/gtk/gtkmodules.h
/usr/include/gtk-3.0/gtk/gtkdrawingarea.h
/usr/include/gtk-3.0/gtk/gtkselection.h
/usr/include/gtk-3.0/gtk/gtkaboutdialog.h
/usr/include/gtk-3.0/gtk/gtktoggletoolbutton.h
/usr/include/gtk-3.0/gtk/gtkscrolledwindow.h
/usr/include/gtk-3.0/gtk/gtktreeselection.h
/usr/include/wx-3.0/wx/gtk
/home/zeshan/workspace/chat client/Debug/gtkwindow.d
/home/zeshan/workspace/chat client/gtkwindow.cpp
/home/zeshan/.config/gtk-3.0
/home/zeshan/.config/gtk-2.0
/home/zeshan/.config/gtk-2.0/gtkfilechooser.ini
/etc/gimp/2.0/gtkrc
/etc/gtk-3.0
/etc/sound/events/gtk-events-2.soundlist
/etc/gtk-2.0

zeshanuk 01-11-2016 01:43 PM

I get these errors when trying to compile at cli:

Quote:

zeshan@Debian:~/workspace/chat client$ g++ -o window gtkwindow.cpp pkg-config --libs --cflags gtk-3.0
g++: error: pkg-config: No such file or directory
g++: error: gtk-3.0: No such file or directory
g++: error: unrecognized command line option --libs
g++: error: unrecognized command line option --cflags
zeshan@Debian:~/workspace/chat client$
do you think you could help further????

BW-userx 01-11-2016 02:05 PM

Quote:

Originally Posted by zeshanuk (Post 5476549)
I get these errors when trying to compile at cli:



do you think you could help further????

when I was following that instructions on that page I posted

g++: error: pkg-config

Code:

Click on Add... button and enter this repository: Name="Marketplace" and Location="http://download.eclipse.org/mpc/indigo/".


Select the "Marketplace client" and install it. Restart the eclipse IDE when needed.

Now you have Marketplace available, so lets use it. We need a tool called Pkg-config to configure all the GTK+ v3 libraries in our project.

Open again the Help menu and select the new "Eclipse Marketplace..." option. In the search bar, type the text "pkg-config" and you should get a screen like this:
 

This is the pkg-config tool for Eclipse. Press the button "Install" and restart the IDE when needed.

The pkg-config errored out saying it could not resolve what ever it was trying to do to get it installed on my install of Debian in VirtualBox ... that part is missing in order to do gtk3 in eclipse

best bet google hunt for debian pkg-config for eclipse gtk3

norobro 01-11-2016 02:52 PM

@zeshanuk - from the command line use the following:
Code:

$ g++ -o window gtkwindow.cpp $(pkg-config --libs --cflags gtk-3.0)
That's shell command substitution.

I can't help you with eclipse. Never used it.


All times are GMT -5. The time now is 07:10 AM.