ofTheo/videoInput

Undefined references when buiding with x86_64-w64-mingw32-g++

Closed this issue · 3 comments

I'm using this project as a submodule in meson, and during linking x86_64-w64-mingw32-g++ outputs many undefined reference errors:

... undefined reference to `MEDIATYPE_Interleaved'
... undefined reference to `LOOK_UPSTREAM_ONLY'
... undefined reference to `IID_IAMCrossbar'
... undefined reference to `IID_IMediaFilter'
...

I tried building the whole project from scratch as a subproject, or importing the prebuilt x86/x64 libraries (both .a and .lib) as an external dependency, but none of the attempts work. It seems like a similar issue with this but replacing the strmbase.lib file doesn't work.

hmm - could you try adding -lstrmiids to your project linker flags?
as mentioned in the other issue it is being used in OF's 64bit mingw release without issue.

you might also need: -luuid

see the libraries we link to for mingw here:
https://github.com/openframeworks/openFrameworks/blob/master/libs/openFrameworksCompiled/project/msys2/config.msys2.default.mk#L234C72-L234C80

Thanks! Adding the -lstrmiids flag resolved the problem!