I am trying to use SWIG to write my Perl mod with those files but I getting a bunch of errors with the "extern "C" __declspec(dllimport)" command kinda know that basics of the command, its used to declare vars from a .dll. If im wrong please clarify.
My question is what is the equivilent to using .dlls in a unix system and what could i use to port my code over to Unix OS.
Any information on .dll UNIX and Windows and C header files would greatly be appreciated, I am not that familiar with C but i have other coding experience so i can kinda fallow most of it.
Thanks in advance
A few code snippets of the header files.
Expand|Select|Wrap|Line Numbers
- //-----------------------------------------------------------
- //
- // The _PacketLog structure is used for diagnostic packet
- // monitoring in DMX-Workshop
- //
- //-----------------------------------------------------------
- typedef struct {
- unsigned long Count; //Count of packets between heartbeaks.
- unsigned long Frequency; //Packet frequency for last sample
- unsigned long TotalCount; //Totals
- }_LogEntry;
- typedef struct S_PacketLog {
- _LogEntry LogEntry[PkMax];
- }_PacketLog;
- extern "C" __declspec(dllimport) PipeEntry PipeLibrary[MaxPipes];
- extern "C" __declspec(dllimport) NodeEntry NodeLibrary[MaxNodes];
- extern "C" __declspec(dllimport) _PacketLog PacketLog;
Expand|Select|Wrap|Line Numbers
- #ifndef __DongleImport_H
- #define __DongleImport_H
- #include "DongleArtNetMS.h"
- #include "DongleArtNetGlobal.h"
- #define DLL_MODE __declspec(dllimport)
- extern "C" WORD DLL_MODE ArtNetInit(char* NewIp);
- extern "C" void DLL_MODE ArtNetEnd(void);
- extern "C" bool DLL_MODE ArtNetReadWrite(int Pipe);
- extern "C" void DLL_MODE ArtNetSendUdp(BYTE* Ptr, WORD Size); // broadcast
- extern "C" void DLL_MODE ArtNetSendUdpPrivate(int NodeIndex, BYTE* Ptr, WORD Size); // to node's private address