Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I recently installed Ubuntu 12.04 and installed Netbeans 7.3 on it (not the Ubuntu version, directly from the website). I'm trying to run a basic C++ program that uses Allegro 5 but, even though it compiles, it cannot run. When the project is located on a different partition the error it gives is:

/bin/sh: 1: exec: pathToProject/dist/Debug/GNU-Linux-x86/projectName: Permission denied

However, when I copy the project directly to my home folder it gives me the following error:

X Error of failed request: BadRequest (invalid request code or no such operation) Major opcode of failed request: 154 (GLX) Minor opcode of failed request: 19 (X_GLXQueryServerString) Serial number of failed request: 13 Current serial number in output stream: 13

Here is the program if it helps:

#include <allegro5/allegro.h>

int main()
{
    al_init();
    ALLEGRO_DISPLAY *display = al_create_display (1000,1000);
    al_clear_to_color (al_map_rgb (255,255,255));
    al_flip_display ();
    al_rest(2);
}
share|improve this question

2 Answers 2

Are the glx-libraries in Ubuntu installed?

What about the mesa-glx-libraries?

share|improve this answer
    
No. Do I just type sudo apt-get install glx-libraries to install them? –  lazyCrab Jun 7 '13 at 12:00
    
Please don't add comments as answers. Invest some time in the site and you will gain sufficient privileges to upvote answers you like, or to add actual comments when seeking clarification of any issues. –  Kevin Bowen Jun 7 '13 at 16:31

no not too quick ! in your code-snippet is return missing ? or is it only one block of many different blocks ?

I was wrong - it is not matter of glx-libraries - but this is slightly off-topic here and dealing with programming in c++ resp. with g++ of gnu - what compiler you are using in netbeans ?

allegro as header-file is part in g++ of gnu, but g++ is part of netbeans.

for example gnu-compiler g++ can deal with allegro-header-file but you need to link it in it terminal.

http://www.daniweb.com/software-development/cpp/threads/68527/g-allegro-linking

as I read here allegro is at present "sticky" with g++ in netbeans - here is complete forum about ...

https://netbeans.org/ (type here as search word "allegro" in right corner)

share|improve this answer
    
I am using g++ but, as far I'm aware, I already linked allegro. Under project->properties->Linker->libraries->add options->other options and there I wrote -lallegro -lallegro_image etc. –  lazyCrab Jun 7 '13 at 20:22
    
And it was missing a return, but it does not change anything. –  lazyCrab Jun 7 '13 at 20:24

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.