LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 11-15-2003, 10:47 PM   #1
MG-Cloud
Member
 
Registered: Nov 2003
Distribution: Gentoo
Posts: 30

Rep: Reputation: 15
Problem compiling GTK apps in Anjuta


Hi,

I just emerge'd Anjuta 1.1.98. I'm trying to teach myself how to program for Linux GUI with GTK2. I've had prior experience with Windows, but none for GTK nor using gcc.

I've copied the example GTK2 "Hello World" program from gtk.org. I selected gtk+-x11-2.0 in Compiler/Linker Settings, and went to Build -> Build. This executes:

gcc `pkg-config --cflags gtk+-x11-2.0` "gtktest.c" `pkg-config --libs gtk+-x11-2.0` -o "gtktest"

which seems nearly 100% similar to the tutorial's suggested compiling command. In fact, running this command in a terminal creates a 100% functional executable. However, Anjuta gives the following errors:

gcc: `pkg-config: No such file or directory
gcc: gtk+-x11-2.0`: No such file or directory
gcc: `pkg-config: No such file or directory
gcc: gtk+-x11-2.0`: No such file or directory
cc1: error: unrecognized option `-fcflags'
cc1: error: unrecognized option `-flibs'

This looks to me like Anjuta is just sending the command to GCC without first parsing it like a shell would (and replacing the pkg-config commands with the actual output of pkg-config). How can I fix this? Should I run it through /bin/sh or something?

Thanks for any help!
 
Old 11-16-2003, 03:02 PM   #2
MG-Cloud
Member
 
Registered: Nov 2003
Distribution: Gentoo
Posts: 30

Original Poster
Rep: Reputation: 15
Sorry, I just realized that this question may fit better in the programming forum. Could a mod please move it?

Thanks
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
problem about compiling anjuta 2.0.1 in SLES 9 hongxing Suse/Novell 7 10-19-2005 08:19 AM
problem about compiling anjuta hongxing Suse/Novell 1 10-12-2005 01:09 AM
Problem with GTK+ compiling Tsukasa Linux - Software 13 10-27-2004 11:30 PM
commands for anjuta & GTK!?? FreakboY Programming 13 07-06-2004 12:13 PM
problem in compiling anjuta freeindy Programming 1 01-21-2004 04:17 PM


All times are GMT -5. The time now is 11:07 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration