Attached will always be the most currently generated *.def and *.a import library files for the following system DLL's:
- atl
- user32
- propsys
- gdiplus
- shcore
- comctl32
- Ensure that you have the latest Microsoft *.LIB libraries available. These
are installed as part of the Visual Studio (or Community version) installation.
- Create two subfolders "win32" and "win64" to hold the *.def and *.a files that
get generated from the batch file.
- Modify the "reimp.bat" batch file to use folder paths specific to your computer. Ensure
that you use the dlltool exe that ship with your version of the FB compiler in order
to ensure binary compatibility.
- Ensure that you use the 32 and 64 bit versions of the "reimp" tool which reads
Microsoft LIB import libraries in order to the create DEF file that is used by
dlltool to create the *.a library import file.
- The reimp32/64 tool generates multiple def files for the shcore.lib file rather than
just one combined def. Therefore, for shcore use gendef instead of reimp.
- Some def files need to be manually edited to remove some decorations. These are
located in the .\manual_edit_def folder. Therefore, do NOT automatically generate
these defs with the reimp or gendef tools.
Updated with ATL import library (uses manually edited DEF originally generated using gendef).
Sooner than later the problem will be solved because everybody will end using 64-bit alone. I no longer can find a good reason to use 32-bit.
The problem is gone. Import libraries aren't needed to work with Windows. You can just use EXTERN and LIB, e.g.
extern "Windows" LIB "gdiplus.dll"
DECLARE FUNCTION GdiplusStartup (BYVAL token AS ULONG_PTR PTR, BYVAL input AS CONST GdiplusStartupInput PTR, BYVAL output AS GdiplusStartupOutput PTR) AS GpStatus
DECLARE SUB GdiplusShutdown (BYVAL token AS ULONG_PTR)
DECLARE FUNCTION GdipCreateBitmapFromFile (BYVAL filename AS CONST WSTRING PTR, BYVAL bmp AS GpBitmap PTR PTR) AS GpStatus
...
...
end extern
Works both with 32 and 64 bit.
Why they still use .def files and import libraries (which are outdated) is a mystery to me?