compile error, by vc98(or vc++6.0) C1189, CONTEXT for your C

Questions about Wine on Linux
Locked
air0forceb914
Level 1
Level 1
Posts: 9
Joined: Thu Jun 13, 2019 1:52 pm

compile error, by vc98(or vc++6.0) C1189, CONTEXT for your C

Post by air0forceb914 »

Dear Wine advanced user/programer:

when I tried to compile a c code written at 2000; I use wine (4.10 , 32 bit arch) and vc98(or vc++6.0); I got the following errors on my ubuntu19.04 gcc8.3(although I have gcc/g++-9):
-----------------------
\INCLUDE\winnt.h(2133) : fatal error C1189: #error : You need to define a CONTEXT for your CPU

my
$ cat /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 15
model name : Intel(R) Core(TM)2 Duo CPU T5270 @ 1.40GHz
stepping : 13
microcode : 0xa4
cpu MHz : 911.818
cache size : 2048 KB
physical id : 0
siblings : 2
core id : 0
cpu cores : 2
apicid : 0
initial apicid : 0
fpu : yes
fpu_exception : yes
cpuid level : 10
wp : yes
------------------------------------
so how should I modify or fix my program/configuration to make this compilation success? thanks your help in adfv
User avatar
Bob Wya
Level 12
Level 12
Posts: 3068
Joined: Sat Oct 16, 2010 7:40 pm

Re: compile error, by vc98(or vc++6.0) C1189, CONTEXT for yo

Post by Bob Wya »

Just look at Wine's version of this file: winnt.h

Force define a processor architecture, at the start of your main source / header file.
For a 32-bit WINEPREFIX, I guess:

Code: Select all

#define __i386__ 1
...
#include <winnt.h>
should work.

Any chance we could stick to 1 forum thread / 1 topic?
Splitting up one issue, into multiple forum, is not a brilliant idea... :roll:

I'd also comment that this fix is trival... Which suggests that you are way out of your depth!
Start with some simpler projects and built up your knowledge.

Once again, I'd kindly request that you use the forum Code tags:

Code: Select all

I AM CODE
I AM TERMINAL OUTPUT
I AM COMPILE ERROR
Thanks
Bob
air0forceb914
Level 1
Level 1
Posts: 9
Joined: Thu Jun 13, 2019 1:52 pm

Re: compile error, by vc98(or vc++6.0) C1189, CONTEXT for yo

Post by air0forceb914 »

though I will try later, but that source code supposed to work(that mean, it won't need to be modify, and can be compile and run good
at year 2000 time's Microsoft visual c compiler); or maybe if you don't think it is other file need to be modify;
you can test that source code at your visual studio 2010's c compiler to see, that cannon.c, cannon.h, resource.h file can compile with/without modify on your
wine(32 or 64) of your system. (are you going to using command line, CL.EXE to compile?)
I will be glad to see your further tested result; that can be pretty helpful to me.
Locked