Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Re: Visual C++ and CDT
Re: Visual C++ and CDT [message #149541] Tue, 19 July 2005 14:57 Go to next message
Eclipse UserFriend
Originally posted by: eclipse.newsgroups.anegma.com

I've to agree with you. Licenses even for the open source community is
getting more and more important those days. I myself use the Eclipse
with the CDT because it surely doesn't has any big benefits
compared to the commercial development tools but it's nice and handy
enough to develope software with. I like and enjoy developing with it
because it doesn't has that overloaded UI. Everything is clean, clear
and oriented to development.

Surely the CDT has some pitfalls which makes it hard for beginners but
they are not even that worse as those pitfalls you can have with the
MSVC toys ;)

My advice for everyone starting witht the CDT is to use MingW as
Compiler, start learning unmanaged project (learning how to handle
Makefiles isn't really that hard) and turn of the indexer.

Cheers,
Gunnar
Re: Visual C++ and CDT [message #151277 is a reply to message #149541] Tue, 16 August 2005 22:00 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: daniel.winterstein.gmail.com

To chuck in my two pence:
I am working in a company that uses Visual Studio .Net. I would love to
use Eclipse as my IDE instead. Like Gunnar says, it is clean and clear.
Also, Visual Studio doesn't seem to have some of the facilities I liked
about the Eclipse. Or at least, neither I nor my colleagues no how to
set them up.

Unfortunately switching to MinGW is not an option for me, nor for many
people. If I could use Eclipse with Visual Studio projects I would be
delighted. I imagine there are a lot of other people who would also
switch, given a chance. Please someone consider making a plugin.

This would be good for Eclipse (more users), and good for open-source
software (since a user is more likely to end up working with
Eclipse/MinGw on an open-source project if they are already using
Eclipse for Visual C++ work).

If anyone has any advice on using Eclipse to edit Visual Studio
projects, please let me know.
Regards,
- Dan
Re: Visual C++ and CDT [message #152667 is a reply to message #151277] Tue, 30 August 2005 17:54 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: eclipse.dharty.com

This is kind of a work around, but I use eclipse to build projects
created in visual studio using a modified make target. It won't give
you the visual c++ interface option, but I can work in eclipse and build
projects using a common source base for multiple targets (make targets
for visual studio, embedded compilers, etc).

Here is an example Make Target

TargetName:
FlightSim-Debug
Make target:
FlightSoftware.sln /build debug /project FlightSim.vcproj
<name of solution> <switches> <project>
Build Command:
c:\Program Files\Microsoft Visual Studio .NET 2003\Common7\IDE\devenv.com


A different target uses:
FlightSoftware.sln /build debug /project Groundbase.vcproj
as the make target.

Yet a third uses:

TargetName:
Helmsman-Debug-BUILD
Make target:
HELMSMAN_Debug.gpj
Build Command:
gbuild.exe -link -parallel=4

to build using the embedded compilers.


HTH,

David


Daniel Winterstein wrote:
>
> To chuck in my two pence:
> I am working in a company that uses Visual Studio .Net. I would love to
> use Eclipse as my IDE instead. Like Gunnar says, it is clean and clear.
> Also, Visual Studio doesn't seem to have some of the facilities I liked
> about the Eclipse. Or at least, neither I nor my colleagues no how to
> set them up.
>
> Unfortunately switching to MinGW is not an option for me, nor for many
> people. If I could use Eclipse with Visual Studio projects I would be
> delighted. I imagine there are a lot of other people who would also
> switch, given a chance. Please someone consider making a plugin.
>
> This would be good for Eclipse (more users), and good for open-source
> software (since a user is more likely to end up working with
> Eclipse/MinGw on an open-source project if they are already using
> Eclipse for Visual C++ work).
>
> If anyone has any advice on using Eclipse to edit Visual Studio
> projects, please let me know.
> Regards,
> - Dan
Re: Visual C++ and CDT [message #152701 is a reply to message #151277] Wed, 31 August 2005 06:22 Go to previous messageGo to next message
Markus Schweizer is currently offline Markus SchweizerFriend
Messages: 7
Registered: July 2009
Junior Member
It's the same for me and one colleague of mine. We would like to use
eclipse with CDT. We also work with MS Visual Studio. For compiling our
projects with eclipse and CDT (and MinGW) we had to change a lot of code
for not getting a lot of warnings.
So I was looking whether there exists an Plugin for MS Visual C/C++. And I
found one, at:
http://cdt-msvc.tigris.org/

This is a managed build plugin. Unfortunately I could not yet compile a
project with the plugin - using the Microsoft Visual C++ Toolkit 2003.
There are still problems. Additionally the messages.properties file for
the UI texts is missing. So I created it for my self. But the plugin is
still not working. Perhaps you can try it!?

Regards,
Markus
Re: Visual C++ and CDT [message #152819 is a reply to message #152701] Thu, 01 September 2005 00:51 Go to previous message
Eclipse UserFriend
Originally posted by: fireonyoursleeve.hotmail.com

I'm in a similar situation. If you dig into Ant you can set up a simple
project using the 2003 Toolkit pretty easily.

1. Create a Simple Project (right click in the C++ perspective, select New
> Project... select Simple > Project, type in a name and hit Finish).
2. Create a build script (see build.xml below).
3. Download cpptasks.jar (additional c++ ant tasks used by the build
script) - http://ant-contrib.sourceforge.net/ (click on downloads, then
scroll to the bottom for the cpptasks not the ant-contrib ones).
4. Add an Ant builder (right click on the project, select Properties,
select Builders, click the New... button and select Ant Build. Give it a
name, select the Buildfile from above (you may need to refresh your
project for it to show up), set the Base Directory, on the Targets tab
you'll want to set the Auto Build to 'compile' probably. Add cpptasks.jar
on the Classpaths tab. On the Environment tab you can add an INCLUDE, LIB
and PATH setting for your Toolkit, Platform, .NET SDK dirs, etc. To
enable this you'll need to select 'Separate JRE' on the JRE tab. Hit OK
and it should start building.
5. If you close Eclipse, you can then edit the .project file by hand and
add the following two natures:
<nature>org.eclipse.cdt.core.cnature</nature>
<nature>org.eclipse.cdt.core.ccnature</nature>

One thing I did that helped was to install the Toolkit, Platform SDK and
NET 1.1 SDK, then copy all the necessary headers, libs and programs we
need into a separate directory and checked it into source control along
with the rest of the project. This way we're all using the same compiler,
and include paths can be saved in the shared project file.

/project
/msvc
/bin - cl.exe, link.exe, etc.
/lib - kernal32.lib, msvcrt.lib, etc.
/inc - stdio.h, algorithm, etc.
/sys - stat.h, types.h, etc.

I'm not sure how well this will work in the long run as we need to add
DirectX SDK, etc. but it's nice for setting up automated builds without
having to install a whole bunch of stuff on the server.

In order to get Eclipse to recognize executables (so you can bind your
program output to the Run button), you'll need to add a binary parser.
You'll have to open your .cdtproject file by hand and add the following in
the <cdtproject> section:

<extension id="org.eclipse.cdt.core.PE"
point="org.eclipse.cdt.core.BinaryParser"/>

The part I'm stuck on now (and I'm hoping someone might have gotten
further on this) is getting nice indexing support. CTags is alright, but
seems pretty lame coming from Visual Studio with Visual Assist, etc. I'd
like to get the Full C/C++ Indexer working without having to install any
gnu tools (MinGW, etc). One of the main incentives of switching to
Eclipse is to get some of those 'additional facilities' that seem pretty
dependent on getting Full Indexing up and running.

The documentation mentions that the Full Indexer won't do anything unless
it has proper build info setup for the project. You can do this by adding
a pathentry to your .cdtproject (same places as before).

<data>
<item id="org.eclipse.cdt.core.pathentry">
<pathentry kind="src" path=""/>
<pathentry kind="out" path="bin"/>
</item>
</data>

Unfortunately, it still has issues. Looks like the next step is to try to
get a con(tainer?) with symbols and include paths that is usually
genreated by the Auto Discovery Option. Unfortuantely, that functionality
seems intimately tied to gcc and its build.log info.

If anyone knows more about the indexer, I'd love to get it running in
projects using Microsoft tools.

_____________________

Here's an example build.xml mentioned above. This will eventually have to
get a lot more complicated, but it's nice because you can use it to setup
automated builds with CruiseControl (which uses Ant scripts), hook up unit
testing (like cxxtest) that'll automatically get built and run in the
background whenever you save a file, etc. Alternatively, you could simply
use Ant's <exec> task to run things directly although that kind of goes
against the whole system. Might be a nice way to get Incredibuild
support, or to share .vcproj files so other people on the team can
continue using Visual Studio.

<?xml version="1.0"?>
<!--
============================================================ ==========
Aug 18, 2005 12:56:39 AM


HelloWorld
The simplest program imaginable

ALeiby

============================================================ ========== -->
<project name="HelloWorld" default="compile">
<description>
The simplest program imaginable
</description>

<!-- set global properties for this build -->
<property name="src" location=""/>
<property name="build" location="bin"/>

<taskdef resource="cpptasks.tasks"/>
<typedef resource="cpptasks.types"/>

<!-- =================================
target: compile
================================= -->
<target name="compile" depends="init" description="--> The simplest
program imaginable">
<cc name="msvc" objdir="${build}" link="executable"
outfile="${build}/Hello" >
<compilerarg location="start" value="-GX" />
<fileset dir="${src}" includes="*.cpp" />
<linker name="msvc" />
</cc>
</target>

<!-- - - - - - - - - - - - - - - - - -
target: init
- - - - - - - - - - - - - - - - - -->
<target name="init">
<!-- Create the time stamp -->
<tstamp/>
<!-- Create the build directory structure used by compile -->
<mkdir dir="${build}"/>
</target>


<!-- =================================
target: clean
================================= -->
<target name="clean" description="--> Delete the ${build} and ${dist}
directory trees">
<delete dir="${build}"/>
<delete dir="${dist}"/>
</target>

</project>
Previous Topic:C++: Debugging the value of "this"
Next Topic:Managed C++ Project & .c files
Goto Forum:
  


Current Time: Fri Aug 16 21:31:06 GMT 2024

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

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

Back to the top