GOOD GOD I'm so FUCKING ANGRY right now \rage
I need a cryptographic library for a program of mine, so I download crypto++ it says on the project page that's compatible with all versions of VC++ from 6.0 and up.
I first tried to build the f*ck*ng thing with VC++ 2010. No luck there, the project upgrader spits out it's little report with something about a platform not being supported. I'd be lying if I said that I had expected the thing to work, since such things never work for me. I decided it'd be best to build the library with VC++ 6.0 and later import it in VC++ 2010.
This was 3 hours ago.
So I started fixing errors and faulty definitions that are common in multi platform sourcecodes (crypto++ is apparently 'compatible' with linux, mac and windows all in 1 big file!). After about 60 -/+ minutes I finally got the f*c*er to compile and link at the same time! A great victory indeed!
I ran the benchmark and the test application and all was well. I thought I was almost done so I sighed in relief because I thought that I had avoided one of those (this) incompatibility nightmares.
The last test was ran not 2 hours ago.
I made a quick and dirty test application (still in VC++6.0) with the functions and imports I needed, I tested it and it worked. Glad that everything was proceeding so smoothly I dropped all includes in my vc2010/includes dir and the library in the /lib dir. I copied the test file into my main project and hit compile. And what do think happens? That little sh*t of a compiler has the nerve to complain about conflicting typedefs! The ones I spent an hour on fixing!!!!! I was furious. I felt the urge to take a hammer to my compiler and settle this dispute real close like...
However, of course, I didn't. Since I know that it wouldn't solve anything. So I set to fixing the fixed definitions and typedefs with renewed gusto. Then after 45 minutes or so I got them working again.
As if the two compilers weren't enough for me link.exe had to complain as well. This is where I got stuck, I searched, I experimented and tried everything. But unlike compiling errors which are usually just a bunch of incompatible keywords, linkage errors are a real nightmare. These are the ones I still can't fix:
Code:
1>------ Build started: Project: Bdoor, Configuration: Release Win32 ------
1> Client.cpp
1> Communications.cpp
1>Communications.cpp(54): warning C4996: 'fopen': This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
1> c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\stdio.h(234) : see declaration of 'fopen'
1> CryptoService.cpp
1> main.cpp
1> p2p-class.cpp
1>p2p-class.cpp(449): warning C4244: '=' : conversion from 'std::streamoff' to 'int', possible loss of data
1> Support.cpp
1>Support.cpp(13): warning C4800: 'BOOL' : forcing value to bool 'true' or 'false' (performance warning)
1>cryptlib.lib(integer.obj) : error LNK2005: "public: __thiscall std::bad_cast::bad_cast(char const *)" (??0bad_cast@STD@@QAE@PBD@Z) already defined in LIBCMT.lib(stdexcpt.obj)
1>cryptlib.lib(integer.obj) : error LNK2005: "public: virtual __thiscall std::bad_cast::~bad_cast(void)" (??1bad_cast@STD@@uae@XZ) already defined in LIBCMT.lib(stdexcpt.obj)
1>cryptlib.lib(integer.obj) : error LNK2005: "public: __thiscall std::bad_cast::bad_cast(class std::bad_cast const &)" (??0bad_cast@STD@@QAE@ABV01@@Z) already defined in LIBCMT.lib(stdexcpt.obj)
1>CryptoService.obj : error LNK2001: unresolved external symbol "void __cdecl CryptoPP::AlignedDeallocate(void *)" (?AlignedDeallocate@CryptoPP@@YAXPAX@Z)
1>cryptlib.lib(dsa.obj) : error LNK2001: unresolved external symbol "public: char const * __thiscall type_info::name(void)const " (?name@Type_info@@QBEPBDXZ)
1>cryptlib.lib(ecp.obj) : error LNK2001: unresolved external symbol "public: char const * __thiscall type_info::name(void)const " (?name@Type_info@@QBEPBDXZ)
1>cryptlib.lib(ec2n.obj) : error LNK2001: unresolved external symbol "public: char const * __thiscall type_info::name(void)const " (?name@Type_info@@QBEPBDXZ)
1>cryptlib.lib(gfpcrypt.obj) : error LNK2001: unresolved external symbol "public: char const * __thiscall type_info::name(void)const " (?name@Type_info@@QBEPBDXZ)
1>cryptlib.lib(hex.obj) : error LNK2001: unresolved external symbol "public: char const * __thiscall type_info::name(void)const " (?name@Type_info@@QBEPBDXZ)
1>cryptlib.lib(algparam.obj) : error LNK2001: unresolved external symbol "public: char const * __thiscall type_info::name(void)const " (?name@Type_info@@QBEPBDXZ)
1>cryptlib.lib(nbtheory.obj) : error LNK2001: unresolved external symbol "public: char const * __thiscall type_info::name(void)const " (?name@Type_info@@QBEPBDXZ)
1>cryptlib.lib(dll.obj) : error LNK2001: unresolved external symbol "public: char const * __thiscall type_info::name(void)const " (?name@Type_info@@QBEPBDXZ)
1>cryptlib.lib(gf2n.obj) : error LNK2001: unresolved external symbol "public: char const * __thiscall type_info::name(void)const " (?name@Type_info@@QBEPBDXZ)
1>cryptlib.lib(rsa.obj) : error LNK2001: unresolved external symbol "public: char const * __thiscall type_info::name(void)const " (?name@Type_info@@QBEPBDXZ)
1>cryptlib.lib(cryptlib.obj) : error LNK2001: unresolved external symbol "public: char const * __thiscall type_info::name(void)const " (?name@Type_info@@QBEPBDXZ)
1>cryptlib.lib(integer.obj) : error LNK2001: unresolved external symbol "public: char const * __thiscall type_info::name(void)const " (?name@Type_info@@QBEPBDXZ)
1>cryptlib.lib(filters.obj) : error LNK2001: unresolved external symbol "public: char const * __thiscall type_info::name(void)const " (?name@Type_info@@QBEPBDXZ)
1>cryptlib.lib(rng.obj) : error LNK2001: unresolved external symbol "void __cdecl std::_Xran(void)" (?_Xran@STD@@YAXXZ)
1>cryptlib.lib(dsa.obj) : error LNK2001: unresolved external symbol "void __cdecl std::_Xran(void)" (?_Xran@STD@@YAXXZ)
1>cryptlib.lib(hmac.obj) : error LNK2001: unresolved external symbol "void __cdecl std::_Xran(void)" (?_Xran@STD@@YAXXZ)
1>cryptlib.lib(ec2n.obj) : error LNK2001: unresolved external symbol "void __cdecl std::_Xran(void)" (?_Xran@STD@@YAXXZ)
1>cryptlib.lib(gfpcrypt.obj) : error LNK2001: unresolved external symbol "void __cdecl std::_Xran(void)" (?_Xran@STD@@YAXXZ)
1>cryptlib.lib(hex.obj) : error LNK2001: unresolved external symbol "void __cdecl std::_Xran(void)" (?_Xran@STD@@YAXXZ)
1>cryptlib.lib(basecode.obj) : error LNK2001: unresolved external symbol "void __cdecl std::_Xran(void)" (?_Xran@STD@@YAXXZ)
1>cryptlib.lib(mqueue.obj) : error LNK2001: unresolved external symbol "void __cdecl std::_Xran(void)" (?_Xran@STD@@YAXXZ)
1>cryptlib.lib(gf2n.obj) : error LNK2001: unresolved external symbol "void __cdecl std::_Xran(void)" (?_Xran@STD@@YAXXZ)
1>cryptlib.lib(modes.obj) : error LNK2001: unresolved external symbol "void __cdecl std::_Xran(void)" (?_Xran@STD@@YAXXZ)
1>cryptlib.lib(ecp.obj) : error LNK2001: unresolved external symbol "void __cdecl std::_Xran(void)" (?_Xran@STD@@YAXXZ)
1>cryptlib.lib(iterhash.obj) : error LNK2001: unresolved external symbol "void __cdecl std::_Xran(void)" (?_Xran@STD@@YAXXZ)
1>cryptlib.lib(oaep.obj) : error LNK2001: unresolved external symbol "void __cdecl std::_Xran(void)" (?_Xran@STD@@YAXXZ)
1>cryptlib.lib(hrtimer.obj) : error LNK2001: unresolved external symbol "void __cdecl std::_Xran(void)" (?_Xran@STD@@YAXXZ)
1>cryptlib.lib(rijndael.obj) : error LNK2001: unresolved external symbol "void __cdecl std::_Xran(void)" (?_Xran@STD@@YAXXZ)
1>cryptlib.lib(algparam.obj) : error LNK2001: unresolved external symbol "void __cdecl std::_Xran(void)" (?_Xran@STD@@YAXXZ)
1>cryptlib.lib(nbtheory.obj) : error LNK2001: unresolved external symbol "void __cdecl std::_Xran(void)" (?_Xran@STD@@YAXXZ)
1>cryptlib.lib(dll.obj) : error LNK2001: unresolved external symbol "void __cdecl std::_Xran(void)" (?_Xran@STD@@YAXXZ)
1>cryptlib.lib(pubkey.obj) : error LNK2001: unresolved external symbol "void __cdecl std::_Xran(void)" (?_Xran@STD@@YAXXZ)
1>cryptlib.lib(integer.obj) : error LNK2001: unresolved external symbol "void __cdecl std::_Xran(void)" (?_Xran@STD@@YAXXZ)
1>cryptlib.lib(randpool.obj) : error LNK2001: unresolved external symbol "void __cdecl std::_Xran(void)" (?_Xran@STD@@YAXXZ)
1>cryptlib.lib(asn.obj) : error LNK2001: unresolved external symbol "void __cdecl std::_Xran(void)" (?_Xran@STD@@YAXXZ)
1>cryptlib.lib(filters.obj) : error LNK2001: unresolved external symbol "void __cdecl std::_Xran(void)" (?_Xran@STD@@YAXXZ)
1>cryptlib.lib(rsa.obj) : error LNK2001: unresolved external symbol "void __cdecl std::_Xran(void)" (?_Xran@STD@@YAXXZ)
1>cryptlib.lib(cryptlib.obj) : error LNK2001: unresolved external symbol "void __cdecl std::_Xran(void)" (?_Xran@STD@@YAXXZ)
1>cryptlib.lib(queue.obj) : error LNK2001: unresolved external symbol "void __cdecl std::_Xran(void)" (?_Xran@STD@@YAXXZ)
1>cryptlib.lib(osrng.obj) : error LNK2001: unresolved external symbol "void __cdecl std::_Xran(void)" (?_Xran@STD@@YAXXZ)
1>cryptlib.lib(rng.obj) : error LNK2001: unresolved external symbol "void __cdecl std::_Xlen(void)" (?_Xlen@STD@@YAXXZ)
1>cryptlib.lib(dsa.obj) : error LNK2001: unresolved external symbol "void __cdecl std::_Xlen(void)" (?_Xlen@STD@@YAXXZ)
1>cryptlib.lib(hmac.obj) : error LNK2001: unresolved external symbol "void __cdecl std::_Xlen(void)" (?_Xlen@STD@@YAXXZ)
1>cryptlib.lib(ec2n.obj) : error LNK2001: unresolved external symbol "void __cdecl std::_Xlen(void)" (?_Xlen@STD@@YAXXZ)
1>cryptlib.lib(gfpcrypt.obj) : error LNK2001: unresolved external symbol "void __cdecl std::_Xlen(void)" (?_Xlen@STD@@YAXXZ)
1>cryptlib.lib(hex.obj) : error LNK2001: unresolved external symbol "void __cdecl std::_Xlen(void)" (?_Xlen@STD@@YAXXZ)
1>cryptlib.lib(basecode.obj) : error LNK2001: unresolved external symbol "void __cdecl std::_Xlen(void)" (?_Xlen@STD@@YAXXZ)
1>cryptlib.lib(mqueue.obj) : error LNK2001: unresolved external symbol "void __cdecl std::_Xlen(void)" (?_Xlen@STD@@YAXXZ)
1>cryptlib.lib(gf2n.obj) : error LNK2001: unresolved external symbol "void __cdecl std::_Xlen(void)" (?_Xlen@STD@@YAXXZ)
1>cryptlib.lib(modes.obj) : error LNK2001: unresolved external symbol "void __cdecl std::_Xlen(void)" (?_Xlen@STD@@YAXXZ)
1>cryptlib.lib(ecp.obj) : error LNK2001: unresolved external symbol "void __cdecl std::_Xlen(void)" (?_Xlen@STD@@YAXXZ)
1>cryptlib.lib(iterhash.obj) : error LNK2001: unresolved external symbol "void __cdecl std::_Xlen(void)" (?_Xlen@STD@@YAXXZ)
1>cryptlib.lib(oaep.obj) : error LNK2001: unresolved external symbol "void __cdecl std::_Xlen(void)" (?_Xlen@STD@@YAXXZ)
1>cryptlib.lib(hrtimer.obj) : error LNK2001: unresolved external symbol "void __cdecl std::_Xlen(void)" (?_Xlen@STD@@YAXXZ)
1>cryptlib.lib(rijndael.obj) : error LNK2001: unresolved external symbol "void __cdecl std::_Xlen(void)" (?_Xlen@STD@@YAXXZ)
1>cryptlib.lib(algparam.obj) : error LNK2001: unresolved external symbol "void __cdecl std::_Xlen(void)" (?_Xlen@STD@@YAXXZ)
1>cryptlib.lib(nbtheory.obj) : error LNK2001: unresolved external symbol "void __cdecl std::_Xlen(void)" (?_Xlen@STD@@YAXXZ)
1>cryptlib.lib(dll.obj) : error LNK2001: unresolved external symbol "void __cdecl std::_Xlen(void)" (?_Xlen@STD@@YAXXZ)
1>cryptlib.lib(pubkey.obj) : error LNK2001: unresolved external symbol "void __cdecl std::_Xlen(void)" (?_Xlen@STD@@YAXXZ)
1>cryptlib.lib(integer.obj) : error LNK2001: unresolved external symbol "void __cdecl std::_Xlen(void)" (?_Xlen@STD@@YAXXZ)
1>cryptlib.lib(randpool.obj) : error LNK2001: unresolved external symbol "void __cdecl std::_Xlen(void)" (?_Xlen@STD@@YAXXZ)
1>cryptlib.lib(asn.obj) : error LNK2001: unresolved external symbol "void __cdecl std::_Xlen(void)" (?_Xlen@STD@@YAXXZ)
1>cryptlib.lib(filters.obj) : error LNK2001: unresolved external symbol "void __cdecl std::_Xlen(void)" (?_Xlen@STD@@YAXXZ)
1>cryptlib.lib(rsa.obj) : error LNK2001: unresolved external symbol "void __cdecl std::_Xlen(void)" (?_Xlen@STD@@YAXXZ)
1>cryptlib.lib(cryptlib.obj) : error LNK2001: unresolved external symbol "void __cdecl std::_Xlen(void)" (?_Xlen@STD@@YAXXZ)
1>cryptlib.lib(queue.obj) : error LNK2001: unresolved external symbol "void __cdecl std::_Xlen(void)" (?_Xlen@STD@@YAXXZ)
1>cryptlib.lib(osrng.obj) : error LNK2001: unresolved external symbol "void __cdecl std::_Xlen(void)" (?_Xlen@STD@@YAXXZ)
1>cryptlib.lib(integer.obj) : error LNK2001: unresolved external symbol "public: __thiscall std::ios_base::Init::Init(void)" (??0Init@iOS_base@STD@@QAE@XZ)
1>cryptlib.lib(dll.obj) : error LNK2001: unresolved external symbol "public: __thiscall std::ios_base::Init::Init(void)" (??0Init@iOS_base@STD@@QAE@XZ)
1>cryptlib.lib(gf2n.obj) : error LNK2001: unresolved external symbol "public: __thiscall std::ios_base::Init::Init(void)" (??0Init@iOS_base@STD@@QAE@XZ)
1>cryptlib.lib(integer.obj) : error LNK2001: unresolved external symbol "public: __thiscall std::ios_base::Init::~Init(void)" (??1Init@iOS_base@STD@@QAE@XZ)
1>cryptlib.lib(dll.obj) : error LNK2001: unresolved external symbol "public: __thiscall std::ios_base::Init::~Init(void)" (??1Init@iOS_base@STD@@QAE@XZ)
1>cryptlib.lib(gf2n.obj) : error LNK2001: unresolved external symbol "public: __thiscall std::ios_base::Init::~Init(void)" (??1Init@iOS_base@STD@@QAE@XZ)
1>cryptlib.lib(integer.obj) : error LNK2001: unresolved external symbol "public: bool __thiscall std::locale::_Iscloc(void)const " (?_Iscloc@locale@STD@@QBE_NXZ)
1>cryptlib.lib(integer.obj) : error LNK2001: unresolved external symbol "public: class std::locale::facet const * __thiscall std::locale::_Getfacet(unsigned int,bool)const " (?_Getfacet@locale@STD@@QBEPBVfacet@12@I_N@Z)
1>cryptlib.lib(integer.obj) : error LNK2001: unresolved external symbol "private: static short const * const std::ctype<char>::_Cltab" (?_Cltab@?$ctype@D@STD@@0PBFB)
1>C:\Users\Administrator\documents\visual studio 2010\Projects\Bdoor\Release\Bdoor.exe : fatal error LNK1120: 9 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Luckily I now have a new idea! I'm going to create a dll file that exports the functions I need in VC++ 6.0, and then link to those dynamicly in VC++ 2010!
I'll post the outcome later
Similar stories anyone?