Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error compiling darknet #9

Open
ABesginow opened this issue Dec 12, 2017 · 1 comment
Open

Error compiling darknet #9

ABesginow opened this issue Dec 12, 2017 · 1 comment

Comments

@ABesginow
Copy link

ABesginow commented Dec 12, 2017

Hello Lars,

while compiling the darknet directory (Step. 5), I get the following error:

> make
g++ -Iinclude -Isrc -DOPENCV -I/opt/opencv320/include/opencv -I/opt/opencv320/include -Wall -Wfatal-errors -fPIC -Ofast -DOPENCV -c ./src/wrapper_c.c -o obj/wrapper_c.o
./src/wrapper_c.c: In function ‘void setup_network(const char*, const char*)’:
./src/wrapper_c.c:26:36: error: invalid conversion from ‘const char*’ to ‘char*’ [-fpermissive]
     net = parse_network_cfg(cfgfile);
                                    ^
compilation terminated due to -Wfatal-errors.
Makefile:68: recipe for target 'obj/wrapper_c.o' failed
make: *** [obj/wrapper_c.o] Error 1

Suddenly, the above is compiling....

But ~100 lines later, there is a different error for the same file:

./src/wrapper_c.c: In function ‘detect_img’:
./src/wrapper_c.c:158:16: warning: implicit declaration of function ‘ipl_to_image’ [-Wimplicit-function-declaration]
     image im = ipl_to_image(src);
                ^
./src/wrapper_c.c:158:16: error: invalid initializer
compilation terminated due to -Wfatal-errors.
Makefile:68: recipe for target 'obj/wrapper_c.o' failed
make: *** [obj/wrapper_c.o] Error 1

In my understanding, it is not including the "image.h" file correctly, but I am not sure why.

Is there a way to fix this? Any help is appreciated!

Thanks in advance!

regards Andreas

@John-Brooks
Copy link

Too little too late I'm sure, but the problem is that in the image.h file the declaration of ipl_to_image() is contained within an #ifdef OPENCV. So if OPENCV is not defined, then you will get this error. Hopefully this helps someone else.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants