Csound Csound-dev Csound-tekno Search About

[CSOUND-DEV:4505] Re: Newbie trying to build Csound5 on mingw

Date2004-04-23 05:31
From"Michael Gogins"
Subject[CSOUND-DEV:4505] Re: Newbie trying to build Csound5 on mingw
You need libwinmm.a, which you can get if you install Dev-C++. Or maybe it's
in your mingw lib directory, perhaps under win32. It's the Windows
multimedia library which has MIDI port functions used by Csound.

----- Original Message ----- 
From: 
To: "Csound Developers Discussion List" 
Sent: Thursday, April 22, 2004 10:50 PM
Subject: [CSOUND-DEV:4503] Re: Newbie trying to build Csound5 on mingw


> Thanks Michael and Steven for your quick reply! You were both right. First
I
> got rid of MSVC and now the build system is correctly recognized as mingw.
I
> also changed the paths, so that :
>
>     customCPPPATH.append('C:/Dev-Cpp/libsndfile-1.0.10pre4/src')
>
> I mistakenly thought that LIBPATH would be used for header files as well,
but
> that's what CPPPATH is for...
> I guess it would be great if the custom.py file was more of a template
with
> all lines for libsndaudio, portaudio, FLTK and others included, but
commented
> out, so newbies like me only have to change paths, and not add new ones.
>
> I'm seeing light at the end of tunnel, but I'm not there yet. This time,
I'm
> getting first a lot of warnings about "__cdecl" redifined.
> Then at the bottom, after a lot of objects are compiled successfully I
get:
>
> In file included from H/cs.h:34,
>                  from InOut/libsnd_u.c:1:
> H/csoundCore.h:764:1: warning: "__cdecl" redefined
> InOut/libsnd_u.c:1:1: warning: this is the location of the previous
definition
> InOut/libsnd_u.c: In function `SAsndgetset':
> InOut/libsnd_u.c:97: warning: `infd' might be used uninitialized in this
> functio        n
> g++ -o cscore.exe
util1\cscore\cscore_main.o -Lcygwin_import_libs -LC:\Dev-
> Cpp\l
       ib -LC:\msys\1.0\local\lib -LC:\Dev-Cpp\libsndfile-1.0.10pre4 -
> L. -L. -L. -L\usr
       \include\lib -L\usr\local\lib -lcsound -lsndfile -
> lkernel32 -lgdi32 -lwsock32 -l        ole32 -luuid
> ./libcsound.a(mididevice.o)(.text+0xca): In function `OpenMIDIDevice':
> h:/c_progs/csound5/OOps/mididevice.c:205: undefined reference to
> `midiInGetNumDe        vs@0'
> ./libcsound.a(mididevice.o)
> (.text+0xfa):h:/c_progs/csound5/OOps/mididevice.c:211        : undefined
> reference to `midiInGetDevCapsA@12'
> ./libcsound.a(mididevice.o)
> (.text+0x163):h:/c_progs/csound5/OOps/mididevice.c:23        0: undefined
> reference to `midiInOpen@20'
> ./libcsound.a(mididevice.o)
> (.text+0x178):h:/c_progs/csound5/OOps/mididevice.c:23        0: undefined
> reference to `midiInStart@4'
> ./libcsound.a(mididevice.o)(.text+0x31d): In function `CloseMIDIDevice':
> h:/c_progs/csound5/OOps/mididevice.c:634: undefined reference to
`midiInStop@4'
> ./libcsound.a(mididevice.o)
> (.text+0x332):h:/c_progs/csound5/OOps/mididevice.c:63        4: undefined
> reference to `midiInReset@4'
> ./libcsound.a(mididevice.o)
> (.text+0x35b):h:/c_progs/csound5/OOps/mididevice.c:65        5: undefined
> reference to `midiInClose@4'
> ./libcsound.a(midisend.o)(.text+0x21): In function `send_midi_message':
> h:/c_progs/csound5/OOps/midisend.c:200: undefined reference to
> `midiOutShortMsg@        8'
> ./libcsound.a(midisend.o)(.text+0x57): In function `note_on':
> h:/c_progs/csound5/OOps/midisend.c:205: undefined reference to
> `midiOutShortMsg@        8'
> ./libcsound.a(midisend.o)(.text+0x85): In function `note_off':
> h:/c_progs/csound5/OOps/midisend.c:210: undefined reference to
> `midiOutShortMsg@        8'
> ./libcsound.a(midisend.o)(.text+0xb7): In function `control_change':
> h:/c_progs/csound5/OOps/midisend.c:215: undefined reference to
> `midiOutShortMsg@        8'
> ./libcsound.a(midisend.o)(.text+0xdf): In function `after_touch':
> h:/c_progs/csound5/OOps/midisend.c:220: undefined reference to
> `midiOutShortMsg@        8'
>
./libcsound.a(midisend.o)(.text+0x10f):h:/c_progs/csound5/OOps/midisend.c:22
5:
> m        ore undefined references to `midiOutShortMsg@8' follow
> ./libcsound.a(midisend.o)(.text+0x2b8): In function `openMIDIout':
> h:/c_progs/csound5/OOps/midisend.c:240: undefined reference to
> `midiOutGetNumDev        s@0'
>
./libcsound.a(midisend.o)(.text+0x335):h:/c_progs/csound5/OOps/midisend.c:25
3:
> u        ndefined reference to `midiOutGetDevCapsA@12'
>
./libcsound.a(midisend.o)(.text+0x360):h:/c_progs/csound5/OOps/midisend.c:25
5:
> u        ndefined reference to `midiOutOpen@20'
> scons: building terminated because of errors.
> scons: *** [cscore.exe] Error 1
>
> This looks surprisingly similar to a recent post by Gabriel when he tried
to
> build Csound 4.23...
> Thanks in advance for your patience....
> Andres
>

Date2004-04-24 02:31
Fromacabrera@teleset.com.co
Subject[CSOUND-DEV:4507] Re: Newbie trying to build Csound5 on mingw
I am already using the prerelease version of libsndfile, and the library 
libwinmm.a is on: C:\Dev-Cpp\lib

on custom.py, I have set:

    customLIBPATH.append('c:/dev-cpp/lib')

but I am still getting the 'unknown references'. I notice that the compile 
line on the msys terminal is:
g++ -o cscore.exe util1\cscore\cscore_main.o -LC:\Dev-Cpp\lib -LC:\msys\1.0
\local\lib -LC:\Dev-Cpp\libsndfile-1.0.10pre4 -L. -L. -L. -L\usr\include\lib -
L\usr\local\lib -lcsound -lsndfile -lkernel32 -lgdi32 -lwsock32 -lole32 -luuid


It looks like the winmm library is not being included. Being the total newbie 
I am, this maybe nonsense...
Any ideas?