Jump to content
The simFlight Network Forums

Please Help


Recommended Posts

Dear folks,

I am trying to compile this code using MSVC 6.0

#include 
#include "FSUIPC_User.h"

void main()
{
	printf("Testing...");
}

I have already put FSUIPC_User.lib into LIB folder, FSUIPC_User.h into INCLUDE folder and also added FSUIPC_User.lib into Linker (Project Settings...)

Here are the errors I get:

--------------------Configuration: fsuipc_1 - Win32 Debug--------------------
Compiling...
fsuipc_1.cpp
c:\program files\microsoft visual studio\vc98\include\fsuipc_user.h(37) : error C2146: syntax error : missing ';' before identifier 'FSUIPC_Version'
c:\program files\microsoft visual studio\vc98\include\fsuipc_user.h(37) : fatal error C1004: unexpected end of file found
Error executing cl.exe.

fsuipc_1.obj - 2 error(s), 0 warning(s)

Please, anybody knows how to solve this?

Thanks and regards!

Link to comment
Share on other sites

Please, anybody knows how to solve this?

Yes. The error refers to Line 37. Did you look at line 37? It is this:

extern DWORD FSUIPC_Version; // HIWORD is 1000 x Version Number, minimum 1998

The data type "DWORD" is a Windows data type. This won't have been defined -- you have not even included the Windows header -- since, to access FSUIPC, you must compile a Windows program, this is essential.

You could of course define DWORD yourself (it's an "unsigned long" in a 32-bit system), but you will probably fall foul of other things later if you do not include any Windows definitions.

Please see if you can find a book on Windows programming -- for C the one by Petzold is good, almost essential. Once you can write a Windows program I'm sure FSUIPC interfacing will come much easier to you.

Regards,

Pete

Link to comment
Share on other sites

I didn't realise that it was necessary to code a windows program.

I'll be studying this, thanks

The methods used to provide the inter-process communication, between your program and FS, require access to assorted bits of the Windows API. Your program may not actually need to have a Window (or if it does it can be an invisible one) -- maybe it can be a "console program" -- but it certainly needs to be loaded by windows and have access to Windows APIs. Including the Windows header will allow that.

But by all means, try just defining DWORD before calling up my header.

Regards,

Pete

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.