thanks for the link to the FAQ section, very helpufll but still have the same errr. Now i have included the log file and the ( small ) .c file:
indeed as you mentioned in the faq, the GCC is compiling as c, and not c++, so that part seems to be ok,
greetings, Peter
Bezig met uitvoeren van gcc.exe...
gcc.exe "C:\Dev-Cpp\UIPCHello.c" -o "C:\Dev-Cpp\UIPCHello.exe" -I"C:\Dev-Cpp\include" -L"C:\Dev-Cpp\lib" -L"C:\Dev-Cpp\lib"
C:\DOCUME~1\USER1\LOCALS~1\Temp/ccaIbaaa.o(.text+0x18):UIPCHello.c: undefined reference to FSUIPC_Open'
C:\DOCUME~1\USER1\LOCALS~1\Temp/ccaIbaaa.o(.text+0x4d):UIPCHello.c: undefined reference toFSUIPC_Write'
C:\DOCUME~1\USER1\LOCALS~1\Temp/ccaIbaaa.o(.text+0x5c):UIPCHello.c: undefined reference to FSUIPC_Process'
C:\DOCUME~1\USER1\LOCALS~1\Temp/ccaIbaaa.o(.text+0x81):UIPCHello.c: undefined reference toFSUIPC_Read'
C:\DOCUME~1\USER1\LOCALS~1\Temp/ccaIbaaa.o(.text+0x90):UIPCHello.c: undefined reference to FSUIPC_Process'
C:\DOCUME~1\USER1\LOCALS~1\Temp/ccaIbaaa.o(.text+0x113):UIPCHello.c: undefined reference toFSUIPC_Version'
C:\DOCUME~1\USER1\LOCALS~1\Temp/ccaIbaaa.o(.text+0x11f):UIPCHello.c: undefined reference to FSUIPC_Version'
C:\DOCUME~1\USER1\LOCALS~1\Temp/ccaIbaaa.o(.text+0x14f):UIPCHello.c: undefined reference toFSUIPC_Version'
C:\DOCUME~1\USER1\LOCALS~1\Temp/ccaIbaaa.o(.text+0x161):UIPCHello.c: undefined reference to `FSUIPC_Version'
C:\DOCUME~1\USER1\LOCALS~1\Temp/ccaIbaaa.o(.text+0x173):UIPCHello.c: undefined reference to FSUIPC_Version'
C:\DOCUME~1\USER1\LOCALS~1\Temp/ccaIbaaa.o(.text+0x185):UIPCHello.c: more undefined references toFSUIPC_Version' follow
C:\DOCUME~1\USER1\LOCALS~1\Temp/ccaIbaaa.o(.text+0x198):UIPCHello.c: undefined reference to FSUIPC_FS_Version'
C:\DOCUME~1\USER1\LOCALS~1\Temp/ccaIbaaa.o(.text+0x1a1):UIPCHello.c: undefined reference toFSUIPC_FS_Version'
C:\DOCUME~1\USER1\LOCALS~1\Temp/ccaIbaaa.o(.text+0x1a9):UIPCHello.c: undefined reference to FSUIPC_FS_Version'
C:\DOCUME~1\USER1\LOCALS~1\Temp/ccaIbaaa.o(.text+0x23f):UIPCHello.c: undefined reference toFSUIPC_Close'
collect2: ld returned 1 exit status
Uitvoering voltooid
/ UIPChello.c Displays UIPC link data in a message box /
include <windows.h>
include "FSUIPC_User.h"
char *pszErrors[] =
{ "Okay",
"Attempt to Open when already Open",
"Cannot link to FSUIPC or WideClient",
"Failed to Register common message with Windows",
"Failed to create Atom for mapping filename",
"Failed to create a file mapping object",
"Failed to open a view to the file map",
"Incorrect version of FSUIPC, or not FSUIPC",
"Sim is not version requested",
"Call cannot execute, link not Open",
"Call cannot execute: no requests accumulated",
"IPC timed out all retries",
"IPC sendmessage failed all retries",
"IPC request contains bad data",
"Maybe running on WideClient, but FS not running on Server, or wrong FSUIPC",
"Read or Write request cannot be added, memory for Process is full",
};
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, PSTR szCmdLine, int iCmdShow)
{ DWORD dwResult;
if (FSUIPC_Open(SIM_ANY, &dwResult))
{ char chMsg[128], chTimeMsg[64];
char chTime[3];
BOOL fTimeOk = TRUE;
static char *pFS[] = { "FS98", "FS2000", "CFS2", "CFS1", "Fly!", "FS2002", "FS2004" }; // Change made 060603
// Okay, we're linked, and already the FSUIPC_Open has had an initial
// exchange with FSUIPC to get its version number and to differentiate
// between FS's.
// Now to auto-Register with FSUIPC, to save the user of an Unregistered FSUIPC
// having to Register UIPCHello for us:
static char chOurKey[] = "IKB3BI67TCHE"; // As obtained from Pete Dowson
if (FSUIPC_Write(0x8001, 12, chOurKey, &dwResult))
FSUIPC_Process(&dwResult); // Process the request(s)
// I've not checked the reslut of the above -- if it didn't register us,
// and FSUIPC isn't fully user-Registered, the next request will not
// return the FS lock time
// As an example of retrieving data, well also get the FS clock time too:
if (!FSUIPC_Read(0x238, 3, chTime, &dwResult) ||
// If we wanted other reads/writes at the same time, we could put them here
!FSUIPC_Process(&dwResult)) // Process the request(s)
fTimeOk = FALSE;
// Now display all the knowledge we've
accrued:
if (fTimeOk)
wsprintf(chTimeMsg, "Request for time ok: FS clock = %02d:%02d:%02d", chTime[0], chTime[1], chTime[2]);
to dwaye,
thanks for the link to the FAQ section, very helpufll but still have the same errr. Now i have included the log file and the ( small ) .c file:
greetings, Peter
Bezig met uitvoeren van gcc.exe...
gcc.exe "C:\Dev-Cpp\UIPCHello.c" -o "C:\Dev-Cpp\UIPCHello.exe" -I"C:\Dev-Cpp\include" -L"C:\Dev-Cpp\lib" -L"C:\Dev-Cpp\lib"
C:\DOCUME~1\USER1\LOCALS~1\Temp/ccaIbaaa.o(.text+0x18):UIPCHello.c: undefined reference to
FSUIPC_Open' C:\DOCUME~1\USER1\LOCALS~1\Temp/ccaIbaaa.o(.text+0x4d):UIPCHello.c: undefined reference to
FSUIPC_Write'C:\DOCUME~1\USER1\LOCALS~1\Temp/ccaIbaaa.o(.text+0x5c):UIPCHello.c: undefined reference to
FSUIPC_Process' C:\DOCUME~1\USER1\LOCALS~1\Temp/ccaIbaaa.o(.text+0x81):UIPCHello.c: undefined reference to
FSUIPC_Read'C:\DOCUME~1\USER1\LOCALS~1\Temp/ccaIbaaa.o(.text+0x90):UIPCHello.c: undefined reference to
FSUIPC_Process' C:\DOCUME~1\USER1\LOCALS~1\Temp/ccaIbaaa.o(.text+0x113):UIPCHello.c: undefined reference to
FSUIPC_Version'C:\DOCUME~1\USER1\LOCALS~1\Temp/ccaIbaaa.o(.text+0x11f):UIPCHello.c: undefined reference to
FSUIPC_Version' C:\DOCUME~1\USER1\LOCALS~1\Temp/ccaIbaaa.o(.text+0x14f):UIPCHello.c: undefined reference to
FSUIPC_Version'C:\DOCUME~1\USER1\LOCALS~1\Temp/ccaIbaaa.o(.text+0x161):UIPCHello.c: undefined reference to `FSUIPC_Version'
C:\DOCUME~1\USER1\LOCALS~1\Temp/ccaIbaaa.o(.text+0x173):UIPCHello.c: undefined reference to
FSUIPC_Version' C:\DOCUME~1\USER1\LOCALS~1\Temp/ccaIbaaa.o(.text+0x185):UIPCHello.c: more undefined references to
FSUIPC_Version' followC:\DOCUME~1\USER1\LOCALS~1\Temp/ccaIbaaa.o(.text+0x198):UIPCHello.c: undefined reference to
FSUIPC_FS_Version' C:\DOCUME~1\USER1\LOCALS~1\Temp/ccaIbaaa.o(.text+0x1a1):UIPCHello.c: undefined reference to
FSUIPC_FS_Version'C:\DOCUME~1\USER1\LOCALS~1\Temp/ccaIbaaa.o(.text+0x1a9):UIPCHello.c: undefined reference to
FSUIPC_FS_Version' C:\DOCUME~1\USER1\LOCALS~1\Temp/ccaIbaaa.o(.text+0x23f):UIPCHello.c: undefined reference to
FSUIPC_Close'collect2: ld returned 1 exit status
Uitvoering voltooid
/ UIPChello.c Displays UIPC link data in a message box /
include <windows.h>
include "FSUIPC_User.h"
char *pszErrors[] =
{ "Okay",
"Attempt to Open when already Open",
"Cannot link to FSUIPC or WideClient",
"Failed to Register common message with Windows",
"Failed to create Atom for mapping filename",
"Failed to create a file mapping object",
"Failed to open a view to the file map",
"Incorrect version of FSUIPC, or not FSUIPC",
"Sim is not version requested",
"Call cannot execute, link not Open",
"Call cannot execute: no requests accumulated",
"IPC timed out all retries",
"IPC sendmessage failed all retries",
"IPC request contains bad data",
"Maybe running on WideClient, but FS not running on Server, or wrong FSUIPC",
"Read or Write request cannot be added, memory for Process is full",
};
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, PSTR szCmdLine, int iCmdShow)
{ DWORD dwResult;
accrued:
if (fTimeOk)
wsprintf(chTimeMsg, "Request for time ok: FS clock = %02d:%02d:%02d", chTime[0], chTime[1], chTime[2]);
return 0 ;
}
It looks like your not getting the .lib file linked. Example:
http://img.photobucket.com/albums/v681/Br5an/link.jpg
I compiled it in DevC++ ( .a ) incase the .lib file won't link. Haven't tested it, off to work.
http://home.ripway.com/2005-5/310153/