Thank you, hippo. It turned out that I was reading the manual of Crypt::CBC of which the version is newer than the package installed in my Linux. Therefore, some features such as SHA-256 key derivation algorithm and
are not available in my system. After removing related codes in my Perl script, it works finally. My C++ application can now decrypt data that was encrypted by Perl script, and vice versa.