3

I have already converted static lib to OMF format, but still have message like:

    .dub\build\application-debug-windows-x86-dmd_2066-1C1E0ED068478598700706764846CD8E\ftdi.obj(ftdi)
    Error 42: Symbol Undefined _FT_Open

In program I have import functions with method which I have already used. And it was worked for me with another libs.

    pragma (lib, "ftd2xx_OMF.lib");
    extern (C)
    {
        FT_STATUS FT_Open(FT_HANDLE, ulong*);
        FT_STATUS FT_Close(FT_HANDLE);
        //...
    };

Library exists and really includes these functions. I've checked it through generating export/import lists by coffimplib.exe.

Any ideas?

Peter
  • 123
  • 1
  • 6
  • You're sure that "ftd2xx_OMF.lib" exists in the directory your running the program from? To make sure I'm not going crazy, I normally give the full path to the lib I'm pragma'ing in. – Colin Grogan Apr 20 '15 at 07:59
  • The functions interfaces such as `FT_STATUS FT_Open(FT_HANDLE, ulong*);` should reside in a __*.di__ file. Then when you compile you pass the _lib_ and the _di_ together as if they were some modules, e.g `dmd main.d ftd2xx_OMF.di ftd2xx_OMF.lib` – Abstract type Apr 20 '15 at 14:24
  • Thank you. This is just a bug in my code. This is works: `code FT_STATUS FT_Open(FT_HANDLE, uint*); code` – Peter Apr 22 '15 at 20:39

0 Answers0