Posts Tagged ‘Eclipse’

How to set CUDA in Eclipse

Here I describe steps to get Eclipse working with CUDA. I am working on Ubuntu 8.04 and Eclipse: 3.2.2.

  1. Install latest CUDA – www.nvidia.com/cuda
  2. Install Eclipse if not already installed - www.eclipse.org
  3. set all necessary paths in /etc/ld.conf  and execute ldconfig as root (sudo)  during the CUDA installation.
  4. In Eclipse to enable code highlighting:  Window -> Preferences -> in C/C++ -> File Types -> New -> enter “*.cu” and select “C++ Source File”
  5. Make a copy of NVidia’s template project and set this project in eclipse
    • cd NVIDIA_CUDA_SDK/projects/
    • cp -r template/   my project/
    • New -> C++ Project ->
      • uncheck “Use default location” and set project name
      • next, on Make builder tab removed “all” target.
  6. after the project creation right click on project and open properties menu and in “Include paths and symbols” add external include path /usr/local/cuda/bin
  7. To set up Eclipse to run it:
    Run -> Run Configurations -> select “C/C++ Local Application” -> “New launch configuration” (click the leftmost icon on the top)

    • set name
    • set project
    • set path to binary e.g /…./bin/linux/release/name
  8. Edit Makefile to reflect the name of executable and other names.

Tags: , ,

Haskell plug-in for Eclipse

Note: I posted updated version with installation instructions for Windows XP and screencast tutorial.

I use Eclipse to all sort of development on C, Java and Haskell. It gives me uniform look and feel on every project. In this post I wold like to show steps necessary to run Haskell Eclipse plug-in.

First of all you need to have Eclipse installed. I will use Ubuntu 8.10 and the installation command is:

[code lang="bash"]
sudo apt-get install eclipse
[/code]

My Eclipse version is: Europa 3.2.2, Haskell plug-in version is: 0.10.0 and Java version “1.6.0_06″

When the installation finish run Eclipse and select “Workbench” from initial page.

  1. From menu on the top select: Help -> Software Updates -> Find and Install ….
  2. On “Install/Update” form select “Search for new features to Install”, click “Next”.
  3. On “Install” form click “New Remote Site …”
  4. On “Edit Remote Site” form enter:

    Name: Haskell Plug-in
    URL: http://eclipsefp.sf.net/updates

    - this is the location of Project that develops Functional Programming plug-in for Haskell and Ocaml. Click “OK”.
  5. On “Install” form select check-box near the “Haskell Plug-in” if it is not already selected and click “Finish”

After the Installation is complete it may be necessary to restart Eclipse.

  1. From menu go to: “Window”-> “Preferences…”
  2. On “Preferences” form select “Functional Programming” and set appropriate compiler and editor options for you system.
  3. On top right corner of Eclipse there is “Java perspective” that can be changed to “Haskell perspective”.

Enjoy happy programming.

Tags: ,