I am using Geany 1.34 on Linux Mint 19. It happens after compiling the .cu files/cuda. When there are some compilation errors, clicking on that error does not take the cursor to the corresponding line number. Looks like it works fine with .c and .cpp files.
I am unsure if this is a bug or some options that disabled this feature(could not find on google). Thank you.
The error messages need to be understood by Geany to get the line numbers, clearly the compiler you are using does not generate errors in a format Geany understands.
You can teach it to understand other formats by setting a regular expression as described in the manual [here](https://www.geany.org/manual/current/index.html#build-settings-section).
I use Nvidia CUDA compiler(nvcc ). It generates errors of this type.
hello.cu(394): error: too few arguments in function call hello.cu(382): warning: variable "a" was declared but never referenced
It contains the line number inside () braces but not col number So, I think the regex is this ^(.+) ( ([0-9]+) ) If you do not mind, could you tell which config files I should put this variable error_regex into? There are a lot -- under Tools > Config >
You can set it in the `Menu->Build->Set Build Commands` dialog.
Thank you very much elextr for your help. My earlier regex needed some edit. I have finally made it work with this.
^(.+)(([0-9]+))
This is going save me a lot of time in debugging a few 100s of lines of CUDA code. Thank you.
Closed #2213.
Shouldn't we add it to the `filetypes.CUDA.conf` file we provide then?
@b4n PRs are welcome :)
I can PR. Can someone confirm the following: Should we add the variable `error_regex=^(.+)\(([0-9]+)\)` into the file `data/filedefs/filetypes.CUDA.conf` under `[build_settings]` ?
is it right and is there anything else we need to edit?
github-comments@lists.geany.org