Linking Error with sound patch

Report bugs, bug fixes and workarounds here.
Avatar
Topic author
HB M
Posts: 132
Joined: 26.11.2002
With us: 16 years 7 months
Location: Eindhoven, The Netherlands

Linking Error with sound patch

Post #1by HB » 27.03.2017, 22:41

To fix a sorting problem with Celestia QT, I've dumped the latest release from the repository of the 20th of March 2017(SHA-1: 37ed932d37efe5c4d4d6650cf8ed37ad6a251122; (I've no idea what this number means, f.ck Github)). This is the release with Audio support.
Before start debugging of the Qt version I must be sure that this latest release is working properly in my environment, so I've tried to build Celestia in a normal manner with VC++ 2008 Express edition.
However building Celestia gives a Linking Error what is related to this audio support. All fmod directories of files(dll, h, hpp, cpp) and libraries are installed and properly linked in celestia.vcproj.

error LNK2019: unresolved external symbol "public: __thiscall CommandPlay::CommandPlay(int,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,float,float,int,int)" (??0CommandPlay@@QAE@HABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MMHH@Z) referenced in function "private: class Command * __thiscall CommandParser::parseCommand(void)" (?parseCommand@CommandParser@@AAEPAVCommand@@XZ)
HB

Janus
Posts: 390
Joined: 13.08.2016
With us: 2 years 11 months

Post #2by Janus » 28.03.2017, 01:20

Ran into that myself looking at the new code.

As a TEMPORARY!! workaround that disables sound but lets you compile you can do this.
Useless if you are wanting to test the sound functions though.

in /src/celengine/cmdparser @ line 798 (3/4 of the way through the file) while fixing date replace

cmd = new CommandPlay(channel, filename, volume, pan, loop, nopause);

with

//cmd = new CommandPlay(channel, filename, volume, pan, loop, nopause);
// 17-03-20 Removed until sound support finished to compile.
cmd = NULL;

The above follows an {else if(commandName == "play")} in commandparser::parsecommand() if you are having trouble locating the correct line.

The issue appears to be missing files of some sort.
Celestia has always included all the files it needs, so it may be as simple as the developer having a copy of the needed files on his system, but it not being present on other people's systems.
However, I have not looked into it in depth.
Someone with a clean vs2008 install and more experience in VS than I have can figure out why.
My attention has been on 64-bit compiles for windows, when I have been able to work on celestia that is.

Janus.

Avatar
Alexell M
Site Admin
Posts: 295
Joined: 07.10.2010
Age: 25
With us: 8 years 9 months
Location: Moscow, Russia
Contact:

Post #3by Alexell » 28.03.2017, 09:11

HB, Strangely, I have VS 2008, QT 4.8.0, QT Creator and everything is compiled normally.

Added after 1 minute 59 seconds:
Although I know for sure that there is a problem with the patch, sometimes Celestia crashes on startup. But the compilation is successful.

Added after 1 hour 6 minutes:
This is already very strange: now I have this same error appears. Before that, I was compiling normally, even the binaries with the audio patch are there. :sad:

Added after 8 hours 50 minutes:
Added lost classes CommandPlay & CommandPlay::process in command.cpp file. The problem is resolved.
Admin of celestia.space
PC: Intel Core i7-8700 @ 3.20GHz, SSD, 16 Gb RAM, NVIDIA GeForce GTX 1080, Creative Sound Blaster ZxR. Windows 10 x64.
Phone: iPhone 7 Plus 128 Gb. iOS 11.
Image


Return to “Bugs”

Who is online

Users browsing this forum: 4 guests