How to change link.exe when compiling mex-file?
Show older comments
Starting point:
I have a makefile that compiles C-source code to object files and also links them and compiles the mex-file. Matlab testbench is used to run the mex-file to test the C-code.
Desired action:
I want to have BullseyeCoverage software integrated to check the test coverage of the C-source files.
Current situation:
The BullseyeCoverage software doesn't recognize the compilations automatically, so I have tried to invoke the Bullseye cl.exe and link.exe in the makefile. The cl.exe I managed to invoke, but the link.exe I cannot. I think what I need to do atleast is change the linker that the mex-compiler uses, but I don't know how. I might be on the wrong trail here altogether, but this is what I have come up with so far.
Any advice on how to achieve the linker change, or preferrably the whole Bullseye integration, would be much appreciated!
Accepted Answer
More Answers (1)
Vijay
on 14 Oct 2022
0 votes
Hello @Henri Hämäläinen
ld command is used to link object files together and produce executable. Linker is also part of compiler executable.
Since you are using custom make file you can generate object files first and then you can use ld command to generate final executable.Please make sure ld is available on your PATH.
1 Comment
Henri Hämäläinen
on 17 Oct 2022
Categories
Find more on Write C++ Functions Callable from MATLAB (MEX Files) in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!