School Assignment? Project Due Tomorrow? Chat LIVE With A Programming Expert!

Welcome to Dream.In.Code
Become an Expert!

Join 307,003 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 1,963 people online right now. Registration is fast and FREE... Join Now!




Using Allegro with netbeans in using linux

 
Reply to this topicStart new topic

> Using Allegro with netbeans in using linux, Setting up allegro with netbeans for linux

haiyun211
Group Icon



post 19 Sep, 2009 - 03:37 PM
Post #1


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
CODE

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.
CODE

#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
Go to the top of the page
+Quote Post


Register to Make This Ad Go Away!


Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 


Lo-Fi Version Time is now: 11/21/09 06:37AM

Live Help!

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter Fan Us On Facebook

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month