0

cl options

/nologo /ML /Gt0 /QMOb2000 /W3 /GX /Od /Gf /X /I "D:\Xorgfr\include" /D "NDEBUG" /D "NOGDICAPMASKS" /D "NOWINMESSAGES" /D "NOWINSTYLES" /D "NOSYSMETRICS" /D "NOMENUS" /D "NOICONS" /D "NOSYSCOMMANDS" /D "NORASTEROPS" /D "NOSHOWWINDOW" /D "OEMRESOURCE" /D "NOATOM" /D "NOCLIPBOARD" /D "NOCOLOR" /D "NOCTLMGR" /D "NODRAWTEXT" /D "NOGDI" /D "NOKERNEL" /D "NONLS" /D "NOMB" /D "NOMEMMGR" /D "NOMETAFILE" /D "NOMINMAX" /D "NOMSG" /D "NOOPENFILE" /D "NOSCROLL" /D "NOSERVICE" /D "NOSOUND" /D "NOTEXTMETRIC" /D "NOWINOFFSETS" /D "NOWH" /D "NOCOMM" /D "NOKANJI" /D "NOHELP" /D "NOPROFILER" /D "NODEFERWINDOWPOS" /D "NOMCX" /D "Roster" /D WIN32_WINNT=0x4000 /Fo"MIPSRel/" /c

In reality I’m building a kernel dll.

D:\Xfr\main.C() : fatal error C1001: INTERNAL COMPILER ERROR
  (compiler file 'mio.cpp', line 49)

Themio.cppfile does not exist on my system, so I think this is a part of the cl.exe source code. With gcc, there is an option that let you know which line of your code triggered the compiler error.
I tried to disable compiled headers; all optimisations changing the target to R10000, but the error still appends at the same place.

And microsoft won’t correct the error for sure. I couldn’t found an another compiler supporting this platform.

Also I really need to use the include files since the export is structure of structure of structures.

static ALLOC_SECTION_LDATA KBDTABLES KbdTables = {
    &CharModifiers,

    aVkToWcharTable,

    aDeadKey,

    aKeyNames,
    aKeyNamesExt,
    aKeyNamesDead,

    ausVK,
    sizeof(ausVK) / sizeof(ausVK[0]),
    aE0VscToVk,
    aE1VscToVk,

    MAKELONG(KLLF_LRM_RLM | KLLF_ALTGR, KBD_VERSION),

    2,
    sizeof(aLigature[0]),
    (PLIGATURE1)aLigature
};

PKBDTABLES KbdLayerDescriptor(VOID) // this is the exported function, as you can see I definitely need it’s definition
    return  &KbdTables; // just return a pointer to the structure
}
user2284570
  • 2,891
  • 3
  • 26
  • 74
  • Are you sure? [There's a compiler option that allows you to send internal compiler error reports to Microsoft](https://msdn.microsoft.com/en-us/library/ms173502.aspx) ...wait, MIPS?! Are you compiling something for NT 4? And what version of the compiler is this? – andlabs Jul 26 '15 at 20:22
  • Also, what's your invocation of `cl`? Are you building one file at a time? I'm wondering if we can narrow things down by cutting out blocks of code at a time... – andlabs Jul 26 '15 at 20:32
  • @andlabs I already have Alpha IA-64, i386 and x86_64. I’m using visual c++ RISC edition 4.0. Older versions doesn’t support some of the functions I’m using. I couldn’t found an higher version for MIPS. MIPS support seems to be completely dead but running applications written for the winapi isn’t. – user2284570 Jul 26 '15 at 20:33
  • @andlabs : Yes I build one file at time. In fact I want to create custom keyboard layouts based on [this source code](https://code.msdn.microsoft.com/windowshardware/Keyboard-Layout-Sample-b142d9e3). The dll only contains data. But I need to use some of the headers from modern visual c++ as to my knowledge microsoft never published kbd.h for those platforms. – user2284570 Jul 26 '15 at 20:52
  • Well what I want to do is take off things and put them back, one at a time, until the error goes away. The thing won't actually *work*, but it'll help figure out what's tripping the compiler up. What happens if you remove the `kbd.h` include? – andlabs Jul 26 '15 at 21:03
  • @andlabs `kbd.h`is everything including the definition of the single export, but I imported it. Outside my own modifications, what I do is merely trying to [compile the original source code for mips](https://code.msdn.microsoft.com/windowshardware/Keyboard-Layout-Sample-b142d9e3). And this give the same error. So I know it comes inside headers. – user2284570 Jul 26 '15 at 21:37
  • No, what I meant is - avoid including kbd.h at all, just let the symbols remain undefined. Do you still get a compiler error? If so, we can look in kbd.h and see what preprocessor directives would trip it... – andlabs Jul 26 '15 at 21:38
  • @andlabs `kbd.h`contains all the structures definitions used by my projects. The dll only contains data. – user2284570 Jul 26 '15 at 21:46
  • Okay, let's try this: what happens if you remove the `#pragma region` and `#pragma endregion` lines from kbd.h? – andlabs Jul 26 '15 at 21:54
  • Build with ``/P`` which generates a ``.i`` file. It fully expands the preprocessor stage. – Chuck Walbourn Jul 27 '15 at 00:38
  • @andlabs Sorry, but in order to ease things I’m using an older version of the [ddk header files](http://www.microsoft.com/en-us/download/details.aspx?id=21476). The`kbd.h`I’m using is [here](http://pastebin.com/6zkKqDSr). In short those pragmas aren’t in the file. A newer version would require editing. – user2284570 Jul 27 '15 at 09:13
  • @ChuckWalbourn Which is available [here](http://paste.c99.nl/b3bb76203fe125b56daa.txt). – user2284570 Jul 27 '15 at 10:34
  • Does removing the `#pragma data_seg` produce something that builds? I know it won't work, I just want to know if it will still build, and I'm stumped at this point. Maybe try the C++ comments in kbd.h? – andlabs Jul 27 '15 at 11:05
  • @andlabs It still triggers the same internal compiler error. So I think I need the compiler to tell the line which triggered the crash like with gcc? That’s said do you know how to build a preprocessed *(`Xorgfr.i`)* file? – user2284570 Jul 27 '15 at 11:18
  • @andlabs Solved but I would like the generic answer for my question in order to solve future problems. – user2284570 Jul 27 '15 at 16:52
  • I don't know, sorry. I'm not a Microsoft employee and don't have access to cl's source code. There is no switch, as far as I am aware, to get the line that the internal compiler error was triggered on (you can check the docs to confirm). All I can do is guess :/ Glad you fixed it though, and good luck. – andlabs Jul 27 '15 at 17:44
  • @andlabs no butbi wonder if there is a command line switch like with gcc. I don’t accept my own answer for this purpose. – user2284570 Jul 27 '15 at 18:05

1 Answers1

0

Just found the answer. I thought mio.cpp could mean mips io and that it would be related to writing file.

It is as simply as setting the clock before 1801.

No idea why, but it is definitely the reason. Doing without restore the problem.
Also the bios doesn’t seems to handle post 2000 years very well.

user2284570
  • 2,891
  • 3
  • 26
  • 74