17 October 2009, 00:19 | #1 |
Linux snob
Join Date: Sep 2008
Location: Monkey Island
Posts: 997
|
Dr. Strangelove's guide to compiling WinUAE 1.6.1
… or how I learned to stop worrying and love the bomb.I get an illegal cast error for sounddep\sound.c(496). Parser.c and ioport.c get lots of errors, because the headers of ghostscript and winio seem to have changed from what Toni uses. I could confirm this for paraport. EDIT: ioport.c compiles if every reference to getPortInfo (line 166, 170, 199) is turned off. paraport.h does not define PARAPORT_INFO any more. EDIT2: Inluded ghost.h, imain.h, ierrors.h, iapi.h to parser.c and made all ghostscript headers visible to the compiler. parser.c compiles now. My build system is XP, Visual C++ Express 2008, latest DirectX SDK (DXSDK_Aug2009), WDK (was DDK) and Windows 7 SDK (!). (GNU, where are you ) Then I copied dxerr.h to dxerr9.h. The DDK headers screw everything else, so I only included ntdkbd.h, ntddstor.h and ntddcdrm.h which is sufficient. EDIT3: see here The compilation is set to win32 and release, since windowing stuff won't compile in debug mode. I installed in addition
Last edited by gilgamesh; 17 October 2009 at 22:22. |
17 October 2009, 10:16 | #2 |
Zone Friend
|
1.6.1. ... hmm.
Maybe an attempt with the latest beta sources will give more promising results? (Yes, I know you'll have to ask Toni for them, since there's no link.) It would certainly be worth a try because poking around in old source code is usually not too great fun |
17 October 2009, 11:01 | #3 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,505
|
You do know that I am not interested with "lots of errors" and similar "error reports". Obviously I do not get those errors
DDK headers do not screw anything up either. Do you want help or do you just want to complain? It is always so easy to blame others. (sorry for being annoying again but I had two choices, either not reply at all or reply something and I just can't do it without commenting your style...) Never ever rename header files, rename dxerr9.h to dxerr.h in direct3d.h (or get newer sources) Also make sure header paths are in correct order in MSVC: 1.WinSDK 2.DXSDK 3.DDK 4.Other includes winio.h is not C compatible, remove extern "C" and line that includes "bool" EDIT: DDK path must be "winddk\<version>\inc\api" Last edited by Toni Wilen; 17 October 2009 at 12:17. |
17 October 2009, 11:54 | #4 | |
The Spanish Songstress
Join Date: Jul 2009
Location: Finland
Posts: 114
|
Quote:
I seriously doubt Toni would have broken it "just for fun" since. Of course, there may be some fun hunting down all the dependencies still. EDIT: Though, I haven't tried the free compiler (express) ever, so don't if it will bring its own problems. |
|
17 October 2009, 12:15 | #5 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,505
|
Express should work just fine. I am quite sure problem is wrong order of Windows header paths (it can cause really weird errors)
Also "other" header files can also cause conflicts. I haven't updated ghostscript etc.. header files for long time now. Perhaps it is time |
17 October 2009, 22:17 | #6 | |||||
Linux snob
Join Date: Sep 2008
Location: Monkey Island
Posts: 997
|
Quote:
Quote:
And yes, one can fix this by adding several subdirectories of the gs source tree for headers, and parser.c must include: ghost.h, imain.h, ierrors.h, iapi.h Quote:
Quote:
Quote:
There is still an issue with undefined PARAPORT_INFO. (Though I guess it isn't really needed.) And then there is this: EDIT: Code:
..\sounddep\sound.c(496) : error C2440: 'Funktion': 'int (__cdecl *)(const void *,void *,unsigned long,const PaStreamCallbackTimeInfo *,PaStreamCallbackFlags,void *)' kann nicht in 'PaStreamCallback (__stdcall *)' konvertiert werden ..\sounddep\sound.c(496) : warning C4024: 'Pa_OpenStream': Unterschiedliche Typen für formalen und übergebenen Parameter 7 EDIT2: Just set "static int /*_cdecl*/ portAudioCallback" in line 399. Seems ok now. Last edited by gilgamesh; 17 October 2009 at 23:08. |
|||||
18 October 2009, 00:55 | #7 |
The Spanish Songstress
Join Date: Jul 2009
Location: Finland
Posts: 114
|
|
18 October 2009, 09:44 | #8 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,505
|
Random set of header files and libraries uploaded to the zone. Hope these helps.
Your problem is calling convention mismatch, I changed it from _cdecl to _stdcall (_cdecl = standard C-style, parameters always in stack, _stdcall = use registers first and then stack) few releases ago and some external dlls headers do not specify calling convention = defaults to _stdcall now = problems. (linker errors or crashes when calling the function) (for example portaudio.h) I would have remembered this issue instantly if you'd have included better errors in first post btw, winsdk comes with utility that changes between SDK versions, easier than changing paths (but GUI version may not work with 2008sp1.. command line version will..) |
18 October 2009, 10:33 | #9 |
Linux snob
Join Date: Sep 2008
Location: Monkey Island
Posts: 997
|
Thank you. That will help a lot.
Right now I am stuck with an 'express edition' specific problem. Express has no MFC support. Therefore you need something like Code:
#include "resource.h" #include "winuser.h" // #include "afxres.h" #ifndef IDC_STATIC #define IDC_STATIC (-1) #endif /* ... */ //LANGUAGE LANG_ENGLISH, SUBLANG_NEUTRAL LANGUAGE 0x409, 0x000 Code:
..\resources\winuae.rc(99) : error RC2104 : undefined keyword or key name: ID_DBG_PAGE1 |
18 October 2009, 11:34 | #10 |
Citizen of Elthesh
Join Date: Sep 2003
Location: UK
Posts: 949
|
Hmm, I thought it was also possible to get MFC/ATL from the older platform SDKs (e.g. Windows Server 2003). That said, I don't know if those are still available.
|
18 October 2009, 16:00 | #11 |
Registered User
Join Date: Mar 2006
Location: Germany
Posts: 899
|
WDK has MFC headers in path inc/mfc42/.
|
18 October 2009, 23:49 | #12 |
Linux snob
Join Date: Sep 2008
Location: Monkey Island
Posts: 997
|
Yes, thanks for the hint!
Then I had to rename ./od-win32/resources/resource to ./od-win32/resources/resource.h and reset the output dir for the linker. (Don't know if that is normal. Express is designed not to help you with resource files in any way.) Everything compiles at last. And now to linking... |
19 October 2009, 21:55 | #13 |
Linux snob
Join Date: Sep 2008
Location: Monkey Island
Posts: 997
|
The hq*.asm files in od-win32 don't get assembled and therefore the linker complains about not finding hq4x16.obj. So I added these hq*.asm to target winuae:common with build rule MASM, but MASM tells me
Code:
Assembling... Assembling: ..\hq4x16.asm ..\hq4x16.asm(21) : error A2008:syntax error : GLOBAL ..\hq4x16.asm(23) : error A2008:syntax error : in directive ..\hq4x16.asm(24) : error A2008:syntax error : in directive ..\hq4x16.asm(26) : error A2008:syntax error : SECTION ..\hq4x16.asm(27) : error A2008:syntax error : linesleft ..\hq4x16.asm(28) : error A2008:syntax error : xcounter ..\hq4x16.asm(29) : error A2008:syntax error : cross ..\hq4x16.asm(30) : error A2008:syntax error : nextline ..\hq4x16.asm(31) : error A2008:syntax error : prevline ..\hq4x16.asm(32) : error A2008:syntax error : w1 ..\hq4x16.asm(33) : error A2008:syntax error : w2 ..\hq4x16.asm(34) : error A2008:syntax error : w3 ..\hq4x16.asm(35) : error A2008:syntax error : w4 ..\hq4x16.asm(36) : error A2008:syntax error : w5 ..\hq4x16.asm(37) : error A2008:syntax error : w6 ..\hq4x16.asm(38) : error A2008:syntax error : w7 ..\hq4x16.asm(39) : error A2008:syntax error : w8 ..\hq4x16.asm(40) : error A2008:syntax error : w9 ..\hq4x16.asm(42) : error A2008:syntax error : SECTION ..\hq4x16.asm(44) : error A2034:must be in segment block ..\hq4x16.asm(45) : error A2034:must be in segment block ..\hq4x16.asm(46) : error A2034:must be in segment block ..\hq4x16.asm(47) : error A2034:must be in segment block ..\hq4x16.asm(48) : error A2034:must be in segment block ..\hq4x16.asm(49) : error A2034:must be in segment block ..\hq4x16.asm(50) : error A2034:must be in segment block ..\hq4x16.asm(52) : error A2008:syntax error : SECTION ..\hq4x16.asm(54) : error A2008:syntax error : macro ..\hq4x16.asm(55) : error A2085:instruction or register not accepted in current CPU mode ..\hq4x16.asm(56) : error A2085:instruction or register not accepted in current CPU mode ..\hq4x16.asm(57) : error A2085:instruction or register not accepted in current CPU mode ..\hq4x16.asm(58) : error A2008:syntax error : endmacro ..\hq4x16.asm(60) : error A2008:syntax error : macro ..\hq4x16.asm(61) : error A2085:instruction or register not accepted in current CPU mode ..\hq4x16.asm(62) : error A2085:instruction or register not accepted in current CPU mode ..\hq4x16.asm(63) : error A2034:must be in segment block ..\hq4x16.asm(64) : error A2085:instruction or register not accepted in current CPU mode ..\hq4x16.asm(65) : error A2085:instruction or register not accepted in current CPU mode ..\hq4x16.asm(66) : error A2085:instruction or register not accepted in current CPU mode ..\hq4x16.asm(67) : error A2085:instruction or register not accepted in current CPU mode ..\hq4x16.asm(68) : error A2085:instruction or register not accepted in current CPU mode ..\hq4x16.asm(69) : error A2085:instruction or register not accepted in current CPU mode ..\hq4x16.asm(70) : error A2085:instruction or register not accepted in current CPU mode ..\hq4x16.asm(71) : error A2085:instruction or register not accepted in current CPU mode ..\hq4x16.asm(72) : error A2085:instruction or register not accepted in current CPU mode ..\hq4x16.asm(73) : error A2085:instruction or register not accepted in current CPU mode ..\hq4x16.asm(74) : error A2085:instruction or register not accepted in current CPU mode ..\hq4x16.asm(75) : error A2085:instruction or register not accepted in current CPU mode ..\hq4x16.asm(76) : error A2085:instruction or register not accepted in current CPU mode ..\hq4x16.asm(77) : error A2085:instruction or register not accepted in current CPU mode ..\hq4x16.asm(78) : error A2034:must be in segment block ..\hq4x16.asm(79) : error A2008:syntax error : endmacro ..\hq4x16.asm(81) : error A2008:syntax error : macro ..\hq4x16.asm(82) : error A2008:syntax error : TestDiff ..\hq4x16.asm(83) : error A2085:instruction or register not accepted in current CPU mode ..\hq4x16.asm(84) : error A2034:must be in segment block ..\hq4x16.asm(85) : error A2008:syntax error : integer ..\hq4x16.asm(86) : error A2034:must be in segment block ..\hq4x16.asm(87) : error A2034:must be in segment block ..\hq4x16.asm(88) : error A2008:syntax error : integer ..\hq4x16.asm(89) : error A2008:syntax error : fin ..\hq4x16.asm(90) : error A2008:syntax error : endmacro ..\hq4x16.asm(92) : error A2008:syntax error : macro ..\hq4x16.asm(93) : error A2008:syntax error : TestDiff ..\hq4x16.asm(94) : error A2085:instruction or register not accepted in current CPU mode ..\hq4x16.asm(95) : error A2034:must be in segment block ..\hq4x16.asm(96) : error A2008:syntax error : integer ..\hq4x16.asm(97) : error A2008:syntax error : integer ..\hq4x16.asm(98) : error A2008:syntax error : integer ..\hq4x16.asm(99) : error A2034:must be in segment block ..\hq4x16.asm(100) : error A2034:must be in segment block ..\hq4x16.asm(101) : error A2008:syntax error : integer ..\hq4x16.asm(102) : error A2008:syntax error : integer ..\hq4x16.asm(103) : error A2008:syntax error : integer ..\hq4x16.asm(104) : error A2008:syntax error : fin ..\hq4x16.asm(105) : error A2008:syntax error : endmacro ..\hq4x16.asm(107) : error A2008:syntax error : macro ..\hq4x16.asm(108) : error A2008:syntax error : TestDiff ..\hq4x16.asm(109) : error A2085:instruction or register not accepted in current CPU mode ..\hq4x16.asm(110) : error A2034:must be in segment block ..\hq4x16.asm(111) : error A2008:syntax error : integer ..\hq4x16.asm(112) : error A2008:syntax error : integer ..\hq4x16.asm(113) : error A2008:syntax error : integer ..\hq4x16.asm(114) : error A2008:syntax error : integer ..\hq4x16.asm(115) : error A2034:must be in segment block ..\hq4x16.asm(116) : error A2034:must be in segment block ..\hq4x16.asm(117) : error A2008:syntax error : integer ..\hq4x16.asm(118) : error A2008:syntax error : integer ..\hq4x16.asm(119) : error A2008:syntax error : integer ..\hq4x16.asm(120) : error A2008:syntax error : integer ..\hq4x16.asm(121) : error A2008:syntax error : fin ..\hq4x16.asm(122) : error A2008:syntax error : endmacro ..\hq4x16.asm(124) : error A2008:syntax error : macro ..\hq4x16.asm(125) : error A2008:syntax error : TestDiff ..\hq4x16.asm(126) : error A2085:instruction or register not accepted in current CPU mode ..\hq4x16.asm(127) : error A2034:must be in segment block ..\hq4x16.asm(128) : error A2008:syntax error : integer ..\hq4x16.asm(129) : error A2008:syntax error : integer ..\hq4x16.asm(130) : error A2008:syntax error : integer ..\hq4x16.asm(131) : error A2008:syntax error : integer ..\hq4x16.asm(132) : fatal error A1012:error count exceeds 100; stopping assembly |
19 October 2009, 22:03 | #14 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,505
|
|
20 October 2009, 04:11 | #15 |
Zone Friend
|
Heh Toni, I had no idea we still have such a great share of assembly code in WinUAE source. Really not. Thought most of it has been rewritten now...
|
20 October 2009, 08:00 | #16 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,505
|
Perhaps you should read above posts again, that assembly code isn't mine and basically has to be in assembly because hq2x filters are probably the slowest available.
|
20 October 2009, 08:15 | #17 |
Zone Friend
|
Oops ... missed this bit ... mea culpa
Once you're finished wearing your brown paper bag because of the network path bug, could you hand it over to me afterwards? |
21 October 2009, 21:46 | #18 |
Linux snob
Join Date: Sep 2008
Location: Monkey Island
Posts: 997
|
Here is what I found in the meantime:
Some library dependencies have changed their names: dxerr9->DxErr, zlibstat->zlib, portaudio_x86->pablio The command line for the assemblies is (probably) Code:
nasm -f coff -w-all -o hq2x16.obj hq2x16.asm ... Last edited by gilgamesh; 21 October 2009 at 22:42. Reason: pablio faulty |
21 October 2009, 21:57 | #19 | |||
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,505
|
Quote:
zlibstat: = this is static library, this does not come with win32 binary release. (at least didn't when I built it myself) portaudio: pablio? what? (you also need to use svn version of portaudio) Quote:
Quote:
|
|||
21 October 2009, 22:42 | #20 | ||
Linux snob
Join Date: Sep 2008
Location: Monkey Island
Posts: 997
|
Quote:
Quote:
Do you use Visual Studio 2005 then? 2005 strcmpi deprecated: http://msdn.microsoft.com/en-us/library/ms235392(VS.80).aspx 2008 strcmpi gone: http://msdn.microsoft.com/en-us/library/f0151s4x.aspx Yet the compiler didn't complain, only the linker. Maybe Microsoft simply forgot to update string.h? This ogre dev agrees. EDIT: shlwapi stuff was nonsense. |
||
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
DIY Compiling WinUAE 2.0.x | gilgamesh | support.WinUAE | 19 | 10 July 2010 19:00 |
Compiling WinUAE 2.1.0 | rotacak | support.WinUAE | 8 | 06 May 2010 17:09 |
Idiots guide to compiling WinUAE? | Ian | New to Emulation or Amiga scene | 1 | 28 September 2009 14:30 |
Compiling WinUAE with VS 2005 Express ? | girv | support.WinUAE | 23 | 04 December 2006 21:26 |
Compiling WinUAE 1.3.2 | rotacak | support.WinUAE | 1 | 06 October 2006 20:34 |
|
|