Error during build of QuickFix in Exceptions.h

Hi
I am in the process of learning FIX protocol using QuickFix, I am following the example which is given in the documentation,however I am getting an error during build in one file which is part of the quickfix header file.

I have just pasted the section where I am getting the error. I cannot post the entire code since it is exceeding the size. If you need the entire code I can email.

Can anyone please let me know if I am missing anything in my project configuration. Just as an FYI I did follow all the instruction in quickfix website to set up a C++ project.

Regards
Arup

Error:
---------------------
1
2
1>c:\project\quickfix\quickfix_c\quickfix\include\quickfix\exceptions.h(260) : error C2664: 'FormatMessageW' : cannot convert parameter 5 from 'char [2048]' to 'LPWSTR'
1>        Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast


Code of Exceptions.h. The error is in line 260 which is as follows:

1
2
3
4
5
6
7
8
#ifdef _MSC_VER
    error = WSAGetLastError();
    char buffer[2048];
    FormatMessage( FORMAT_MESSAGE_FROM_SYSTEM, NULL, error,
                   MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
                   buffer, 2048, NULL );
    return buffer;
#else 
Try FormatMessageA ;)
Please mark this post as resolved. I set the character set of the VS project to "Not Set".
Topic archived. No new replies allowed.