Unable to build a working PCem executable on Windows 8.1

Support and general discussion.
Post Reply
Alegend45
Posts: 85
Joined: Sat 26 Apr, 2014 4:33 am

Unable to build a working PCem executable on Windows 8.1

Post by Alegend45 »

I have a standard MinGW installation, with the recommended OpenAL devpak installed manually.

However, once PCem is compiled, whenever I try to run it, it gives me this error: "The procedure entry point GUID_SysMouse could not be located in the dynamic link library PCem.exe"

First, why the fuck does Windows think GUID_SysMouse is a function?
Secondly, why the fuck does Windows think PCem.exe is a DLL?
roytam1
Posts: 14
Joined: Mon 27 Oct, 2014 2:27 am

Re: Unable to build a working PCem executable on Windows 8.1

Post by roytam1 »

I don't know yours but my hg-head dynrec build works.
Image

https://mega.co.nz/#!mM8DUJSC!Yc8RDXpBc ... a2-Spz1sIY
Last edited by roytam1 on Tue 18 Nov, 2014 3:03 am, edited 1 time in total.
truth

Re: Unable to build a working PCem executable on Windows 8.1

Post by truth »

BUILD GUIDE:
Download latest pcem: http://www.retrosoftware.co.uk/hg/pcem
Install mingw32/gcc4.6.2 along with dx8.0 headers/libs for mingw (copy dx8 headers to /usr/include/directx/ and libs to /usr/lib/)
openal: openal-soft-1.15.1 built by cmake-gui and mingw32-make install (optionally "add SSE" to CFLAG during cmake configuration)
freealut: also built by cmake-gui and mingw32-make install
copy openal and freealut headers to /usr/include/ and libraries to /mingw/lib/

add line to pcem makefile.mingw:
CFLAGS+=-I/usr/include -I/usr/include/directx

change directory to /PCem/src/ and build binary:
make -f Makefile.mingw

The following files necessary to run PCem (two DLL files generated by above cmake procedure):
openal32.dll, libalut.dll, pcem.exe, and two binary files from mingw, libgcc_s_dw2-1.dll and libstdc++-6.dll.
therock247uk
Posts: 29
Joined: Fri 25 Apr, 2014 2:55 pm

Re: Unable to build a working PCem executable on Windows 8.1

Post by therock247uk »

any reason ppl are still using gcc4.6.2? mingw comes with gcc version 4.8.1 (GCC) by default so not sure where people are getting 4.6.2 from.
Alegend45
Posts: 85
Joined: Sat 26 Apr, 2014 4:33 am

Re: Unable to build a working PCem executable on Windows 8.1

Post by Alegend45 »

truth, I know HOW to build it. I can do it on Linux, AND on a certain Windows XP system! This system just doesn't want to fucking run this shit.
truth

Re: Unable to build a working PCem executable on Windows 8.1

Post by truth »

That error is related to directinput. The function exists in win-mouse.cc, and it's related to directx (dinput).

Alternatively, post the exact steps in building pcem, including versions of all libraries.
Last edited by truth on Tue 18 Nov, 2014 4:55 am, edited 1 time in total.
Alegend45
Posts: 85
Joined: Sat 26 Apr, 2014 4:33 am

Re: Unable to build a working PCem executable on Windows 8.1

Post by Alegend45 »

First off, I have the DirectX headers and libraries from the MinGW installer.

Anyway...

OpenAL - version Tom recommended,
ALUT - Same thing.

And all I did was make -f Makefile.mingw -j4
truth

Re: Unable to build a working PCem executable on Windows 8.1

Post by truth »

Verify if the directx version is unavailable in your mingw system. If not, is it directx8? Also, was the XP build copied to the 8.1 system, or did it compile successfully on 8.1? If it doesn't build on 8.1, is there an error?

Directinput errors have been addressed by the following hints:
linking to dinput8 library and definition lines in the source code
#define INITGUID
#define DIRECTINPUT_VERSION 0x0800
Last edited by truth on Tue 18 Nov, 2014 4:37 am, edited 1 time in total.
Alegend45
Posts: 85
Joined: Sat 26 Apr, 2014 4:33 am

Re: Unable to build a working PCem executable on Windows 8.1

Post by Alegend45 »

It compiled successfully on 8.1, and I'm using DirectX 9, not 8.
truth

