Page 1 of 1

Using Allegro with netbeans in using linux Setting up allegro with netbeans for linux Rate Topic: -----

#1 haiyun211  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 1
  • View blog
  • Posts: 58
  • Joined: 27-July 09

Posted 19 September 2009 - 04:37 PM

Hi all, I decided to do this tutorial because there is not much documentation on the subject of using allegro with Netbeans on a Linux machine. Ok lets get started. I am assuming that you already have Netbeans installed and have it set-up for C/C++.

Start up Netbeans you should see a screen that looks like this:
Attached Image


Now select File->New Project and select C/C++ and then C/C++ application then press next
Attached Image

Enter in the name of the project and the location you want to put it and click finish
Attached Image


You should now see on the left hand side something like this you may need to expand your project
Attached Image

now right click on the Source Files and select New-> Empty C++ File then call the file what you want to call it and click finish
Attached Image


Now this next step you can either do right now or right before you build it. Ok go to file-> Project Properties it will pull up this window
Attached Image

The new file should look something like this
Attached Image
you now need to click on linker witch will bring up this
Attached Image

now click on the symbol by libraries that looks like this (...) and the window pulled up is this
Attached Image


Now click on the add option button then click on the other option and now the most important part open up a terminal and type in
allegro-config --libs --static



Attached Image
then put the output in the other option place and that should be it for configuring it
Attached Image

now we can put the code into the source file and then build and run and if it worked then you should see a blank black screen and push a key and it should end any problems or question please reply and I will do what I can to help.
#include <allegro.h>

int main()
{
	allegro_init();
	install_keyboard();
	set_gfx_mode(GFX_AUTODETECT, 640, 480, 0, 0);

	readkey();

	return 0;
}
END_OF_MAIN();


Attached Image

Is This A Good Question/Topic? 0
  • +

Replies To: Using Allegro with netbeans in using linux

#2 Guest_spondbob*


Reputation:

Posted 01 June 2010 - 03:57 AM

View Posthaiyun211, on 19 September 2009 - 03:37 PM, said:

Hi all, I decided to do this tutorial because there is not much documentation on the subject of using allegro with Netbeans on a Linux machine. Ok lets get started. I am assuming that you already have Netbeans installed and have it set-up for C/C++.

Start up Netbeans you should see a screen that looks like this:
Attachment attachment


Now select File->New Project and select C/C++ and then C/C++ application then press next
Attachment attachment

Enter in the name of the project and the location you want to put it and click finish
Attachment attachment


You should now see on the left hand side something like this you may need to expand your project
Attachment attachment

now right click on the Source Files and select New-> Empty C++ File then call the file what you want to call it and click finish
Attachment attachment


Now this next step you can either do right now or right before you build it. Ok go to file-> Project Properties it will pull up this window
Attachment attachment

The new file should look something like this
Attachment attachment
you now need to click on linker witch will bring up this
Attachment attachment

now click on the symbol by libraries that looks like this (...) and the window pulled up is this
Attachment attachment


Now click on the add option button then click on the other option and now the most important part open up a terminal and type in
allegro-config --libs --static



Attachment attachment
then put the output in the other option place and that should be it for configuring it
Attachment attachment

now we can put the code into the source file and then build and run and if it worked then you should see a blank black screen and push a key and it should end any problems or question please reply and I will do what I can to help.
#include <allegro.h>

int main()
{
	allegro_init();
	install_keyboard();
	set_gfx_mode(GFX_AUTODETECT, 640, 480, 0, 0);

	readkey();

	return 0;
}
END_OF_MAIN();


Attachment attachment


hi, this what i'm looking for,
but i have a probelm with allegro-config. i can't find it even in the repository, but i've installed allegro and allegro-tools. maybe you have another way. nice to share with you.

ps:i'm using openSUSE 11.2
Was This Post Helpful? 0

#3 haiyun211  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 1
  • View blog
  • Posts: 58
  • Joined: 27-July 09

Posted 02 June 2010 - 07:53 AM

View Postspondbob, on 01 June 2010 - 02:57 AM, said:

View Posthaiyun211, on 19 September 2009 - 03:37 PM, said:

Hi all, I decided to do this tutorial because there is not much documentation on the subject of using allegro with Netbeans on a Linux machine. Ok lets get started. I am assuming that you already have Netbeans installed and have it set-up for C/C++.

Start up Netbeans you should see a screen that looks like this:
Attachment attachment


Now select File->New Project and select C/C++ and then C/C++ application then press next
Attachment attachment

Enter in the name of the project and the location you want to put it and click finish
Attachment attachment


You should now see on the left hand side something like this you may need to expand your project
Attachment attachment

now right click on the Source Files and select New-> Empty C++ File then call the file what you want to call it and click finish
Attachment attachment


Now this next step you can either do right now or right before you build it. Ok go to file-> Project Properties it will pull up this window
Attachment attachment

The new file should look something like this
Attachment attachment
you now need to click on linker witch will bring up this
Attachment attachment

now click on the symbol by libraries that looks like this (...) and the window pulled up is this
Attachment attachment


Now click on the add option button then click on the other option and now the most important part open up a terminal and type in
allegro-config --libs --static



Attachment attachment
then put the output in the other option place and that should be it for configuring it
Attachment attachment

now we can put the code into the source file and then build and run and if it worked then you should see a blank black screen and push a key and it should end any problems or question please reply and I will do what I can to help.
#include <allegro.h>

int main()
{
	allegro_init();
	install_keyboard();
	set_gfx_mode(GFX_AUTODETECT, 640, 480, 0, 0);

	readkey();

	return 0;
}
END_OF_MAIN();


Attachment attachment


hi, this what i'm looking for,
but i have a probelm with allegro-config. i can't find it even in the repository, but i've installed allegro and allegro-tools. maybe you have another way. nice to share with you.

ps:i'm using openSUSE 11.2


What is the output when you use type allegro-config into the terminal?
Was This Post Helpful? 0
  • +
  • -

#4 saidbakr  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 18-August 10

Posted 18 August 2010 - 04:05 PM

First of all, I would like to thank you for the tutorial. My reply is just a suggestion. In general, tutorial is an answer for a question or series of questions. It may be better to add a simple link to some resource that introduce or define " Allegro ". My suggestion may seem stupid, however, knowing something new may come by coincidence and regarding a link for the Allegro will make things more easier.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1