Debugging a makefile project [message #1733500] |
Sat, 28 May 2016 21:10 |
James Petts Messages: 5 Registered: May 2016 |
Junior Member |
|
|
Apologies if I am missing something fundamental: I cannot find any information that would point to where I might find information on this subject.
I have worked on an open-source project (Simutrans-Experimental, a fork of Simutrans) for years, mainly on Windows, although I would occasionally compile and run it from the command line in Linux.
I am now keen to work with it in an IDE in Linux so that I can debug it in a Linux environment.
I have installed Eclipse, and am able to build the executable, which runs successfully, using Eclipse, when I set it to use the existing makefile for Simutrans-Experimental. I cannot, however, find any way of getting it to run from within Eclipse with this method: it will just compile the executable.
Trying to make it work with an internal builder does not work, but I get no comprehensible error message as to why: all I get is the following:
/home/james/Documents/Simutrans/simutrans-experimental/Makefile: 1: /home/james/Documents/Simutrans/simutrans-experimental/Makefile: CFG: not found
/home/james/Documents/Simutrans/simutrans-experimental/Makefile: 2: /home/james/Documents/Simutrans/simutrans-experimental/Makefile: CFG: not found
/home/james/Documents/Simutrans/simutrans-experimental/Makefile: 2: /home/james/Documents/Simutrans/simutrans-experimental/Makefile: -include: not found
/home/james/Documents/Simutrans/simutrans-experimental/Makefile: 5: /home/james/Documents/Simutrans/simutrans-experimental/Makefile: BACKENDS: not found
/home/james/Documents/Simutrans/simutrans-experimental/Makefile: 6: /home/james/Documents/Simutrans/simutrans-experimental/Makefile: COLOUR_DEPTHS: not found
/home/james/Documents/Simutrans/simutrans-experimental/Makefile: 7: /home/james/Documents/Simutrans/simutrans-experimental/Makefile: OSTYPES: not found
/home/james/Documents/Simutrans/simutrans-experimental/Makefile: 9: /home/james/Documents/Simutrans/simutrans-experimental/Makefile: Syntax error: word unexpected (expecting ")")
which looks as though it is trying to execute the makefile, which makes no sense. If anyone has any ideas on how to make this make any sense, I should be very grateful.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Re: Debugging a makefile project [message #1801311 is a reply to message #1733678] |
Wed, 16 January 2019 14:39 |
DEVYN SISY Messages: 6 Registered: November 2018 |
Junior Member |
|
|
James Petts wrote on Tue, 31 May 2016 00:21The problem that I am having so far is that I cannot even get Eclipse to run the executable, although it will happily build it. I can only run it as I might run any binary executable (from outside Eclipse), and, of course Torrent TurboTax Gogoanime, I do not then get to use Eclipse's debugging system (which I presume from what you have written is a front-end for GDB?).
The link that you included looked promising, but what is described there appears to differ markedly from the way in which the software that I have behaves: there is no "Debug configurations" option in the "Run" menu, only "External tools configuration", and that has no "C/C++ Application" option. Do I need to install a plugin of some sort to enable this?
Thank you very much for your reply. What I really want to do is use the debugger built into Eclipse so that I can set breakpoints, examine variable values, etc., in Eclipse. Do I need to use the built-in make for that?
[Updated on: Wed, 16 January 2019 19:41] Report message to a moderator
|
|
|
Re: Debugging a makefile project [message #1801313 is a reply to message #1801311] |
Wed, 16 January 2019 15:16 |
David Vavra Messages: 1426 Registered: October 2012 |
Senior Member |
|
|
No. Eclipse is simply an editor that can access external tools.
Make is a tool Eclipse/CDT uses to have other external tools build the executable.
It usually is GNU Make.
The internal make is a Make emulator.
CDT provides a GUI interface to GDB.
As long as your executable contains the debugging information needed by GDB it should work OK.
[Updated on: Wed, 16 January 2019 15:38] Report message to a moderator
|
|
|
|
|
Re: Debugging a makefile project [message #1801812 is a reply to message #1733813] |
Sun, 27 January 2019 18:12 |
DEVYN SISY Messages: 6 Registered: November 2018 |
Junior Member |
|
|
Tauno Voipio wrote on Wed, 01 June 2016 07:19Check that you have a new enough Java on your system.
My Kubuntu 16.04LTS has OpenJDK 1.7.0_101, which works.
Dump the Eclipse installed from SarkariResultUbuntu, and load the Eclipse installer from an Eclipse download site. Use it to install the version (C/C++) you need.
https://downloader.vip/turbotax/ https://downloader.vip/rufus/
Check that your Ubuntu has the program development packages. To be sure, you can type from console:
sudo apt-get install build-essential
The project was created by importing an existing Microsoft Visual Studio Express project; the program itself is one that has been developed using Visual Studio Express for many years, but I also want to be able to work on it when I am away from my main computer (which runs Windows) and using my NUC (which runs Ubuntu Linux), which is why I want also to be able to use Eclipse.
[Updated on: Sun, 27 January 2019 19:36] Report message to a moderator
|
|
|
Powered by
FUDForum. Page generated in 0.04265 seconds