Click here to Skip to main content
15,887,027 members
Please Sign up or sign in to vote.
3.00/5 (1 vote)
See more:
Hello,

I am working on a mfc project, where i am using the opencv dll's for face recognition.

Its working fine in my computer, when i want to port my EXE file to another computer

it asks for opencv dlls (cv210d.dll, cvcore210d.dll, ...)

My question is how to do it.

Recompile opencv as static library (.lib instead of .dll). That didnt work. I get 10 linker errors.

If possible, how to merge/embedd DLL's into exe file.

P.S. - I am using visual studio 2010, openCV 2.0, and mfc Dialog based Application.
Posted
Updated 8-Nov-12 0:43am
v2

You cannot merge DLLs into an executable, they are stand-alone loadable modules. You need to copy them with your executable to the other computer. you can do this manually or by creating a setup program. You did not give details of the problems you had trying to rebuild as static libraries so we cannot offer any suggestions to fix that problem.
 
Share this answer
 
Comments
Kumar 09 8-Nov-12 23:31pm    
hi Richard thank you for the reply,

one point i want to clear you is that when i build application using opencv dll's its working fine in my computer, whereas when i run the same application in other computer it is asking for the opencv dll's. Is there any other way that every time we dont copy these dll's in to other computer and run the application.

Thank u again in advance.
Richard MacCutchan 9-Nov-12 5:29am    
No, I am afraid that is how the Windows system works. If you wish to use 3rd party DLLs in your application then you must install them with your application. The only alternative is to use static libraries, which you have already discovered is not possible.
As Richard allready stated it's not possible to embed DLLs in an exe but you can copy the DLLs your program depends along with your exe.

Building openCV with its static libraries isn't very easy at the moment so it seems. I tried to do this myself a while ago but after some time considered that it would be easier just to stay with the DLLs. You can try and ask at the QA section of openCV
http://answers.opencv.org/questions/[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900