Page 1 of 1

DLL error, nppiDivC-32f_C1R

Posted: 17 Feb 2012 04:42
by jmunk
Hello,

Thank you to the VLC developers for making an excellent piece of software.

I have just started using libvlc in a win32 environment. I am having a problem with the VLC DLLs produced by the mingw compiler.

I followed the instructions at
http://wiki.videolan.org/Win32Compile

to build VLC for Win32 on an Ubuntu 10.10 server. The build was successful after configuring with --with-lua=no.

I'm building an application using MSVC2008. I am able to run DEBUG builds using libvlc to get video with no problems. When I switch to a RELEASE build, however, I get the following error message-box when starting up the GUI application:
The procedure entry point nppiDivC_32f_C1R could not be located in the dynamic link library libvlc.dll.
My software uses OpenCV 2.1 and uses the GPU components of OpenCV. I also use CUDA and link to the image processing primitives library (npp.lib and npp32_40_17.dll). I recognize the function nppiDivC_32f_C1R to be an NVIDIA GPU imaging processing primitive. I also notice that VLC has a DLL called npvlc.dll. I wonder if this DLL defines a duplicate symbol.

I tried removing npp.lib from the project but this produced compile-time errors because I need to link to that library.

I'm seeking assistance in resolving this problem. Any ideas on what is going on would be helpful. Perhaps there is a way to build libvlc without any GPU acceleration?

Thank you very much for your time,
Justin

Re: DLL error, nppiDivC-32f_C1R

Posted: 17 Feb 2012 13:15
by Jean-Baptiste Kempf
Sorry, but why not using the official builds to get the DLLs?

Re: DLL error, nppiDivC-32f_C1R

Posted: 17 Feb 2012 19:39
by jmunk
Thank you for the quick response. I did not know the official builds also contained the SDK, so thanks for the pointer.

I downloaded vlc RC2.0.0-rc1 from:

http://download.videolan.org/pub/videol ... rc1/win32/

and built against that. Unfortunately, I still have the same error. It is strange to me that the error only occurs in the Release build.

Re: DLL error, nppiDivC-32f_C1R

Posted: 17 Feb 2012 21:16
by jmunk
It is strange to me that the error only occurs in the Release build.

Update. I created a new project with the wx_player.cpp example and with no linker dependencies except the wxWidgets libraries. The debug build works. The Release version builds but I get the following DLL error:
The procedure entry point OleGetClipboard could not be located in the dynamic link library libvlc.dll
I then began to systematically change the build settings on the Release build to match the debug build. The linker setting "/DEBUG" for "Generate Debug Info" shed some light onto the problem.

If Debug and linker uses /DEBUG: Sample application works.
If Debug and linker does not use /DEBUG: DLL-error message.
If Release and linker uses /DEBUG: Sample application works.
If Release and linker does not use /DEBUG: DLL-error message.

I do not understand why the presence of debug symbols should "fix" the problem. I looked at what the /DEBUG option does at http://msdn.microsoft.com/en-us/library ... s.80).aspx and found that:
/DEBUG changes the defaults for the /OPT option from REF to NOREF and from ICF to NOICF (so, you will need to explicitly specify /OPT:REF or /OPT:ICF).
and,
/OPT:REF eliminates functions and/or data that are never referenced while /OPT:NOREF keeps functions and/or data that are never referenced.
I believe the linker optimization option /OPT:REF causes the linker to remove symbols that it thinks are not used because my compiled code does not use them, but which are in fact used by libvlc.dll.

After adding /OPT:NOREF to the linker command-line, the problem went away.