Re: Unable to build a working PCem executable on Windows 8.1

Post by truth »

Is your 8.1 system a desktop or a tablet? Did you test with the pcem binary which roytam1 posted above? If so, did it work? If not, could you post your pcem binary so others can replicate the error on a 8.1 desktop?
Alegend45
Posts: 85
Joined: Sat 26 Apr, 2014 4:33 am

Re: Unable to build a working PCem executable on Windows 8.1

Post by Alegend45 »

Mine's a desktop. roytam1's binary did work though. Here's mine.

https://mega.co.nz/#!Ihd1DQxR!h3PCpOoE5 ... -PSbsu3au0
truth

Re: Unable to build a working PCem executable on Windows 8.1

Post by truth »

That pcem binary fails on XP with similar error, but in the library "OpenAL32.dll". I also verified that your GUID_sysmouse functions are embedded differently from my working pcem binary (see image below). Your pcem binary is different from the build by roytam1 and myself; your pcem is incorrectly importing functions, including GUID_sysmouse, from a (openal32.dll, in my case) module.

If you follow my above instructions, then I can ensure that you build the same working pcem binary as I have. The DX8 headers/libs for mingw: http://alleg.sourceforge.net/wip.html. Perhaps start with a new mingw installation so the incorrect headers and libraries are not seen by the compiler/linker. Also, build openal32 so the error in the image is not present (red solid boxes).
Attachments
Dependency walker shows error in your pcem binary
Dependency walker shows error in your pcem binary
Error.PNG (65.92 KiB) Viewed 20734 times
Alegend45
Posts: 85
Joined: Sat 26 Apr, 2014 4:33 am

Re: Unable to build a working PCem executable on Windows 8.1

Post by Alegend45 »

Okay, this problem is back again. I get everything fine except the linking. Now it keeping saying

undefined reference to `__imp_alutExit'
undefined reference to `__imp_alutInit'

Even though I'm linking both OpenAL and ALut! SO WHAT GIVES?!
User avatar
SarahWalker
Site Admin
Posts: 2054
Joined: Thu 24 Apr, 2014 4:18 pm

Re: Unable to build a working PCem executable on Windows 8.1

Post by SarahWalker »

Which order are you linking ALut and OpenAL in? On GCC ALut has to be before OpenAL on the command line.
Alegend45
Posts: 85
Joined: Sat 26 Apr, 2014 4:33 am

Re: Unable to build a working PCem executable on Windows 8.1

Post by Alegend45 »

TomWalker wrote:Which order are you linking ALut and OpenAL in? On GCC ALut has to be before OpenAL on the command line.
I've tried the standard ALut before AL, I've tried AL before ALut, I'VE TRIED STATICALLY COMPILING IN THE FREEALUT LIBRARY and it hasn't done jack shit. Same errors every time. I'm using the latest TDM-GCC-64.
User avatar
SarahWalker
Site Admin
Posts: 2054
Joined: Thu 24 Apr, 2014 4:18 pm

Re: Unable to build a working PCem executable on Windows 8.1

Post by SarahWalker »

64-bit GCC? You're on your own. Not sure I ever got that working right.
Alegend45
Posts: 85
Joined: Sat 26 Apr, 2014 4:33 am

Re: Unable to build a working PCem executable on Windows 8.1

Post by Alegend45 »

After resorting to commenting out the USE_OPENAL define in soundopenal.c, it compiles and runs perfectly, albeit, without sound. You should probably use something other than OpenAL, as it's quite outdated and old. Also, I've gotten 64-bit GCC working before. Besides, this is necessary as I have a fully 64-bit system.
User avatar
SarahWalker
Site Admin
Posts: 2054
Joined: Thu 24 Apr, 2014 4:18 pm

Re: Unable to build a working PCem executable on Windows 8.1

Post by SarahWalker »

Umm, pretty sure you can use 32-bit compiler and applications on 64-bit Windows...

Besides, if you're running only 64-bit stuff then you can't use the recompiler, as that's currently 32-bit only.
Alegend45
Posts: 85
Joined: Sat 26 Apr, 2014 4:33 am

Re: Unable to build a working PCem executable on Windows 8.1

Post by Alegend45 »

Eh, true.

EDIT: Actually, after compiling PCem as a 64-bit dynarec executable, the recompiler works just fine. I'm working on adding stack ops.
Post Reply