Csound Csound-dev Csound-tekno Search About

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

Date2004-04-23 02:24
From"Michael Gogins"
Subject[CSOUND-DEV:4501] Re: Newbie trying to build Csound5 on mingw
I installed mingw.
I installed msys and it asked where mingw was installed.
I run the msys shell, and there I run:
python c:/tools/python23/scripts/scons

I do not have Microsoft C++ on my system - this is the cause of your
problem. You need to get the Microsoft paths out of your msys environment
variables, then it will be OK. If scons sees cl.exe it will prefer that to
gcc.exe and decide the tools are msvc.

You can change your computer's default paths, or you can write a script
inside msys that will fix up the paths and get rid of the MS stuff.


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


> Hi all,
> First, thanks all for your great effort in getting Csound5 up and running!
I
> can't wait to see it working!
>
> Now for the problems...
>
> I'm trying to build on Windows XP using mingw, and msys, but I'm getting
the
> following on the msys terminal:
> (I'm using Windows Python 2.3.3)
>
> System platform is 'win32'.
> Tools:
> ['default', 'mslink', 'msvc', 'g77', 'gas', 'mslib', 'CVS', 'lex', 'm4',
'midl'
> , 'msvs', 'tar', 'yacc', 'zip']
> Build platform is 'unsupported'.
>
> Using single-precision floating point for audio samples.
> Checking for C header file sndfile.h... no
> The sndfile library is required to build Csound 5.
>
>
>
> Apparently, the build system is not recognizing mingw, even though I've
set
> the /bin and /include directories for my mingw installation in custom.py.
Do I
> need to install the msys sources as well? (That one is a really huge
> download...).
> I have already downloaded libsndfile. Am I setting the path correctly by
using:
>
>     customLIBPATH.append('C:/Dev-Cpp/libsndfile-1.0.10pre4/src')
>
> in custom.py ?
>
> Thanks in advance and be prepared to hear from me again....=)
> Andres
>
>

Date2004-04-23 03:50
Fromacabrera@teleset.com.co
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:225: 
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:253: 
u        ndefined reference to `midiOutGetDevCapsA@12'
./libcsound.a(midisend.o)(.text+0x360):h:/c_progs/csound5/OOps/midisend.c:255: 
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