rajeshnarasimha / cvblob

Automatically exported from code.google.com/p/cvblob
GNU Lesser General Public License v3.0
0 stars 0 forks source link

LINK : fatal error LNK1104: cannot open file '..\lib\Debug\cvblob.lib' on windows platform! #34

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
LINK : fatal error LNK1104: cannot open file '..\lib\Debug\cvblob.lib'

Original issue reported on code.google.com by hwdong...@gmail.com on 23 Oct 2012 at 11:02

GoogleCodeExporter commented 8 years ago
I got the same error in visual studio 2010. The problem is that visual studio 
does not create a lib file unless functions are explicitly defined as dllexport 
functions.
To fix this add the following to cvblob.h:

#define EXPORT __declspec (dllexport)

In the extern "C" block, add the word EXPORT to each function.
For example: 
EXPORT double cvContourPolygonArea(CvContourPolygon const *p);

As soon as you add at least one EXPORT keyword the .lib file will be created. 
You should add EXPORT to all the functions in the extern "C" block though, 
otherwise you will get linkage errors for the functions you didn't add EXPORT 
for.

This fix was based on the following MSDN post: 
http://social.msdn.microsoft.com/Forums/en-US/vcgeneral/thread/15e4fc47-68b5-479
8-9e5d-d6d72da1f631/

Original comment by tim0...@gmail.com on 6 Nov 2012 at 3:53

GoogleCodeExporter commented 8 years ago
thanks

Original comment by hisso...@gmail.com on 16 Nov 2012 at 1:39

GoogleCodeExporter commented 8 years ago
thanks. now it builds successfully

Original comment by dolio...@gmail.com on 22 Mar 2013 at 4:56