Problem error C1083

Jer95

Surface base designer
Addon Developer
Joined
Aug 4, 2009
Messages
110
Reaction score
0
Points
0
Location
San Francisco Bay Area
I know it was anserwed, but i tried to compile custom.mfd i get this

Code:
------ Build started: Project: CustomMFD, Configuration: Debug Win32 ------
Compiling...
CustomMFD.cpp
...\desktop\orbitersdk\samples\custommfd\orbiterapi.h(18) : fatal error C1083: Cannot open include file: 'windows.h': No such file or directory
Build log was saved at "...Desktop\Orbitersdk\samples\CustomMFD\Debug\BuildLog.htm"
CustomMFD - 1 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
There is no windows.h in the include folder in the orbiter sdk :sos:
And here is my changes to ascent profile.mfd
Code:
switch (key) {
    case OAPI_KEY_A:
        oapiOpenInputBox ("Altitude range (mi) [min max, or 'a' for auto]:", AltInput, 0, 20, (void*)this);
        return true;
    case OAPI_KEY_P:
        page = (page+1) % 2;
        return true;
    case OAPI_KEY_R:
        oapiOpenInputBox ("Vrad range (mi/h) [min max, or 'a' for auto]:", VradInput, 0, 20, (void*)this);
        return true;
    case OAPI_KEY_T:
        oapiOpenInputBox ("Vtan range (mi/h) [min max, or 'a' for auto]:", VtanInput, 0, 20, (void*)this);
        return true;
    }
    return false;
}

bool AscentMFD::ConsumeButton (int bt, int event)
{
    if (!(event & PANEL_MOUSE_LBDOWN)) return false;
    static const DWORD btkey[4] = { OAPI_KEY_P, OAPI_KEY_A, OAPI_KEY_R, OAPI_KEY_T };
    if (bt < 4) return ConsumeKeyBuffered (btkey[bt]);
    else return false;
}

char *AscentMFD::ButtonLabel (int bt)
{
    char *label[4] = {"PG", "AR", "VRR", "VTR"};
    return (bt < 4 ? label[bt] : 0);
}

int AscentMFD::ButtonMenu (const MFDBUTTONMENU **menu) const
{
    static const MFDBUTTONMENU mnu[4] = {
        {"Select page", 0, 'P'},
        {"Altitude range", 0, 'A'},
        {"Radial", "velocity range", 'R'},
        {"Tangential", "velocity range", 'T'}
    };
    if (menu) *menu = mnu;
    return 4;
Martin said i need to code them myself to show US units but i cant compile
emot-sigh.gif
 
I installed it and the search found windows .h but visual C++ cannot find it
winh.png

I installed
PSDK-x86.exe
 
I installed it and the search found windows .h but visual C++ cannot find it
I installed
PSDK-x86.exe

OK, did you set up your compiler?

So far I see you have it in debug mode. (for final release you will need it in 'release' mode)

You will need to add the SDK to the include path in the compiler.

/wiki/Free_Compiler_Setup said:
Right click on the bold [project] in the left-hand tree. Select "Properties". Add the SDK include path for both the Platform SDK and the Orbiter SDK to the project include path. The Platform SDK installs itself by default to C:\Program Files\Microsoft Platform SDK so add the path C:\Program Files\Microsoft Platform SDK\Include. Orbiter can be installed anywhere, but if you unpacked it to C:\Orbiter, the correct path is C:\Orbiter\Orbitersdk\include.

similarly with the library s. (if you havenot already done so)

/wiki/Free_Compiler_Setup said:
Add the SDK library path for both the Platform SDK and the Orbiter SDK to the linker library path. The Platform SDK path default is C:\Program Files\Microsoft Platform SDK\lib. The Orbiter SDK default is C:\Orbiter\Orbitersdk\lib
 
Ok i did those now i have a new problem:
Code:
MSVCRT.lib(ti_inst.obj) : fatal error LNK1112: module machine type 'IA64' conflicts with target machine type 'X86'
 
Ok i did those now i have a new problem:
Code:
MSVCRT.lib(ti_inst.obj) : fatal error LNK1112: module machine type 'IA64' conflicts with target machine type 'X86'
The lib file you're trying to link to (MSVCRT.lib) is compiled for 64-bit intel code (IA64), but you are trying to link your project to work on X86 architecture. You need to either change the machine type (Configuration Properties --> Linker --> Target Machine) to IA64 or use a different set of libraries (I am assuming that you installed the 64-bit platform SDK) to link against.
 
Back
Top