|
|
| kdevelop + allegro |
|
BackwardsDown
Member #8,018
November 2006
|
Hi, I have been reading the site and the forums, but I still dont know how to compile allegro within kdevelop. I have installed allegro, and example's from tutorials compile just fine (outside kdevelop with "$make". Can someone write in short how to set kdevelop up? Or a link to a tutorial? |
|
CGamesPlay
Member #2,559
July 2002
|
-- Ryan Patterson - <http://cgamesplay.com/> |
|
BackwardsDown
Member #8,018
November 2006
|
Quote:
niels@niels-desktop:~/Programmeer/C++/allegro2$ make I followed everyting, but with the command make it just goes completely worng:-/ |
|
HoHo
Member #4,534
April 2004
|
http://www.allegro.cc/forums/thread/513272 It used to work around a year ago, I'm not sure if it still does. IIRC iIt is based on the awiki article so it might not. __________ |
|
CGamesPlay
Member #2,559
July 2002
|
Can you post your src/Makefile.am, Makefile.am, and configure.in, please? -- Ryan Patterson - <http://cgamesplay.com/> |
|
BackwardsDown
Member #8,018
November 2006
|
Project name: allegro2 Makefile.am: Quote:
AUTOMAKE_OPTIONS = foreign 1.4 SUBDIRS = src configure.in: Quote: AC_INIT(configure.in) AM_CONFIG_HEADER(config.h) AC_LANG_CPLUSPLUS AC_OUTPUT(Makefile src/Makefile) AM_PATH_ALLEGRO([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]]) src/Makefile.am Quote:
bin_PROGRAMS = allegro2
INCLUDES= $(all_includes)
allegro2_LDFLAGS = $(all_libraries) allegro2_LDADD = $(allegro_LIBS)
Quote:
AM_PATH_ALLEGRO([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
They had to be the other way around, now it seems to compile just fine Thanks for that tread you gave me, because there was someone with the same problem. |
|
CGamesPlay
Member #2,559
July 2002
|
Please remove these lines: Quote:
AM_PATH_ALLEGRO([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]]) They were just an example At your option, you can leave AM_PATH_ALLEGRO() and instead remove AM_PATH_ALLEGRO(4.1.0). -- Ryan Patterson - <http://cgamesplay.com/> |
|
BackwardsDown
Member #8,018
November 2006
|
Quote: They were just an example Haha, I found it weird anyway::) Now I have changed the code, but it doest compile, make doesnt do anything anymore, just: my bad, made a few stupid mistakes, it works:P |
|
CGamesPlay
Member #2,559
July 2002
|
That means it's already done. It only rebuilds it if you have changed the files -- Ryan Patterson - <http://cgamesplay.com/> |
|
BackwardsDown
Member #8,018
November 2006
|
Yes, I was changing the wrong files:-/ Now it compiles fine, but when I run my program from the command line, it fails at this line: Quote: blit(my_pic, screen, 0,0,0,0,480,360); //Draw the whole bitmap to the screen at (0,0)
Quote:
niels@niels-desktop:~/Programmeer/C++/allegro2$ ./src/allegro2 I load my blit like this: Quote: my_pic = load_bitmap("picture.bmp", NULL); // Load our picture The strange thing is, that when I run my program in kdevelop with build->execute program or debug->start the program just works! |
|
HoHo
Member #4,534
April 2004
|
Problem is the programs have their working path's wront. Print out argv[0] from the main function and you'll see it is different. One obvious solution would be to execute your program from the same directory as KDevelop. __________ |
|
CGamesPlay
Member #2,559
July 2002
|
Yeah, you need to do this: -- Ryan Patterson - <http://cgamesplay.com/> |
|
BackwardsDown
Member #8,018
November 2006
|
niels@niels-desktop:~/Programmeer/C++/allegro2/src$ allegro2 Worked, But wont other people have trouble with running my future games, because they are not running it from home/niels/Programmeer/C++/allegro2/src ? |
|
CGamesPlay
Member #2,559
July 2002
|
Yes. The picture file needs to be in the same directory as the person running the program. In many cases, this is the same directory as the program. In others, this isn't, and you need to check in some other directory, for instance usr/share/games/allegro2. -- Ryan Patterson - <http://cgamesplay.com/> |
|
BackwardsDown
Member #8,018
November 2006
|
Yay, you're great;D |
|
|