if I use this pi file:
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
Code: Select all
#include "inpout32.bi"
#inclib "inpoutx64"
? "Hola mundo"
sleep
if i use this bas:
Code: Select all
#include "inpout32.bi"
#inclib "inpoutx64"
? Inp32()
sleep
D:\basic\FreeBASIC-1.07.1-win64\prueba.bas(6) error 1: Argument count mismatch, found ')' in '? Inp32()'
and if I use this bas:
Code: Select all
#include "inpout32.bi"
#inclib "inpoutx64"
? Inp32(&h61)
sleep
D:\basic\FreeBASIC-1.07.1-win64\prueba.o:fake:(.text+0x36): undefined reference to `Inp32'
Somebody could deduce which is the problem, it seems like the problem is in the argument pass in the function on?