building opencvjs but install videoio failed [closed]

asked 2020-06-24 03:53:26 -0500

besttangent gravatar image

updated 2020-06-24 04:55:38 -0500

berak gravatar image

Hi, I am using docker(ubuntu 16.04) to build opencvjs. My opencv version is 4.4.0 and the emscripten version is latest. I can build opencvjs successfully but if I go into build_js directory and use 'make install',the following warning occured: /videoio/src/backend plugin.cpp:76:30: warning: unused parameter 'h'. And it will give error like following : non-void function does not return a value . I find the code is following:

void* getSymbol_(LibHandle_t h, const char* symbolName)
{
if defined(_WIN32)
    return (void*)GetProcAddress(h, symbolName);
elif defined(__linux__) || defined(__APPLE__) || defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__GLIBC__)
    return dlsym(h, symbolName);
endif
}

But if I change elif to else(because i am using ubuntu), the error changes into:error: use of undeclared identifier 'dlsym'. Anywhere I can edit to link the dlsym?

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by berak
close date 2020-06-25 01:21:07.273381

Comments

i'm wondering, how you can even get there, since videoio is not part of the js api (and thus should not be built)

But if I change elif to else

don't. you also shouldn't have to, ubuntu is covered by __linux__

I can build opencvjs successfully

did you mean: "run cmake successfully" ?

berak gravatar imageberak ( 2020-06-24 04:01:03 -0500 )edit

Hi, I am using docker

that's far too vague, please edit and show your cmdline(s)

berak gravatar imageberak ( 2020-06-24 05:12:08 -0500 )edit
1

I am very sorry to bother you with that. I edit build_js.py with -Dwith_videoio=ON. But you reminded me with that opencvjs doen not use videoio but use webRTC. And I know it now. Thanks and sorry for wasting your time.

besttangent gravatar imagebesttangent ( 2020-06-24 23:57:01 -0500 )edit

ah, that's what i thought.

please don't forget to close the resp. github issue ;)

berak gravatar imageberak ( 2020-06-25 01:47:04 -0500 )edit