triple-Mu / YOLOv8-TensorRT

YOLOv8 using TensorRT accelerate !
MIT License
1.32k stars 228 forks source link

“unistd.h”: No such file or directory #168

Closed Chlhacker closed 3 months ago

Chlhacker commented 11 months ago

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

Chlhacker commented 11 months ago

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

Chlhacker commented 11 months ago

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

triple-Mu commented 11 months ago

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

JuZi233 commented 7 months ago

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

u can try it on windows, it's terrible

pcycccccc commented 6 months ago

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?

Dwinovo commented 6 months ago

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!

pcycccccc commented 6 months ago

@Dwinovo Thank you. Your answer solved my problem.

Dwinovo commented 6 months ago

@Dwinovo Thank you. Your answer solved my problem.

you are welcome^^

triple-Mu commented 4 months ago

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!