sys/times.h Compiling issue

11 visualizaciones (últimos 30 días)
Abdelrahman Aldik
Abdelrahman Aldik el 31 de Ag. de 2021
Comentada: Abdelrahman Aldik el 8 de Sept. de 2021
Hello
I was trying to compile a mex file and I got the following error
>> mex -setup
MEX configured to use 'MinGW64 Compiler (C)' for C language compilation.
To choose a different language, select one from the following:
mex -setup C++
mex -setup FORTRAN
>> compileSparseCoLO
Compiling Libraries...Building with 'MinGW64 Compiler (C++)'.
Error using mex
In file included from
C:\Users\Abd-PC\Downloads\SparseCoLO112\SparseCoLO112\mex\ccputime.cpp:26:0:
C:\Users\Abd-PC\Downloads\SparseCoLO112\SparseCoLO112\mex\ccputime.h:28:23: fatal error:
sys/times.h: No such file or directory
#include <sys/times.h>
^
compilation terminated.
Error in compileSparseCoLO (line 81)
eval(command);
I'm not sure where is the problem and how to solve it. I would appreiate your help.
  13 comentarios
Abdelrahman Aldik
Abdelrahman Aldik el 7 de Sept. de 2021
Upon usng this line:
MexFlags = ' -O -I"C:\Users\Abd-PC\Downloads\SparseCoLO112\SparseCoLO112" -L"C:\Users\Abd-PC\Downloads\SparseCoLO112\SparseCoLO112\sys" -ltime';
I have received the following error
>> compileSparseCoLO
Current directory is = C:\Users\Abd-PC\Downloads\SparseCoLO112\SparseCoLO112\mex
Cannot find sub-directory "mex"
Execute this script at the top directory of SparseCoLO
>> compileSparseCoLO
Compiling Libraries...Error using mex
MEX cannot find library 'time', specified with the -l option.
MEX searched for a file with one of the following names:
libtime.a
time.lib
libtime.lib
Verify the library name is correct. If the library is not
on the existing path, specify the path with the -L option.
Error in compileSparseCoLO (line 81)
eval(command);
And upon using this line
MexFlags = ' -O -I"C:\Users\Abd-PC\Downloads\SparseCoLO112\SparseCoLO112" "C:\Users\Abd-PC\Downloads\SparseCoLO112\SparseCoLO112\sys\time.obj"';
I received this following error
>> compileSparseCoLO
Compiling Libraries...Building with 'MinGW64 Compiler (C++)'.
MEX completed successfully.
done
Compiling mexForestConvert.cpp...Error using mex
C:\Users\Abd-PC\Downloads\SparseCoLO112\SparseCoLO112\mex\"C:\Users\Abd-PC\Downloads\SparseCoLO112\SparseCoLO112\sys\time.obj"mexForestConvert.cpp
not found; check that you are in the correct current folder, and check the spelling of
'C:\Users\Abd-PC\Downloads\SparseCoLO112\SparseCoLO112\mex\"C:\Users\Abd-PC\Downloads\SparseCoLO112\SparseCoLO112\sys\time.obj"mexForestConvert.cpp'.
Error in compileSparseCoLO (line 93)
eval(command);
I'm not sure what to do next?
Abdelrahman Aldik
Abdelrahman Aldik el 8 de Sept. de 2021
I have installed Microsoft Visual C++ 2019 and used it to compile the mex file, I got the following error
>> compileSparseCoLO
Compiling Libraries...Building with 'MinGW64 Compiler (C++)'.
MEX completed successfully.
done
Compiling mexForestConvert.cpp...Building with 'Microsoft Visual C++ 2019 (C)'.
Error using mex
LINK : error LNK2001: unresolved external symbol mexFunction
ccputime.lib : fatal error LNK1120: 1 unresolved externals
I would appreciate your help.

Iniciar sesión para comentar.

Respuestas (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by