- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi
Every time I rightclick and selects the accelerated with ..... menu item, I get this error message: selection is not recognized as a function the text you have selected "(text)" is not a function. only functions can be accelerated. I have tried to select the function below in any possible way I can think of but without success. int this_is_a_function (int a) { return a*2; } BTW: I still uses NIOSII 7.2SP2.Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Try putting the function on the same line as the return type:
int this_is_a_function(int a) { return a*2; } The C2H compiler runs the GCC preprocessor on the C file and then it takes it from there so it probably wasn't expecting the return type to be on a separate line. If that fixes it and you want to keep this style I suggest putting a '\' after the 'int' so that it'll be treated as a single line.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi. I am having this issue now!! Still unable to solve it? Any ideas? did you manage to do solve it?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Do you have some# define directive around this function?
Sometime C2H might not recognize the function if it's in a# ifdef directive and the variable define condition variable is in another file. Also check out that whether or not Eclipse outline can see your function. Although it's not related to C2H but if you see it in the file outline, it means that the function is properly defined.
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page