Compiling a Brook+ program for MATLAB with Visual Studio

 

 

 

Compile the Brook+ project (e.g., the sample matrix multiplication project from Brook+ SDK) and run it with Visual Studio as normal – make sure it works.

 

1) Right-click on the .br file and select compile. This invokes the custom build step and generates the .cpp file. Then right-click on the .br file and go to properties. Erase the contents of Custom Build Step > Command Line. Also erase Custom Build Step > Additional Dependencies. With that, we basically eliminate the custom build step.

 

2) Modify the generated .cpp file directly. Replace “main” with “mexFunction” and include mex.h. Then follow the steps in “Compiling a MEX file with Visual Studio” to modify the Visual Studio project to generate the mex dll.

 

That should do it.