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 "FSUIPC_User.h"

void main()

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--------------------
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.



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.



Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • 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.