LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 01-29-2009, 09:28 AM   #1
Ace Blackwell
Member
 
Registered: Mar 2004
Location: Kentucky, USA
Distribution: SlamD 12.1 / Slack 12.0 ~ 14.2_64
Posts: 345

Rep: Reputation: 54
Eclipse and Allegro


I am trying to simply compile and run a 3 line program in Eclipse with an Allegro command. Just to verify I have things set up correctly. My problem is I don't know how to get Eclipse to include the allegro lib when telling gcc to comile/link the program. I can get Eclipse to run a simple console program until I include the Allegro stuff. I have the allegro.h include file added and I have put in the initialization lines as suggested by Allegro documentation. I have even compiled and ran from the prompt a while back. But of course that negates the "ease" of using and IDE. I keep getting an unidentified keypressed error.

Can anyone help?

Oh and if needed, I'm running SlamD64 12.1 on and HP2945se 64Bit turion x2.

Thanks in advance
Ace
 
Old 01-30-2009, 11:06 PM   #2
paulsm4
LQ Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
Does this help:

http://wiki.eclipse.org/CDT/User/FAQ
Quote:
How do I add an external library to my C++ project?

Go to Your Project's Properties by right clicking on project's name and selecting properties. Click on "C/C++ Build". Under Tool Settings Tab, click on Directories. Click on The Add Button and Select FileSystem. Select the folder with C/C++ libraries. Apply and then Ok. The new library is included.

The option commented before didn't work when I tried it. I solve it including the external library I want to add (libwsock32.a in my case) in Project->Properties->Tool Settings Tab->C++ Linker->Miscellaneous.

14:26, 18 December 2007 (EST): Neither of these worked for me under Linux. I had to open up the project's properties and go to "C/C++ Build" -> "Settings" and then hit the "Libraries" item under "GCC C++ Linker" heading in the list on the right. Then, I entered the libraries as I would in the command line ("pthread" for libpthread, etc...). (Dustin Oprea)
 
Old 02-03-2009, 08:36 AM   #3
Ace Blackwell
Member
 
Registered: Mar 2004
Location: Kentucky, USA
Distribution: SlamD 12.1 / Slack 12.0 ~ 14.2_64
Posts: 345

Original Poster
Rep: Reputation: 54
Thanks paulsm4, This put me in the right spot. I appreciate the time

Ace
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Eclipse PDT 2.0 vs Zend Studio for Eclipse NaCo Programming 1 02-01-2009 11:35 AM
LXer: Mastering Eclipse: The Eclipse workbench LXer Syndicated Linux News 0 11-01-2008 10:10 AM
LXer: Gentleware Unveils New Apollo for Eclipse and openArchitectureWare Eclipse Dist LXer Syndicated Linux News 0 10-25-2007 09:30 PM
LXer: Netbeans attempts to eclipse Eclipse LXer Syndicated Linux News 0 04-17-2006 09:54 PM
Allegro Trex005 Linux - General 6 09-06-2001 07:04 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 02:03 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration