Linking Error with sound patch

Report bugs, bug fixes and workarounds here.
Topic author
Posts: 132
Joined: 26.11.2002
With us: 17 years 11 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, 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)

Posts: 523
Joined: 13.08.2016
With us: 4 years 2 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);


//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.


Alexell M
Site Admin
Posts: 302
Joined: 07.10.2010
Age: 26
With us: 10 years
Location: Moscow, Russia

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
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.

Return to “Bugs”

Who is online