VOGONS


First post, by FeedingDragon

User metadata
Rank Oldbie
Rank
Oldbie

First the steps I took:
1: unpacked the source package.
2: Ran Cmake and pointed it to Projects\munt-2.4.0\mt32emu directory as the source & Projects\mt32emu as the destination.
3: cleared the "SHARE" selection box to make a static library and hit generate
4: Opened ALL_BUILD.vcxproj with VS2013, told it to also build the package, set to release win32 and hit build
5: Opened dosbox.vcproj and allowed VS to convert to vcxproj
6: Assigned all the include & library directories, and added dependencies (SDL, ZLib, etc...)
7: Selected release win32 and built dosbox - worked just fine.
8: ran the dosbox-SVN-r4319-mt32-patch.diff file (and yes, that's the revision of DOSBox I'm using.)
9: Back to dosbox.vcxproj and added the package created include directory & lib directories
10: added mt32emu.lib to the input list
11: hit "clean solution"
12: Did a build

No errors until the very end, and then....

midi.obj : error LNK2001: unresolved external symbol "public: static class MidiHandler_mt32 & __cdecl MidiHandler_mt32::GetInstance(void)" (?GetInstance@MidiHandler_mt32@@SAAAV1@XZ)

I did a search (after double checking all the includes & so forth.) I'm at a loss on how to get past this 🙁 Usually it's cause by missing headers or a typo (once had one pop up because I fort a ; that the engine just didn't notice.) Any idea on how to fix this?

Thank you 😀

edit: 8 followed by a ) results in a shades smiley 😀 I like smilieys, so I just replaced the )'s with :'s

Feeding Dragon

Reply 1 of 3, by sergm

User metadata
Rank Oldbie
Rank
Oldbie

Yes, I perfectly understand the problem at hand. I'd like to note two things:

  1. The DOSBox patch is intended primarily for developers and maintainer of custom DOSBox builds (i.e. the target auditory should be able to track down problems like this with ease).
  2. As stated in the README, the patch supports builds with the GNU toolchain. Neither Microsoft Visual Studio nor Xcode are supported directly.
    This means, one needs to make changes to the DOSBox project file to get the mt32 MIDI handler included and built. The error you get is exactly about the file "midi_mt32.cpp" missing in the project.

Reply 2 of 3, by FeedingDragon

User metadata
Rank Oldbie
Rank
Oldbie

1. I am building a custom DOSBox.
2. Yes, I remembered (earlier today,) that I had forgotten to add the file to my project after patch created it. Been fighting with it ever since.

After adding the file, I now get a large number of LNK2038 errors (Mismatched values.) I had it working before, it was only after updating to 2.4.0 that I've run into problems. I've spent most of the day going backwards in revisions, trying to get back to where I was before. Without much luck. Running my old DOSBox.exe file, I was working with r4057 last time I successfully built it, so that's what I went back to. From there, I've pulled every version of munt that had SVN patches, and tried them all in turn. Every last one of them ends up with the same results. In every case, I double checked to make sure that I was linking to the appropriate version of mt32emu.lib and that each lib revision had it's own include directory.

Love multi-tasking 😀 Solved it. Switched the run time library setting from /MD to /MT when building the lib. I was under the impression that CMake did that for me when I cleared the check box next to shared.

Feeding Dragon