Placing the function in a header file instead of the C++ source file leads to compiler errors.
f(!CV_IS_IMAGE_HDR(src)) etc...
now if you check for the definition of this #define CV_IS_IMAGE_HDR you will get it as ((img) != NULL && ((const IplImage*)(img))->nSize == sizeof(IplImage)) in a missing header file.
This leads to a developer to deal with remembering to add the header file each time.
Adding it to the C++ source file, allows the linker to resolve it with an extern statement found in other source files.
Have a good coding day!
0 Replies - 161 Views - Last Post: 18 February 2012 - 05:53 AM
#1
Functions defined in header files versus a source file
Posted 18 February 2012 - 05:53 AM
Page 1 of 1
|
|

New Topic/Question
Reply




MultiQuote


|