Help with the Genesis C++ API

Discussion in 'Automated Trading' started by geenecoton, Jan 30, 2009.

  1. Hello everybody,

    I am experiencing some troubles using the genesis C++ API, as i am not a C++ Programer (i am a c# - vb guy).

    I have to use the C++ because they don't provide some data (noii) in the .net API. :(

    Here is my problem:

    I am not able to connect or to get their own source code to work (the one provided with the API).

    I used visual studio 2003 and 2008 (MFC), and i get the same errors:

    #1 - error LNK2019: unresolved external symbol "__declspec(dllimport) protected: static struct AFX_MSGMAP const * __stdcall GTSession::GetThisMessageMap(void)" (__imp_?GetThisMessageMap@GTSession@@KGPBUAFX_MSGMAP@@XZ) referenced in function "protected: static struct AFX_MSGMAP const * __stdcall CMySession::GetThisMessageMap(void)" (?GetThisMessageMap@CMySession@@KGPBUAFX_MSGMAP@@XZ) MySession.obj TestAPI

    #2 - error LNK2019: unresolved external symbol "__declspec(dllimport) public: int __thiscall CMap<class ATL::CStringT<char,class StrTraitMFC_DLL<char,class ATL::ChTraitsCRT<char> > >,char const *,class GTStock *,class GTStock *>::GetCount(void)const " (__imp_?GetCount@?$CMap@V?$CStringT@DV?$StrTraitMFC_DLL@DV?$ChTraitsCRT@D@ATL@@@@@ATL@@PBDPAVGTStock@@PAV3@@@QBEHXZ) referenced in function "public: virtual int __thiscall CMySession::OnTick(void)" (?OnTick@CMySession@@UAEHXZ) MySession.obj TestAPI

    I checked all the links and project property, nothing seems wrong.:confused:

    Can someone help find out whats wrong?

    Thank you.:D
  2. I will try when I get home. One thing did when I was messing with thier API was make sure the C:\Genesis folder isn't read only.
  3. Jachyra


    Usually, that error is the result of one of the following:

    1. The declaration of the symbol contains a spelling mistake, such that, it is not the same name as the definition of the symbol.

    2. A function was used but the type or number of the parameters did not match the function definition.

    3. The calling convention (__cdecl, __stdcall, or __fastcall) differs on the use of the function declaration and the function definition.

    4. Symbol definitions are in a file that was compiled as a C program and symbols are declared in a C++ file without an extern "C" modifier.
  4. e-mail them and ask for the latest version of the library, also. There are cases where their stuff doesn't work right without the latest libraries.
  5. Thank you for your answers,

    I've e-mailed them, and they told me to try with visual studio 2005, i will do that as soon as i get it but i don't see how it will make a big difference as the code was written in vs2003 and i tried it with both vs2003 and vs2008.

    They sent me the latest API version (1.1.6) so i don't think the problem comes from that. (But i will ask them again, we never know).

    I also checked if my folders were actually in 'read only' mode and they aren't.

    Thanks for your help, i really appreciate it.
  6. You were right, i asked them, and the version they sent me was outdated.

    I finally got the new one and it's working perfectly.:D

    Just for the record, the newest version is 1.1.8.

    And by the way, during my research, i have seen a lot of messages saying that Genesis offer a very bad support, but from what i have experienced, they were very supportive and answered quite quickly.

    Thanks everyone.