Override external function defined in lib

I'd like to override only one of functions defined in another file or library.
The function is defined as pub extern "C" and it gives an error like this;

warning: Linking globals named 'left': symbol multiply defined!

error: failed to load bc of "example.j8aksdoc-cgu.1": 

error: aborting due to previous error; 1 warning emitted

error: could not compile `example`

Is there anyway to override the pub extern function in rust?


pub extern "C" fn left() {
return 10; // return constant value for easy test


extern crate info;

pub extern "C" fn left() {
return 7; // need to override left function

I'm pretty sure that this is not possible.

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.