lhk / darknet_wrapper

A small wrapper around darknet
12 stars 5 forks source link

old darknet or new? #4

Closed fib5813 closed 6 years ago

fib5813 commented 7 years ago

did u write this wrapper for the older darknet repo or the new one? the older one had all the files in /src. the new one has some in /examples as well.

lhk commented 7 years ago

Unfortunately, darknet is a moving target. Actually, the restructuring broke an earlier version of this repo. That was when code was moved from /src into /include.

3 weeks ago, I tested the installation instructions with the latest darknet version. Then this repo worked fine.

I don't think you need the examples code. I would expect the latest darknet version to be compatible with this. If it isn't, please let me know, I'll try to fix it. You could also fallback to the darknet commit 3 weeks ago.

fib5813 commented 7 years ago

okay. It did not work for me, I have the darknet repo from a week ago, and its same as the repo 3 weeks ago. it gives me the following errors when i run make -j8

./src/wrapper_c.c: In function ‘detect_file’: ./src/wrapper_c.c:92:5: error: ‘for’ loop initial declarations are only allowed in C99 mode for (int i = 0; i < num; ++i) { ^ compilation terminated due to -Wfatal-errors. make: *** [obj/wrapper_c.o] Error 1

can you fix this? int i is declared in the for loop in 3-4 places in the wrapper_c.c file.

StevenPuttemans commented 7 years ago

can you fix this?

Easiest way would just to be adding a compiler flag -std=c99 I guess. Why don't you try that?

lhk commented 7 years ago

Can you compile the original darknet code? And trying the - std=c99 flag should be the first thing to try.

I'll check it out this evening (probably)

fib5813 commented 7 years ago

thanks. i tried that and got rid of the error but now i get this: ./src/utils.c: In function ‘what_time_is_it_now’: ./src/utils.c:15:21: error: storage size of ‘now’ isn’t known struct timespec now;

lhk commented 6 years ago

I've finally found the time to try the installation instructions again.

Make sure to have a completely clean slate. Delete every working copy and follow the instructions from scratch.

The latest darknet commit that compiles for me, is this one: https://github.com/pjreddie/darknet/commit/59ed1719d4aa77a462eb41dd4db2dd3a2f8e4a1b

I've added the corresponding checkout to the instructions.

This works fine for me.