YOLOv8-TensorRT icon indicating copy to clipboard operation
YOLOv8-TensorRT copied to clipboard

“unistd.h”: No such file or directory

Open Chlhacker opened this issue 1 year ago • 8 comments

have u guys meet this problem?just after cmake, trying to build exe

Chlhacker avatar Nov 01 '23 11:11 Chlhacker

i had already fix it,u just need to modify the unistd.h and loack io.h

Chlhacker avatar Nov 01 '23 11:11 Chlhacker

i also wonder how can i trans it to dll,so that i can use in csharp

Chlhacker avatar Nov 02 '23 05:11 Chlhacker

It seems that you are using windows. I have not test on windows.

triple-Mu avatar Nov 02 '23 08:11 triple-Mu

It seems that you are using windows. I have not test on windows.

u can try it on windows, it's terrible

JuZi233 avatar Mar 04 '24 05:03 JuZi233

It seems that you are using windows. I have not test on windows.

u can try it on windows, it's terrible

Won't it work on Windows?

pcycccccc avatar Mar 22 '24 06:03 pcycccccc

if you are running on Windows you just need to change "unish.d" to "io.h",then change the follow functions to what i write: 1: inline bool IsPathExist(const std::string& path) { #ifndef F_OK #define F_OK 0 #endif return _access(path.c_str(), F_OK) != -1; } 2: inline bool IsFile(const std::string& path) { struct _stat buffer; if (_stat(path.c_str(), &buffer) != 0) { return false; } return (buffer.st_mode & _S_IFREG) != 0; } 3: inline bool IsFolder(const std::string& path) { struct _stat buffer; if (_stat(path.c_str(), &buffer) != 0) { return false; } return (buffer.st_mode & _S_IFDIR) != 0; } then it will work out the problem!

Dwinovo avatar Mar 28 '24 05:03 Dwinovo

@Dwinovo Thank you. Your answer solved my problem.

pcycccccc avatar Mar 29 '24 01:03 pcycccccc

@Dwinovo Thank you. Your answer solved my problem.

you are welcome^^

Dwinovo avatar Mar 29 '24 03:03 Dwinovo

Now this https://github.com/triple-Mu/YOLOv8-TensorRT/pull/221 will fix path operator by filesystem. Welcome to try it and give valuable feedback!

triple-Mu avatar Jun 04 '24 06:06 triple-Mu