PDA

View Full Version : Setting up gedit external-tools for cuda compiler



Aiyen
January 11th, 2010, 03:53 PM
Hello all
I am trying to use the external-tools plugin of gedit to compile and run programs I write using the CUDA compiler. These are my settings for it.



#!/bin/sh
# [Gedit Tool]
# Name=nvcc compile with g++-4.3
# Shortcut=F5
# Languages=
# Applicability=all
# Output=output-panel
# Input=nothing
# Save-files=nothing

nvcc $GEDIT_CURRENT_DOCUMENT_NAME --compiler-bindir=/home/aiyen/CUDA_Test_Folder/ -o ${GEDIT_CURRENT_DOCUMENT_NAME%.*}

But I keep getting this error


Running tool: nvcc compile with g++-4.3

/home/aiyen/.gnome2/gedit/tools/shortcut-for-nvcc-under-g++-4.3: 11: nvcc: not found

Exited: 32512

When I am trying to call nvcc in a terminal there is no problem so what do I need to change to make it accept nvcc calls in gedit as well?
Thanks in advance

meborc
January 14th, 2010, 09:23 PM
you might want to refer to nvcc with its full path...

Aiyen
January 14th, 2010, 11:10 PM
Thanks for your reply meborc
I tried to do that, but then it comes with an error saying I don't have root. Since I am not the sharpest linux user ever, I would also not mind an example or link to where it is shown.

meborc
January 15th, 2010, 11:11 AM
Thanks for your reply meborc
I tried to do that, but then it comes with an error saying I don't have root. Since I am not the sharpest linux user ever, I would also not mind an example or link to where it is shown.

i don't know why you would need root, but you can run the command with "sudo" to get root

Aiyen
January 15th, 2010, 03:25 PM
I figured out my mistake, the path was enough to use, but I had typed it in wrong.
Many thanks for your help!