Ubuntu Eclipse CDT & software distribution?

2017-01-11  Source: Original Site  Category:Ubuntu  Views:241 


I'm a new programmer, about to start a 4 year computer science course in London. I've been programming in KDevelop for a little while with C++ & SDL, but I found KDevelop over complicated, under documented and with poor support. I recently switched to Eclipse CDT which seems user friendly and well documented (it's a little slower than KDevelop, but my machine runs it smoothly).

I have made a simple game which has a few data files (.ttf and .png's), adding the files using the Eclipse project explorer.

How would you suggest I distribute this software? Should I look into creating a makefile to install it, or can Eclipse do this for me? If Eclipse can't do anything for me I would probably be happy to distribute just the executables and data files necessary to run the software (I'm not talking about selling the software, just sending to a friend or whatever). But this latter method isn't possible with the problem described below.

Also, when I browse to the project directory in Konqueror and try to run the executable by double clicking it it closes immediately (I'm guessing because it can't open fonts/FreeSans.ttf or something).

The directory structure is something like:

This is where Eclipse put the datafiles, and this is fine when I run from Eclipse.

Anywho, I would guess I can't run it by double clicking it in Konqueror because Eclipse hasn't put the data in the Release or Debug subdirectories so I copy it there manually, and now this allows me to cd to the Release dir and run the program, but it still closes immediately after double clicking.

Where is it looking the font when I double click in Konqueror? I'm going to have another guess that I could fix this by making my program open the font using an absolute path rather than LoadFont( "fonts/FreeSans.ttf" ) which it does now. If this is the best way, how would I go about doing this in C++?

Related articles
  • Ubuntu Eclipse CDT & software distribution? 2017-01-11

    I'm a new programmer, about to start a 4 year computer science course in London. I've been programming in KDevelop for a little while with C++ & SDL, but I found KDevelop over complicated, under documented and with poor support. I recently switched t

  • Ubuntu Eclipse CDT Troubles 2013-09-27

    I am running Eclipse CDT that I installed using Ubuntu Software Center. When I make a simple Hello World program I get an error message saying undefined reference to `main' If I add the canned C Hello World project to the workspace I still have the s

  • Ubuntu Eclipse CDT on Dapper Drake 2012-07-19

    Arggh, I searched all over google, yahoo, and msn and could not find the solution to this problem. Whenever I go to "File -> New -> Standard Make C Project", I get one of two errors: Plug-in "org.eclipse.cdt.make.ui" was unable to instantiate c

  • Ubuntu Eclipse CDT, so slow it's driving me crazy... 2013-04-02

    a few weeks ago I had made a post here about which IDE to choose from Eclipse CDT, KDevelop, Anjuta and Code::Blocks for C/C++ development. and I had decided to go with Eclipse's CDT. However, I recently started some real programming and it's running

  • Ubuntu Eclipse CDT unresolved include 2014-02-22

    Ubuntu 10.10 Ecelipse-cpp-helios-SR2-linux with eclipse-cdt C and C++ project are fine when i create a makefile project use #include for C or for C++ all gave unresolved inclusion: error, so that i can't build project Please Help I'm having trouble r

  • Ubuntu Eclipse-CDT Package Outdated? 2015-02-11

    I'm no programmer, but wanted to start self-educating myself on C using Eclipse and the CDT plugin. However, when I installed the eclipse and eclipse-cdt (ver. 3.0.1-3) packages via synaptic, I keep getting "Error notifying a preference change listen

  • Ubuntu Eclipse CDT+GTKMM 2012-08-04

    guys!! I am using the Eclipse CDT and program mainly in C++. I have tried anjuta, but I much prefer Eclipse CDT, mainly because the autocomplete in anjuta is terrible. Has anyone managed to use the Eclipse CDT and GTKMM together and compiled a workin

  • Ubuntu Eclipse CDT & GTK setup issues 2012-08-14

    I've never set up Eclipse CDT to use GTK before, and I'm having some issues with it. I have the following program to make sure that I've set things up right: #include <gtk/gtk.h> int main(int argc, char *argv[]) { GtkWidget *window; gtk_init(

  • Ubuntu eclipse CDT plugin error 2012-11-16

    i was trying to install CDT plugin for eclipse3.1 (which i installed from kubuntu repositories) and i get this error: Unable to complete action for feature "Eclipse C/C++ Development Tools" due to errors. Unable to create file "/usr/local/lib/eclipse

  • Ubuntu eclipse CDT 2012-12-03

    I tried to install eclipse CDT, but got following message: E: Couldn't find package eclipse-cdt Is it possible to install CDT via apt-get ???

  • Ubuntu Eclipse CDT startup error? 2012-12-31

    I just installed eclipse + eclipse-cdt to work on some projects in "C" and I am running 7.10. When I start eclipse, I get these error messages shown below in the welcome panel. Do you guys have any thoughts on where to start to resolve this issue? I

  • Ubuntu eclipse + cdt + pdt 2013-03-30

    i thought this would be the best forum for my questions, so does anybody know how to install eclipse + cdt + pdt all together, so i may code in java, c++ and php? Do i have to install both versions side by side?

  • Ubuntu eclipse-cdt not found in karmic 2013-05-25

    Can't install eclipse-cdt in 9.10 . I've heard that eclipse's support for c/c++ is buggy at best, does the exclusion from the repos mean that its so lousy canonical won't declare one stable enough for the repos? Just curious, I've gone back to my jav

  • Ubuntu Eclipse CDT lock ups 2013-08-03

    Considering this is a question concerning an IDE, and not programming itself, perhaps I'm posting in the wrong forum... anyway. I've installed Eclipse and Eclipse CDT (for C++ development) on a fresh Jaunty install. The problem I keep getting is that

  • Ubuntu Eclipse CDT using a lot of CPU 2013-12-26

    Eclipse CDT was using a lot of CPU for code completion. I have turned it off but when I typed the ">" in std::set<AClass>, CPU usage went up again. What could the problem be? It's running on Sun Java 6 64bits. I love this IDE but it's too sl

  • Ubuntu Eclipse CDT, cant include library 2014-03-16

    I am just making "hello world" app in Eclipse CDT. I have installed zlib 1.2.3 zlib.h is present an compiler sees it. "libz.so" is present in /usr/lib But g++ linker cand resolve external symbol. e.g. "compress" hello.cpp:(.text+0x33e): undefined ref

  • Ubuntu Eclipse CDT & build console focus 2014-08-13

    I'm using Eclipse CDT (Galileo). I typically have the code editor in one workspace and the console detached and maximized in another workspace. When I click the Eclipse task bar item, it takes me to the window with the debug/build console rather than

  • Ubuntu Eclipse + cdt slow because of java (I guess) 2013-08-19

    Hi I installed eclise in my ubuntu 8.10 and when I do a: ex-> It bloks So the -> is to call cdt tools and when I do that I have to wait 1 min (BORING) lol. I think that the problem is my java version because I've a friend with eclipse running w

  • Ubuntu Eclipse CDT error 2012-10-10

    I am using CDT and I'd like to start writing code in Eclipse but when I create a project and then a source file I get an error: undefined reference to `main'. I can't write anything because of it, if I write something and run it it does not work. I t

  • Ubuntu Eclipse CDT - float result displayed like integer 2012-12-13

    Can anyone help me with this problem? I just installed Eclipse and CDT and tried a simple code like this: int a,b; float c; c=a/b; cout << c; What I get as a result is an integer. Any ideas?