Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » zlib and make issues
zlib and make issues [message #66452] Wed, 09 April 2003 15:10 Go to next message
Eclipse UserFriend
Originally posted by: bart.torbert.ihsenergy.com

I have just been thrown into the LINUX world and told to get some of my
C++ code running under LINUX. My company is moving rapidly to JAVA using
eclipse. So I figure if I can plug my legacy C++ code in to the CDT, I am
in sync with the development environment the rest of the company is going
to.

Now here are my problems----
WE use the zlib compression package. I have loaded the source code etc.
onto my LINUX box (running SUSE 8.1). I can build zlib by just running
the make command on the command line. But I can not ge CDT to deal with
it.

On the online FAQ the instruction is given to not use the default CDT but
to use the custom command "make -f makefile". Why won't the default
command work? What is the default command doing?

Even when I point the custom build command to point to the zlib makefile,
I get errors. What am I missing here.

In the CDT interface you can bring up "Make Targets" window. Can anyone
explain how this is supposed to work. You can add targets, but you can
not edit them or tie them to the makefile. How does this interact with
the build command?


Also a side issue--- Does anybody know how to get eclipse to run from a
LINUX desktop shortcut? The only way I can get it to run at the moment
is to bring up a terminal window, cd to the eclipse directory and run it
from the commmand prompt. Why don't shortcuts work?

Bart Torbert
bart.torbert@ihsenergy.com
Re: zlib and make issues [message #66495 is a reply to message #66452] Wed, 09 April 2003 15:49 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: bart.torbert.ihsenergy.com

To answer my own question----
my problem was somehow caused by having the make file and the .project
file in different directories (or something like that). I deleted the
project and rebuilt it and things are happier now.

THe "Make Targets" window and the desktop short cut is still a mystery
though.

Bart


Bart Torbert wrote:

> I have just been thrown into the LINUX world and told to get some of my
> C++ code running under LINUX. My company is moving rapidly to JAVA using
> eclipse. So I figure if I can plug my legacy C++ code in to the CDT, I am
> in sync with the development environment the rest of the company is going
> to.

> Now here are my problems----
> WE use the zlib compression package. I have loaded the source code etc.
> onto my LINUX box (running SUSE 8.1). I can build zlib by just running
> the make command on the command line. But I can not ge CDT to deal with
> it.

> On the online FAQ the instruction is given to not use the default CDT but
> to use the custom command "make -f makefile". Why won't the default
> command work? What is the default command doing?

> Even when I point the custom build command to point to the zlib makefile,
> I get errors. What am I missing here.

> In the CDT interface you can bring up "Make Targets" window. Can anyone
> explain how this is supposed to work. You can add targets, but you can
> not edit them or tie them to the makefile. How does this interact with
> the build command?


> Also a side issue--- Does anybody know how to get eclipse to run from a
> LINUX desktop shortcut? The only way I can get it to run at the moment
> is to bring up a terminal window, cd to the eclipse directory and run it
> from the commmand prompt. Why don't shortcuts work?

> Bart Torbert
> bart.torbert@ihsenergy.com
Re: zlib and make issues [message #66515 is a reply to message #66452] Wed, 09 April 2003 15:50 Go to previous messageGo to next message
Serge Yuschenko is currently offline Serge YuschenkoFriend
Messages: 15
Registered: July 2009
Junior Member
I ran into the same kind of problem on QNX platform. Every time I tried to
build a project I got a message "No rule to make target all". When I go to
that directory in file system and start "make" there, everything works
fine. I figured out that when you build a project from eclipse, the make
runs in a wrong place. I replaced default make invocation with the "make
-C<project full path>" and it started to work.


Bart Torbert wrote:

> I have just been thrown into the LINUX world and told to get some of my
> C++ code running under LINUX. My company is moving rapidly to JAVA using
> eclipse. So I figure if I can plug my legacy C++ code in to the CDT, I am
> in sync with the development environment the rest of the company is going
> to.

> Now here are my problems----
> WE use the zlib compression package. I have loaded the source code etc.
> onto my LINUX box (running SUSE 8.1). I can build zlib by just running
> the make command on the command line. But I can not ge CDT to deal with
> it.

> On the online FAQ the instruction is given to not use the default CDT but
> to use the custom command "make -f makefile". Why won't the default
> command work? What is the default command doing?

> Even when I point the custom build command to point to the zlib makefile,
> I get errors. What am I missing here.

> In the CDT interface you can bring up "Make Targets" window. Can anyone
> explain how this is supposed to work. You can add targets, but you can
> not edit them or tie them to the makefile. How does this interact with
> the build command?


> Also a side issue--- Does anybody know how to get eclipse to run from a
> LINUX desktop shortcut? The only way I can get it to run at the moment
> is to bring up a terminal window, cd to the eclipse directory and run it
> from the commmand prompt. Why don't shortcuts work?

I'm not a LINUX specialist, but just making an analogy with any other *NIX
I would guess that you need to check your environment variables prior to
desktop start. I believe all required variables are set in terminal shell.

> Bart Torbert
> bart.torbert@ihsenergy.com
Re: zlib and make issues [message #66558 is a reply to message #66452] Wed, 09 April 2003 19:50 Go to previous message
Henning Riedel is currently offline Henning RiedelFriend
Messages: 310
Registered: July 2009
Senior Member
Bart Torbert schrieb:
> I have just been thrown into the LINUX world and told to get some of my
> C++ code running under LINUX. My company is moving rapidly to JAVA using
> eclipse. So I figure if I can plug my legacy C++ code in to the CDT, I am
> in sync with the development environment the rest of the company is going
> to.
>
> Now here are my problems----
> WE use the zlib compression package. I have loaded the source code etc.
> onto my LINUX box (running SUSE 8.1). I can build zlib by just running
> the make command on the command line. But I can not ge CDT to deal with
> it.
>
> On the online FAQ the instruction is given to not use the default CDT but
> to use the custom command "make -f makefile". Why won't the default
> command work? What is the default command doing?
>

In the FAQ is stated, that it's for Windows.
Also, make will look by default for 'Makefile' instead of 'makefile'.
The option '-f makefile' will make look for a lowercase make-file.
Also if you happen to have subprojects, you can tell make where to start
by the '-C <path>' option.

> Even when I point the custom build command to point to the zlib makefile,
> I get errors. What am I missing here.
>
> In the CDT interface you can bring up "Make Targets" window. Can anyone
> explain how this is supposed to work. You can add targets, but you can
> not edit them or tie them to the makefile. How does this interact with
> the build command?

Let's say you have three different targets defined in you makefile:
all:
debug:
install:

The standard Eclipse behaviour on Build and Rebuild is to call:
make clean
make

The second make call depends on what the first target rule is in your
makefile or if you have set .DEFAULT in your makefile, what is set there.

You can add more targets within Eclipse and use them, so they have to
correspond to your makefile targets. E.g. you could add targets for
building zlib or an Application like:

zlib:
$(MAKE) -C zlibdir all

zlibd:
$(MAKE) -C zlibdir debug

Application: $(APP_OBJECTS)
$(LD) -o $@ $^ $(LDFLAGS)

> Also a side issue--- Does anybody know how to get eclipse to run from a
> LINUX desktop shortcut? The only way I can get it to run at the moment
> is to bring up a terminal window, cd to the eclipse directory and run it
> from the commmand prompt. Why don't shortcuts work?

It depends on your Desktop. You should consult the KDE or Gnome or
whatever desktop Manual, how to create an Desktop Shortcut.
The execute statement should be something like:

$ECLIPSE_PATH/eclipse -data $HOME/workspace

Here you have to set $ECLIPSE_PATH if eclipse is not in your standard
binary-searchpath PATH. The -data option points Eclipse to a workspace.

> Bart Torbert
> bart.torbert@ihsenergy.com
>

H.Riedel
Previous Topic:GDB attaching to a remote running process
Next Topic:debugging in QNX
Goto Forum:
  


Current Time: Fri Oct 18 13:25:46 GMT 2024

Powered by FUDForum. Page generated in 0.03592 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top