I tried with all archives in the exe folder, I copy the code like you post and in both cases, trying in 32 or in 64 bits the result is always the same:
prueba.o:fake:(.text+0x36): undefined reference to `Inp32'
I used all convinations WinFbe, CLI, in 32 and 64 bits in both cases
prueba.bas:
Code: Select all
#include "windows.bi"
'#include "inpout32.bi"
extern "Windows"
declare sub Out32(byval PortAddress as short, byval data as short)
declare function Inp32(byval PortAddress as short) as short
declare function IsInpOutDriverOpen() as BOOL
declare function IsXP64Bit() as BOOL
declare function DlPortReadPortUchar(byval port as USHORT) as UCHAR
declare sub DlPortWritePortUchar(byval port as USHORT, byval Value as UCHAR)
declare function DlPortReadPortUshort(byval port as USHORT) as USHORT
declare sub DlPortWritePortUshort(byval port as USHORT, byval Value as USHORT)
declare function DlPortReadPortUlong(byval port as ULONG) as ULONG
declare sub DlPortWritePortUlong(byval port as ULONG, byval Value as ULONG)
declare function MapPhysToLin(byval pbPhysAddr as PBYTE, byval dwPhysSize as DWORD, byval pPhysicalMemoryHandle as HANDLE ptr) as PBYTE
declare function UnmapPhysicalMemory(byval PhysicalMemoryHandle as HANDLE, byval pbLinAddr as PBYTE) as BOOL
declare function GetPhysLong(byval pbPhysAddr as PBYTE, byval pdwPhysVal as PDWORD) as BOOL
declare function SetPhysLong(byval pbPhysAddr as PBYTE, byval dwPhysVal as DWORD) as BOOL
end extern
#inclib "inpoutx64"
inp32(&H3d9)
sleep
inpout32.bi:
Code: Select all
#ifndef __FB_64BIT__
extern "Windows-MS" lib "inpout32"
#else
extern "Windows-MS" lib "inpoutx64"
#endif
declare sub Out32(port as ushort, value as ushort)
declare function Inp32(port as ushort) as ushort
end extern
Top
Result:
D:\basic\FreeBASIC-1.07.1-win64>fbc prueba.bas
prueba.o:fake:(.text+0x36): undefined reference to `Inp32'
with all files in the fbc folder