Here it goes:
-
I downloaded the QuickFix source, built it using CMake and got the .sln file.
-
Then I opened the .sln file in VC++ 2010 and built the project named “quickfix_vs10”
(actually i built a library named quickFix.lib) and got some warnings but the build was
successful. -
I then used this .lib file in another project using #pragma comment(lib, “quickFix.lib”)
-
Whenever I declare an instance of class FIX::TransactTime in my project, I get numerous
link time errors. All of them have to do with an unresolved token in utility.obj.
These errors don’t come if I use any other class.
One of those errors is:
quickFix.lib(Utility.obj) : error LNK2028: unresolved token (0A000426) “extern “C” int __stdcall getpeername(unsigned int,struct sockaddr *,int *)” (?getpeername@@$$J212YGHIPAUsockaddr@@PAH@Z) referenced in function “char const * __cdecl FIX::socket_peername(int)” (?socket_peername@FIX@@$$FYAPBDH@Z)
The error message indicates that you need to link
"Ws2_32.lib"see getpeername reference