Forum Discussion

FICO's avatar
FICO
Community Manager
4 years ago

Pascal interface file as alternative to the xprs.h header file

Would it be possible for FICO to provide a .pp file in order to be able to link the XPRESS library (xprs.lib and xprs.dll files) directly from PASCAL code and/or provide guidance on how to do this?

4 Replies

  • FICO's avatar
    FICO
    Community Manager

    Dear Juan, to be honest, this is the first time I come across a Pascal request. Please understand that the interfaces we provide undergo a rigorous quality assurance, i.e., we cannot provide such a file without substantial time for testing.

    It seems from this web source https://techpubs.jurassic.nl/manuals/0530/developer/Pascal_PG/sgi_html/ch04.html#id19402 that there should be more or less a 1-1 to conversion of the Xpress header xprs.h into Pascal possible. I came across the following tool that is part of the free pascal compiler.

    https://www.freepascal.org/docs-html/user/userse40.html

    Have you tried this? Does it work for you?

  • FICO's avatar
    FICO
    Community Manager

    Dear Gregor.

    Yes, I did indeed see the h2pas utility that you mentioned and while this utility does quite a good job, it needs a little tweaking. However, I am currently stuck as it's complaining about structures that are defined in the library but I can't see them as it's already compiled and causing errors like "Error: (5009) Forward type not resolved "XPRScut"

    Thank you very much!

  • FICO's avatar
    FICO
    Community Manager

    I see. At this point, I would very strongly suggest to take this question to a StackOverflow audience, where somebody might have just the right expertise to help you getting rid of the forward type error, and other pitfalls in translating xprs.h/C into Pascal.

  • FICO's avatar
    FICO
    Community Manager

    Hi Juan,

    can you please drop me a message at danieljunglas(at)fico(dot)com? I have a Pascal unit file that exports Xpress bindings. It is by no means an official part of the product or thoroughly tested, but it might do the job for you.