in reply to Re^2: Using Inline::C in a package
in thread Using Inline::C in a package
Hi, rem45acp,
I suggest you use InlineX::C2XS to get the task done with out any annoyance. first: create a test.pl like below:
then run: c2xs ....... it will produce a XS package for you. Please refer Inline::C2XS doc for details.use strict; use Inline C => Config => LIBS => "-LE:/drivers/usb/devasys_i2cio -lusbi2cio", INC => "-IE:/drivers/usb/devasys_i2cio", BUILD_NOISY => 1; use Inline C => q { #include <windows.h> #include "Usbi2cio.h" #include <stdio.h> void OpenDevice() { HANDLE handle = INVALID_HANDLE_VALUE; handle = DAPI_OpenDeviceInstance("UsbI2cIo", 0); if (handle == INVALID_HANDLE_VALUE) { printf("Could not open device\n"); } else { printf("Opened device!\n"); } } };
I am trying to improve my English skills, if you see a mistake please feel free to reply or /msg me a correction
|
|---|