Another windows compilation problem :P

Strictly for discussing ZSNES development and for submitting code. You can also join us on IRC at irc.libera.chat in #zsnes.
Please, no requests here.

Moderator: ZSNES Mods

Locked
Runik
New Member
Posts: 4
Joined: Tue Jan 18, 2005 10:36 am

Another windows compilation problem :P

Post by Runik »

Hi !

A friend of mine wants to translate Zsnes using the source code, and he asked me if I could compile it for him.
I got all the setup done using the readme file, (the zlib and png libraries, nasm, DirectX 9.0 SDK, etc ...)
I'm using Visual Studio 2003 to build the executable.
Compiling is fine for all the assembly files, but I have 60 linking errors after that ... I have no clue of what is wrong :(
I'm sure it's something obvious, but I can't put my finger on it ...

I'll post the detailed linking errors later, as I don't have them handy.

Thanks in advance for your help :)

EDIT: here's the log file.
I'm sorry about the french messages, my VS is in french :P

Code: Select all

Édition des liens en cours...
initc.obj : error LNK2019: symbole externe non résolu _load_jma_file référencé dans la fonction _SplitSetup
winlink.obj : error LNK2019: symbole externe non résolu _IID_IDirectSoundBuffer8 référencé dans la fonction "int __cdecl InitSound(void)" (?InitSound@@YAHXZ)
winlink.obj : error LNK2019: symbole externe non résolu _GUID_SysMouse référencé dans la fonction "bool __cdecl InitInput(void)" (?InitInput@@YA_NXZ)
winlink.obj : error LNK2019: symbole externe non résolu _GUID_SysKeyboard référencé dans la fonction "bool __cdecl InitInput(void)" (?InitInput@@YA_NXZ)
winlink.obj : error LNK2019: symbole externe non résolu _IID_IDirectInput8A référencé dans la fonction "bool __cdecl InitInput(void)" (?InitInput@@YA_NXZ)
winlink.obj : error LNK2019: symbole externe non résolu _hq2x_16b référencé dans la fonction _drawscreenwin
winlink.obj : error LNK2019: symbole externe non résolu _hq4x_16b référencé dans la fonction _drawscreenwin
winlink.obj : error LNK2019: symbole externe non résolu _hq2x_32b référencé dans la fonction _drawscreenwin
winlink.obj : error LNK2019: symbole externe non résolu _hq4x_32b référencé dans la fonction _drawscreenwin
hq3x16.obj : error LNK2001: symbole externe non résolu _prevline
hq3x32.obj : error LNK2001: symbole externe non résolu _prevline
hq3x16.obj : error LNK2001: symbole externe non résolu _nextline
hq3x32.obj : error LNK2001: symbole externe non résolu _nextline
hq3x16.obj : error LNK2001: symbole externe non résolu _deltaptr
hq3x32.obj : error LNK2001: symbole externe non résolu _deltaptr
hq3x16.obj : error LNK2001: symbole externe non résolu _xcounter
hq3x32.obj : error LNK2001: symbole externe non résolu _xcounter
hq3x16.obj : error LNK2001: symbole externe non résolu _w1
hq3x32.obj : error LNK2001: symbole externe non résolu _w1
hq3x16.obj : error LNK2001: symbole externe non résolu _w2
hq3x32.obj : error LNK2001: symbole externe non résolu _w2
hq3x16.obj : error LNK2001: symbole externe non résolu _w3
hq3x32.obj : error LNK2001: symbole externe non résolu _w3
hq3x16.obj : error LNK2001: symbole externe non résolu _w4
hq3x32.obj : error LNK2001: symbole externe non résolu _w4
hq3x16.obj : error LNK2001: symbole externe non résolu _w5
hq3x32.obj : error LNK2001: symbole externe non résolu _w5
hq3x16.obj : error LNK2001: symbole externe non résolu _w6
hq3x32.obj : error LNK2001: symbole externe non résolu _w6
hq3x16.obj : error LNK2001: symbole externe non résolu _w7
hq3x32.obj : error LNK2001: symbole externe non résolu _w7
hq3x16.obj : error LNK2001: symbole externe non résolu _w8
hq3x32.obj : error LNK2001: symbole externe non résolu _w8
hq3x16.obj : error LNK2001: symbole externe non résolu _w9
hq3x32.obj : error LNK2001: symbole externe non résolu _w9
hq3x16.obj : error LNK2001: symbole externe non résolu _reg_blank
hq3x32.obj : error LNK2001: symbole externe non résolu _reg_blank
hq3x16.obj : error LNK2001: symbole externe non résolu _const7
hq3x32.obj : error LNK2001: symbole externe non résolu _const7
hq3x16.obj : error LNK2001: symbole externe non résolu _cross
hq3x32.obj : error LNK2001: symbole externe non résolu _cross
hq3x16.obj : error LNK2001: symbole externe non résolu _threshold
hq3x32.obj : error LNK2001: symbole externe non résolu _threshold
hq3x32.obj : error LNK2001: symbole externe non résolu _c1
hq3x32.obj : error LNK2001: symbole externe non résolu _c2
hq3x32.obj : error LNK2001: symbole externe non résolu _c3
hq3x32.obj : error LNK2001: symbole externe non résolu _c4
hq3x32.obj : error LNK2001: symbole externe non résolu _c5
hq3x32.obj : error LNK2001: symbole externe non résolu _c6
hq3x32.obj : error LNK2001: symbole externe non résolu _c7
hq3x32.obj : error LNK2001: symbole externe non résolu _c8
hq3x32.obj : error LNK2001: symbole externe non résolu _c9
init.obj : error LNK2001: symbole externe non résolu _SetaCmdEnable
init.obj : error LNK2001: symbole externe non résolu _setaaccessbankr8
init.obj : error LNK2001: symbole externe non résolu _setaaccessbankw8
init.obj : error LNK2001: symbole externe non résolu _setaaccessbankr8a
init.obj : error LNK2001: symbole externe non résolu _setaaccessbankw8a
init.obj : error LNK2001: symbole externe non résolu _setaaccessbankr16
init.obj : error LNK2001: symbole externe non résolu _setaaccessbankw16
init.obj : error LNK2001: symbole externe non résolu _setaaccessbankr16a
init.obj : error LNK2001: symbole externe non résolu _setaaccessbankw16a
init.obj : error LNK2001: symbole externe non résolu _DSP2Read8b
init.obj : error LNK2001: symbole externe non résolu _DSP2Read16b
init.obj : error LNK2001: symbole externe non résolu _DSP2Write8b
init.obj : error LNK2001: symbole externe non résolu _DSP2Write16b
init.obj : error LNK2001: symbole externe non résolu _InitDSP2
memory.obj : error LNK2001: symbole externe non résolu _SDD1_init
memory.obj : error LNK2001: symbole externe non résolu _SDD1_get_byte
dinput8.lib(dilib3.obj) : error LNK2001: symbole externe non résolu _GUID_POV
dinput8.lib(dilib3.obj) : error LNK2001: symbole externe non résolu _GUID_Slider
dinput8.lib(dilib3.obj) : error LNK2001: symbole externe non résolu _GUID_RzAxis
dinput8.lib(dilib3.obj) : error LNK2001: symbole externe non résolu _GUID_RyAxis
dinput8.lib(dilib3.obj) : error LNK2001: symbole externe non résolu _GUID_RxAxis
dinput8.lib(dilib3.obj) : error LNK2001: symbole externe non résolu _GUID_ZAxis
dinput8.lib(dilib1.obj) : error LNK2001: symbole externe non résolu _GUID_ZAxis
dinput8.lib(dilib3.obj) : error LNK2001: symbole externe non résolu _GUID_YAxis
dinput8.lib(dilib1.obj) : error LNK2001: symbole externe non résolu _GUID_YAxis
dinput8.lib(dilib3.obj) : error LNK2001: symbole externe non résolu _GUID_XAxis
dinput8.lib(dilib1.obj) : error LNK2001: symbole externe non résolu _GUID_XAxis
dinput8.lib(dilib2.obj) : error LNK2001: symbole externe non résolu _GUID_Key
Release/zsnesw.exe : fatal error LNK1120: 60 externes non résolus
Beware the [url=http://saturnin.consollection.com]duck[/url]
Nightcrawler
Romhacking God
Posts: 922
Joined: Wed Jul 28, 2004 11:27 pm
Contact:

Post by Nightcrawler »

Get the latest 1.41 that was just released this week. There have been updated instructions on how to compile ZSNES. I don't think it will work with Visual Studio.
[url=http://transcorp.romhacking.net]TransCorp[/url] - Home of the Dual Orb 2, Cho Mahou Tairyku Wozz, and Emerald Dragon SFC/SNES translations.
[url=http://www.romhacking.net]ROMhacking.net[/url] - The central hub of the ROM hacking community.
Runik
New Member
Posts: 4
Joined: Tue Jan 18, 2005 10:36 am

Post by Runik »

Thank for pointing this version, I didn't realize it was out ...
Unfortunately, none of the mirrors seems to have the source archive to download :(
I guess it's related to the disk space problems on Sourceforge, I'll retry later ...
Beware the [url=http://saturnin.consollection.com]duck[/url]
ipher
ZSNES Developer
ZSNES Developer
Posts: 269
Joined: Wed Jul 28, 2004 2:37 am
Contact:

Post by ipher »

First of all, of course it'll work with Visual Studio.

And if SF is still not working right, you can always grab the source form http://www.ipherswipsite.com/zsnes

If you still have problems, repost here and ill try to help you, compiling ZSNES with MSVC 2003 can be pretty irritating at times.
[url=http://www.ipherswipsite.com]ipher's WIP Site[/url]
Nightcrawler
Romhacking God
Posts: 922
Joined: Wed Jul 28, 2004 11:27 pm
Contact:

Post by Nightcrawler »

Both the .NET versions AND 6.0?
[url=http://transcorp.romhacking.net]TransCorp[/url] - Home of the Dual Orb 2, Cho Mahou Tairyku Wozz, and Emerald Dragon SFC/SNES translations.
[url=http://www.romhacking.net]ROMhacking.net[/url] - The central hub of the ROM hacking community.
ipher
ZSNES Developer
ZSNES Developer
Posts: 269
Joined: Wed Jul 28, 2004 2:37 am
Contact:

Post by ipher »

Nightcrawler wrote:Both the .NET versions AND 6.0?
I can't say for sure, but Runik is using MSVC.NET 2003, so it should work for him.
[url=http://www.ipherswipsite.com]ipher's WIP Site[/url]
Runik
New Member
Posts: 4
Joined: Tue Jan 18, 2005 10:36 am

Post by Runik »

ipher wrote:First of all, of course it'll work with Visual Studio.

And if SF is still not working right, you can always grab the source form http://www.ipherswipsite.com/zsnes

If you still have problems, repost here and ill try to help you, compiling ZSNES with MSVC 2003 can be pretty irritating at times.
Thanks for the link ipher :)
I grabbed the 1.42 source from there, I installed it in my workspace, and I'm getting almost the same linking errors than above (I can repost it but I'm not sure it's necessary :P)
Here is what I've done so far :
1 - I opened 'zsnes.dsp' with VS2003. It wants to convert it to his format, I let it do so.
2 - I removed every extra quotes from the assembly files compiling options (added during the conversion I guess)
3 - I removed 'cfgload.asm' from the project, and replaced it by 'cfgload.c'
4 - I put 'smoke.c' back into the compiling batch (is there a reason for it to be left out ?)

And that's it.

All the DirectX stuff is strange ... for example here :

Code: Select all

winlink.obj : error LNK2019: external symbol unresolved _IID_IDirectSoundBuffer8 referenced in function "int __cdecl InitSound(void)" (?InitSound@@YAHXZ) 
IID_IDirectSoundBuffer8 is defined as a 'static const GUID' in dsound.h, I can find its definition using the IDE, but the linking doesn't seem to see it :(
Beware the [url=http://saturnin.consollection.com]duck[/url]
ipher
ZSNES Developer
ZSNES Developer
Posts: 269
Joined: Wed Jul 28, 2004 2:37 am
Contact:

Post by ipher »

No wonder, don't use the dsp file, it is horribly outdated (and i thought was removed from 1.42). Look over install.txt on what you need to do.
[url=http://www.ipherswipsite.com]ipher's WIP Site[/url]
Runik
New Member
Posts: 4
Joined: Tue Jan 18, 2005 10:36 am

Post by Runik »

Thanks to the install.txt file, and to jdratlif notes, I was able to compile my own windows version :D
My friend is going to be really happy ;)

Thanks to everyone !
Beware the [url=http://saturnin.consollection.com]duck[/url]
grinvader
ZSNES Shake Shake Prinny
Posts: 5632
Joined: Wed Jul 28, 2004 4:15 pm
Location: PAL50, dood !

Post by grinvader »

ipher wrote:No wonder, don't use the dsp file, it is horribly outdated (and i thought was removed from 1.42). Look over install.txt on what you need to do.
Looks like it's still there. You removed the other one:

Code: Select all

2005-01-15 01:31  ipher

	* src/zsnes.dsw: old, outdated, and nobody here can update it.
皆黙って俺について来い!!

Code: Select all

<jmr> bsnes has the most accurate wiki page but it takes forever to load (or something)
Pantheon: Gideon Zhi | CaitSith2 | Nach | kode54
zhzhl555
New Member
Posts: 4
Joined: Wed Apr 11, 2007 1:24 pm
Location: CHINA

Post by zhzhl555 »

Runik wrote:Thanks to the install.txt file, and to jdratlif notes, I was able to compile my own windows version :D
My friend is going to be really happy ;)

Thanks to everyone !
i got the same link error as you, how did you fixed it ? i am compile it with vc 6.0 . hoping for any reply... :)
Jipcy
Veteran
Posts: 768
Joined: Thu Feb 03, 2005 8:18 pm
Contact:

Post by Jipcy »

Good use of the Search feature, but I kind of doubt that Runik checks this board anymore. That's the last post he's made in over two years.
[url=http://zsnes-docs.sf.net]Official ZSNES Docs[/url] | [url=http://zsnes-docs.sf.net/nsrt]NSRT Guide[/url] | [url=http://endoftransmission.net/phpBB3/viewtopic.php?t=394]Using a Wiimote w/ emulators[/url]
SquareHead
Veteran
Posts: 970
Joined: Fri Jan 21, 2005 11:15 am
Location: Montana, United States

Post by SquareHead »

Sounds like they need to be introduced to zget.
zhzhl555
New Member
Posts: 4
Joined: Wed Apr 11, 2007 1:24 pm
Location: CHINA

Post by zhzhl555 »

Jipcy wrote:Good use of the Search feature, but I kind of doubt that Runik checks this board anymore. That's the last post he's made in over two years.
yeah, two years......
haha ,all the things i can do is bless any other guys meet this problem and fixed it. :)
maybe i should resolve it by myself .
Nach
ZSNES Developer
ZSNES Developer
Posts: 3904
Joined: Tue Jul 27, 2004 10:54 pm
Location: Solar powered park bench
Contact:

Post by Nach »

We no longer support VC6.

For Windows, you now need VC 2003+ or GCC 3.4+ to compile IIRC.
May 9 2007 - NSRT 3.4, now with lots of hashing and even more accurate information! Go download it.
_____________
Insane Coding
zhzhl555
New Member
Posts: 4
Joined: Wed Apr 11, 2007 1:24 pm
Location: CHINA

Post by zhzhl555 »

Nach wrote:We no longer support VC6.

For Windows, you now need VC 2003+ or GCC 3.4+ to compile IIRC.
sorry, forgive me。
i dont know what is IIRC?
franpa
Gecko snack
Posts: 2374
Joined: Sun Aug 21, 2005 11:06 am
Location: Australia, QLD
Contact:

Post by franpa »

IIRC = if i remember correctly.
Core i7 920 @ 2.66GHZ | ASUS P6T Motherboard | 8GB DDR3 1600 RAM | Gigabyte Geforce 760 4GB | Windows 10 Pro x64
zhzhl555
New Member
Posts: 4
Joined: Wed Apr 11, 2007 1:24 pm
Location: CHINA

Post by zhzhl555 »

thanks to everybody!
i will try again with Direct 9.0 & vs 2003.
Noxious Ninja
Dark Wind
Posts: 1271
Joined: Thu Jul 29, 2004 8:58 pm
Location: Texas
Contact:

Post by Noxious Ninja »

Use zget. It makes it really easy.

http://board.zsnes.com/phpBB2/viewtopic.php?t=8121
[u][url=http://bash.org/?577451]#577451[/url][/u]
bongle

Post by bongle »

Runik wrote:
ipher wrote:

Code: Select all

winlink.obj : error LNK2019: external symbol unresolved _IID_IDirectSoundBuffer8 referenced in function "int __cdecl InitSound(void)" (?InitSound@@YAHXZ) 
IID_IDirectSoundBuffer8 is defined as a 'static const GUID' in dsound.h, I can find its definition using the IDE, but the linking doesn't seem to see it :(
Since this is the highest 'active' thread on google when searching for this linker error, I'll add my solution.

In the CPP file where you #include "dsound.h", you need to #include "initguid.h" first.
franpa
Gecko snack
Posts: 2374
Joined: Sun Aug 21, 2005 11:06 am
Location: Australia, QLD
Contact:

Post by franpa »

Noxious Ninja wrote:Use zget. It makes it really easy.

http://board.zsnes.com/phpBB2/viewtopic.php?t=8121
I think you guys are forgetting the site it is hosted on is dead...
Core i7 920 @ 2.66GHZ | ASUS P6T Motherboard | 8GB DDR3 1600 RAM | Gigabyte Geforce 760 4GB | Windows 10 Pro x64
snkcube
Hero of Time
Posts: 2646
Joined: Fri Jul 30, 2004 2:49 am
Location: In front of the monitor
Contact:

Post by snkcube »

Did you check his post date? It's over two years ago.
Try out CCleaner and other free software at Piriform
Image
badinsults
"Your thread will be crushed."
Posts: 1236
Joined: Wed Jul 28, 2004 1:49 am
Location: Not in Winnipeg
Contact:

Post by badinsults »

Old thread is old. Stop bumping these!
<pagefault> i'd break up with my wife if she said FF8 was awesome
Locked