[Stk] Ming Compiling/Linking

musicdev musicdev at gmail.com
Sat Dec 19 11:46:41 PST 2009


Hi everyone,

I've been following the tutorials and was a bit stuck on the Realtime
Audio (blocking) tutorial.  An error was returned during linking with
the following:

C:\stk-4.4.1\src\RtAudio.cpp |3519| undefined reference to `_CoInitialize at 4'|

I am using Ming via Code::Blocks, with the following:

gcc-core-3.4.5
gcc-g++-3.4.5
mingw-runtime-3.14
mingw32-make-3.81-2
mingw-utils-0.3
w32api-3.11
binutils-2.18.50
gdb-6.7.50

Knowing it was not an issue with the compilation, I searched after
what could cause the problem at the link stage. After some hunting
down, I resolved the issue by specifying libole32 as an additional
link library aside from libwinmm, libdsound and libwsock32.  I also
tested this using DevC++ (which is also a popular IDE that uses ming)
and the same was required.

The "Compiling" section of the tutorials page on the site does mention
that on the Windows platform only the Visual .NET compiler has been
tested, however, I just wanted to provide this little finding so that
you can potentially enhance your documentation for those that use the
ming compilers.  Or at least so that there is an entry on the list
archives for anyone else that may have this issue.

Thanks!



More information about the Stk mailing list