Skip to main content



      Home
Home » Newcomers » Newcomers » How to create a project for both C/C++ and Java?
How to create a project for both C/C++ and Java? [message #160417] Wed, 12 July 2006 03:26 Go to next message
Eclipse UserFriend
Originally posted by: pgodeau_nosp.m_sapex-alma.com

Hello,

We have a Java project with some C/C++ code accessed through JNI/SWIG.
What is the best way to create such a project? It seems impossible to
have 2 projects on overlapping directories (error message: "xxx overlaps
the location of another project").
Also, will it be possible to debug both Java and C?

Thanks in advance!

--
Patrick
Re: How to create a project for both C/C++ and Java? [message #160568 is a reply to message #160417] Wed, 12 July 2006 16:22 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: jefmyers.us.ibm.com

Patrick,

I don't think it's supported, but you can try manually modifying the
..project file to add the Java nature and builder to a C/C++ project.
You can see this file if you're in the Resources perspective... add the
following within the <buildspec> tags:
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments></arguments>
</buildCommand>

And the following within the <natures> tag:
<nature>org.eclipse.jdt.core.javanature</nature>

Then give it a try creating Java stuff in this project.

Hope this helps,
- Jeff
Re: How to create a project for both C/C++ and Java? [message #160576 is a reply to message #160568] Wed, 12 July 2006 16:23 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: jefmyers.us.ibm.com

Oh, and you'll need a .classpath file too. Try copying one of these out
of another Java project into your Frankenstein project.

- Jeff
Re: How to create a project for both C/C++ and Java? [message #160673 is a reply to message #160576] Thu, 13 July 2006 03:25 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: pgodeau_nosp.m_sapex-alma.com

Thanks for the tip, it seems to work more or less (there is no automatic
build).
Don't you think it could be officially supported? After all, it doesn't
seem an excessive request for such a powerful IDE.
Re: How to create a project for both C/C++ and Java? [message #171139 is a reply to message #160673] Fri, 15 September 2006 16:37 Go to previous message
Eclipse UserFriend
Patrick Godeau wrote:
> Thanks for the tip, it seems to work more or less (there is no automatic
> build).
> Don't you think it could be officially supported? After all, it doesn't
> seem an excessive request for such a powerful IDE.


I'd really like to see this, too. One should be able to use Java
builders for part of the project, and, say, the CDT Standard Make
builder for other parts.

At one point I right-clicked on the ../src/C/ subdirectory of my
project, in the Package Explorer, while in the C/C++ Perspective, and
saw "New > Convert to a C/C++ Make Project". I was in hog heaven. It
turned out to be a cruel trick, though: I had to convert the entire
project, or none of it.

-David
Previous Topic:Eclipse editor shows only selected item
Next Topic:How to install and use Eclipse without falling into the Java trap?
Goto Forum:
  


Current Time: Wed May 28 18:23:36 EDT 2025

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

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

Back to the top