Trade FOREX with FXCM

  • Award-Winning Platform
  • 24/7 Customer Support
  • Trade Directly on Charts
  • Free $50K Practice Account
Register


Results 1 to 8 of 8

Thread: Embarcadero XE2 + LIB

  1. #1
    tomaskh is offline Member
    Join Date
    Jan 2010
    Posts
    13

    Embarcadero XE2 + LIB

    Hello,
    please, can you advise me. I have a problem with including of ForexConnect.lib to XE2 project in C++ Builder. The problem is to link the library in COFF format and OMF is required. Please, could you public another type of this library?
    Thank you for answers.
    Tomas

  2. #2
    Ekaterina is offline Member
    Join Date
    Nov 2011
    Posts
    364
    Hi tomaskh,

    Unfortunately Embarcadero XE2 is not officially supported for ForexConnect. But you can try to recieve the required .lib file with the help of implib.exe utility which is supplied together with the Embarcadero XE2. The Borland C++ Compiler can also be free downloaded from here.

    Best regards,
    Ekaterina

  3. #3
    tomaskh is offline Member
    Join Date
    Jan 2010
    Posts
    13
    Hi Ekaterina,
    thank you for your reply. I tried to use implib utility but the result was that some functions were "unresolved external". It looks like the functions are not present in dll libraries. But, important thing is that i am able to compile and link the project in VCL project but not in FMX Win32 project. In VCL there is no problem with lib. Maybe standard interface like Windows is used in VCL.
    Best regards,
    Tomas

  4. #4
    tomaskh is offline Member
    Join Date
    Jan 2010
    Posts
    13
    Hello,
    i did some modifications but if i use implib, DLL is imported but the names of functions are not right. I mean that it is the problem. Please, could you give me the version of implib that should be used?
    Thank you
    Best regards
    Tomas

  5. #5
    Ekaterina is offline Member
    Join Date
    Nov 2011
    Posts
    364
    Hi Tomash,

    Please, could you give me the version of implib that should be used?
    Unfortunately, I can not help you with a proper version of implib, because "Embarcadero XE2 is not officially supported for ForexConnect".

    Best regards,
    Ekaterina
    Last edited by Ekaterina; 11-12-2012 at 04:25 AM.

  6. #6
    tomaskh is offline Member
    Join Date
    Jan 2010
    Posts
    13
    Fortunately, XE3 version of RAD Studio - C++ builder can use ForexConnect lib without any problem. I've checked it. Thank you for help.
    Best regards
    Tomas

  7. #7
    tomaskh is offline Member
    Join Date
    Jan 2010
    Posts
    13
    Sorry, but it is not as easy as i thought before. It is possible to use ForexConnect API with RadStudio but it is necessary to convert the import library to Embarcadero format.
    I spent significant period of time to fix this problem because i haven't found any solution by google etc. Isolated IMPLIB tool cannot be only used. The format is incorrect and is unacceptable by RadStudio and exported functions cannot be found in DLL file.
    It may be done by in following steps:
    1. Import .def file by IMPDEF tool. But, .def file is in MSVC format and RadStudion doesn't understand it.
    For example: ??0IAddRef@@QAE@XZ @2 ; ??0IAddRef@@QAE@XZ
    2. Now, you need to get the undecorated name of the call member by tool UNDNAME from MSVC
    Above mentioned example: public: __thiscall IAddRef::IAddRef(void)
    3. Create new project in RadStudio with the functions of undecorated names and build it
    4. Now, you have decorated names which can read RadStudio and is able to find the class member within DLL library.
    Example again: @IAddRef@addRef$qv @2 ; IAddRef::addRef()
    5. Import LIB can be linked with DLL to the RadStudio project without any problem.

    This way is quite long but in my opinion it is the only way and what is the most important that it works. That's all. If you have better idea how to simplify the translation of the libraries i would like to know it.
    Best regards
    Tomas

  8. #8
    tomaskh is offline Member
    Join Date
    Jan 2010
    Posts
    13

    DLL API

    The be solution is to prepare my own API between ForexConnect and C++ builder. It works and i have my own DLL.
    Tomas

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Disclaimer: Trading foreign exchange on margin carries a high level of risk, and may not be suitable for all investors. The high degree of leverage can work against you as well as for you. Before deciding to trade foreign exchange you should carefully consider your investment objectives, level of experience, and risk appetite. The possibility exists that you could sustain a loss of some or all of your initial investment and therefore you should not invest money that you cannot afford to lose. You should be aware of all the risks associated with foreign exchange trading, and seek advice from an independent financial advisor if you have any doubts. Any opinions, news, research, analyses, prices, or other information contained on this website is provided as general market commentary and does not constitute investment advice. Forex Capital Markets LLC. will not accept liability for any loss or damage, including without limitation to, any loss of profit, which may arise directly or indirectly from use of or reliance on such information.