[Bug]: utIsInterruptPending NOT found
What Operating System(s) are you seeing this problem on?
Windows
dlib version
20.0
Python version
none
Compiler
GCC 15.1
Expected Behavior
successfully copmile and build the example "dlib\matlab".
Current Behavior
When I copmile the example "dlib\matlab", the following error occurs:
C:/Program Files/w64devkit/bin/ld.exe: CMakeFiles/example_mex_function.dir/objects.a(example_mex_function.cpp.obj):example_mex_function.cpp:(.text+0x1585): undefined reference to `utIsInterruptPending'
My matlab version is 2025a, and I cannot find any infomation about "utIsInterruptPending" in matlab help. I have to comment the line 4697 and 4698 in "mex_wrapper.cpp" to make the build process pass.
Steps to Reproduce
following the guidance of "dlib-20.0\dlib\matlab\README.txt"
Anything else?
No response
Yeah some googling says the function is now called mexIsInterruptPending(). Does changing it to be mexIsInterruptPending() make it work? If so send me a PR :)
It sounds like mexIsInterruptPending() has been in matlab since 2019, so might as well switch to that if works.
Yeah some googling says the function is now called
mexIsInterruptPending(). Does changing it to bemexIsInterruptPending()make it work? If so send me a PR :)It sounds like
mexIsInterruptPending()has been in matlab since 2019, so might as well switch to that if works.
Thank you very much for answering my question. I can not find any function like xxInterruptPending() in matlab official help and forum. It seems that matlab uses the FutureResult class or some signal mechanism to deal with CTRL+C.
Yeah IDK. I don't have matlab to test this stuff with anymore. I'm sure there is some way to do it in your version of matlab. You should figure it out and send me a PR :)
Yeah IDK. I don't have matlab to test this stuff with anymore. I'm sure there is some way to do it in your version of matlab. You should figure it out and send me a PR :)
I asked this question on Matlab Answers. A kind guy just gave me the answer: utIsInterruptPending is in the library '${MATLAB_HOME}/extern/lib/win64/microsoft/libut.lib'.
Then, I found that 'dlib-20.0\dlib\matlab\cmake_mex_wrapper' missed including the libraty. So, we should add 2 lines (line 41 & 46), and append ' ${MATLAB_UT_LIBRARY}' in line 48, as shown in the following figure.
Yeah IDK. I don't have matlab to test this stuff with anymore. I'm sure there is some way to do it in your version of matlab. You should figure it out and send me a PR :)
I asked this question on Matlab Answers. A kind guy just gave me the answer: utIsInterruptPending is in the library '${MATLAB_HOME}/extern/lib/win64/microsoft/libut.lib'.
Then, I found that 'dlib-20.0\dlib\matlab\cmake_mex_wrapper' missed including the libraty. So, we should add 2 lines (line 41 & 46), and append ' ${MATLAB_UT_LIBRARY}' in line 48, as shown in the following figure.
Awesome. Try that out and see if it fixes it for you and if so send me a PR with that change :)
Awesome. Try that out and see if it fixes it for you and if so send me a PR with that change :)
I've send a PR. This is my first time of sending a PR in github, hope the process is correct.
Sweet, thanks for the PR. Merged it in just now.