03-15-07 06:14 AM
jamiil <jalqadir@gmail.com>:
> There are two [things] I would like to [address here]:
> 1.) In this LInux box I have two accounts; root and myaccount, when I
What Linux? Distro and version please. Helps us help you. :-)
> type:
> $ pkg-config gtkmm-2.4 --cflags
Are you running Slackware or one of its derivatives (ie., Zenwalk)?
Where did gtkmm-2.4 come from? How did you get it? What did you do
with it once you got it?
> I get the following message:
>
> Package gtkmm-2.4 was not found in the pkg-config search path.
> Perhaps you should add the directory containing `gtkmm-2.4.pc'
Where is gtkmm-2.4.pc?
find / -type f -name 'gtkmm-2.4.pc' -print
is the brute force method. Alternatively, if updatedb has been run
recently, "locate gtkmm-2.4.pc" might find it for you.
> 2.) I wrote this simple Makefile, which by the way is my first
> Makefile, it is a test Makefile to make sure that everyting works. The
> helloworld.??p and the main.cpp are copy/pasted from the manual's
I see "helloworld.??p" here. What's that? I assume we've a charset
collision; not your fault (I think) and pretty common these days
(drat).
> book. So, I would say that they can be trusted.
We cannot trust your typing, sorry:
> # Makefile
> # Pogrammer:
# Programmer:
> helloworld.o: helloworld.hpp
What is an ".hpp" file?
> main.cpp:1:24: gtkmm/main.h: No such file or directory
Where's gtkmm/main.h?
> In file included from main.cpp:2:
> helloworld.hpp:4:26: gtkmm/button.h: No such file or directory
> helloworld.hpp:5:26: gtkmm/window.h: No such file or directory
Ditto.
> In file included from main.cpp:2:
> helloworld.hpp:7: error: `Gtk' is not a class or namespace
Looks to me like you're missing the part where you tell the compiler
which libraries to link with.
> helloworld.hpp:8: error: `Window' is not a class or namespace
> helloworld.hpp:8: error: invalid base-class specification
Ditto.
> helloworld.hpp:19: error: syntax error before `::' token
Another typo?
> main.cpp:12:2: warning: no newline at end of file
Trivial warning. Add a blank line at the end of main.cpp to eliminate
it.
> make: *** [main.o] Error 1
>
> What am I doing wrong?
I'd say you're right on track for a newbie (no offense meant). Just
keep banging your head on that wall (google, man pages, re-read your
book), and it'll eventually fall over. We've all been there, myself
included.
Other things you might explain:
- How did you get here? What's the book you're reading?
- What are you really trying to do, and with what? What is gtkmm?
Where'd you get it (if you got it), and in what form was it
received (.rpm, .deb, .tgz, .tar.gz, ...)? Why is it involved in
your "helloworld" example proggie?
- Consider testing something even simpler than helloworld.C++ - try
helloworld.c:
#include <stdio.h>
#include <stdlib.h>
int main( int argc, char *argv[] ) {
printf( "Hello World.\n" );
exit( EXIT_SUCCESS );
}
Then:
"gcc -o helloworld helloworld.c -Wall"
(just to ensure crucial underlying bits are there and functional).
Have fun.
--
Any technology distinguishable from magic is insufficiently advanced.
(*) http://www.spots.ab.ca/~keeling Linux Counter #80292
- - http://www.faqs.org/rfcs/rfc1855.html Please, don't Cc: me.
Spammers! http://www.spots.ab.ca/~keeling/emails.html
[ Post a follow-up to this message ]
|