cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

bayoumi
Journeyman III

Feature Request: link br functions calls to C under windows

Hi,
In order to be able to use br as function and call it from a C code (originally written for (Linux), I needed to put manually into the C++ file generated by brook:
extern "C" {
function calling brook kernel
}

This works fine, but when I try to add it in brook, it gives syntax error. Unless there is a better way to do it, I suggest letting brook compiler accept the "extern "C" . This will help us use makefiles for large programs. Otherwise, I will have to go manually after each make iteration, stop the makefile and change files every time

Best Regards
Amr
0 Likes
1 Reply

Hi Amr,

I apologize for the inconvenience! I'll pass this feedback on to the Brook+ team.

In the meantime, a workaround might be to declare an intermediate function whose sole job is to call the C++ function. Wrap that in an extern "C" and put it out in a separate file. #include that later down in the file to keep it from confusing brcc.

Michael.
0 Likes