Page 1 of 1

Linking Error with sound patch

Posted: 27.03.2017, 22:41
by HB
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)

Posted: 28.03.2017, 01:20
by Janus
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.

Posted: 28.03.2017, 09:11
by Alexell
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.