Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Instructions for 6.0 used in 9.0

Posted on 2011-03-03
1
Medium Priority
?
363 Views
Last Modified: 2012-06-27
Hello experts.

I would like to use cvBlobsLib library in my project.
I use MSVC++ 2008 which is (9.0)

I have some explanations how to compile cvBlobsLib but they are written for 6.0

I do not know how should I use them in my compiler though.

Any help experts? :-)

Thank you

panJames
cvBlobsLib has been developed using Microsoft Visual C++ (6.0) and also can be used in .NET. A Linux version could be downloaded here. 

cvBlobsLib is distributed in a static library (.lib). To use it, it is needed to build the .lib file and later use that lib file in the desired project. To build the .lib file, simply open the MSVC++ project and build it (debug or release version). 

To build the project where the library is to be used follow this steps (MSVC++ 6.0): 

In "Project/Settings/C++/Preprocessor/Additional Include directories" add the directory where the blob library is stored 

In "Project/Settings/Link/Input/Additional library path" add the directory where the blob library is stored and in "Object/Library modules" add the cvblobslib.lib file 

Include the file "BlobResult.h" where you want to use blob variables. 

In "Project/Settings/C++/Precompiled Headers" select "Not use precompiled headers" (Thanks Brendan) 

NOTE: Verify that in the project where the cvblobslib.lib is used, the MFC Runtime Libraries are not mixed: 

Check in "Project->Settings->C/C++->Code Generation->Use run-time library" of your project and set it to 
Debug Multithreaded DLL (debug version) or to Multithreaded DLL ( release version ). 

Check in "Project->Settings->General" how it uses the MFC. It should be "Use MFC in a shared DLL". 

NOTE: The library can be compiled and used in .NET using this steps, but the menu options may differ a little 

NOTE 2: In the .NET version, the character sets must be equal in the .lib and in the project. [OpenCV yahoo group: Msg 35500]

Open in new window

0
Comment
Question by:panJames
1 Comment
 
LVL 35

Accepted Solution

by:
sarabande earned 2000 total points
ID: 35025763
you better convert the library project to vc9.

for that open the workspace file of vc6 project with vs2008 and it will suggest to convert it.

after that try to compile. you probably will encounter the typical portation issues for example that the loop counter variables defined in a for loop only were valid in the for loop and not after the loop as it was in vc6.

also if stl was used you might get some errors regarding iterators and pointers.

Sara
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When writing generic code, using template meta-programming techniques, it is sometimes useful to know if a type is convertible to another type. A good example of when this might be is if you are writing diagnostic instrumentation for code to generat…
Errors will happen. It is a fact of life for the programmer. How and when errors are detected have a great impact on quality and cost of a product. It is better to detect errors at compile time, when possible and practical. Errors that make their wa…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.
Suggested Courses

971 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question