Csound Csound-dev Csound-tekno Search About

Re: [Cs-dev] Csound output from API on windows was Re: Using the C++ api on Windows with mingw

Date2008-08-31 17:44
Fromvictor
SubjectRe: [Cs-dev] Csound output from API on windows was Re: Using the C++ api on Windows with mingw
AttachmentsNone  None  
Not sure. Once you set a message callback, messages should not appear
at the console (because they are implemented with csound->Message).
 
Victor
----- Original Message -----
Sent: Sunday, August 31, 2008 3:56 PM
Subject: [Cs-dev] Csound output from API on windows was Re: Using the C++ api on Windows with mingw

Thanks Victor,
That worked indeed, and now I have a running version of qutecsound on Windows. However, the messages are not being redirected correctly, in other words, it seems that csound.SetMessageCallback is not working like in other platforms (the messages are shown on the console, not within my application). What do I need to do to redirect Csound's output from the API on windows?

Cheers,
Andrés

On Thu, Aug 28, 2008 at 10:42 PM, victor <Victor.Lazzarini@nuim.ie> wrote:
I think this is because of your ld.exe. Try to get a different version (I think
it's binutils). Another solution is to build csound yourself and then use
libcsound.a as the link library
 
Victor
----- Original Message -----
Sent: Thursday, August 28, 2008 9:01 PM
Subject: [Cs-dev] Using the C++ api on Windows with mingw

Hi,

Trying to build qutecsound on Windows using the C++ API and Mingw, produces:

c:\Qt\4.3.2\bin\qmake.exe -win32 -o Makefile src.pro
mingw32-make -f Makefile.Release
mingw32-make[1]: Entering directory `C:/tools/qutecsound/trunk/qutecsound/src'
g++ -enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-rel
oc -Wl,-s -mthreads -Wl -Wl,-subsystem,windows -o "bin\qutecsound.exe" object_sc
ript.qutecsound.Release  -L"c:\Qt\4.3.2\lib" -lmingw32 -lqtmain "C:\Archivos de
programa\Csound\bin\csound64.dll.5.1" "C:\Archivos de programa\Csound\bin\csnd.d
ll" -lQtXml4 -lQtGui4 -lQtCore4
C:\Archivos de programa\Csound\bin\csound64.dll.5.1(.text+0x110):cygming-crtend.
c: multiple definition of `atexit'
/mingw/lib/crt2.o(.text+0x260):crt1.c: first defined here
C:\Archivos de programa\Csound\bin\csound64.dll.5.1(.text+0x140):cygming-crtend.
c: multiple definition of `_onexit'
/mingw/lib/crt2.o(.text+0x270):crt1.c: first defined here
C:\Archivos de programa\Csound\bin\csound64.dll.5.1(.text+0x230):cygming-crtend.
c: multiple definition of `__main'
/mingw/lib/libmingw32.a(gccmain.o)(.text+0xa0):gccmain.c: first defined here
C:\Archivos de programa\Csound\bin\csound64.dll.5.1(.text+0x7a670):cygming-crten
d.c: multiple definition of `_pei386_runtime_relocator'
/mingw/lib/libmingw32.a(pseudo-reloc.o)(.text+0x0):pseudo-reloc.c: first defined
 here
C:\Archivos de programa\Csound\bin\csound64.dll.5.1(.rdata+0x197ac):cygming-crte
nd.c: multiple definition of `__RUNTIME_PSEUDO_RELOC_LIST__'
/mingw/lib/libmingw32.a(pseudo-reloc-list.o)(.bss+0x0):pseudo-reloc-list.c: firs
t defined here
C:\Archivos de programa\Csound\bin\csound64.dll.5.1(.rdata+0x197ac):cygming-crte
nd.c: multiple definition of `__RUNTIME_PSEUDO_RELOC_LIST_END__'
/mingw/lib/libmingw32.a(pseudo-reloc-list.o)(.bss+0x1):pseudo-reloc-list.c: firs
t defined here
C:\MinGW\bin\..\lib\gcc\mingw32\3.4.2\..\..\..\..\mingw32\bin\ld.exe: C:\Archivo
s de programa\Csound\bin\csound64.dll.5.1(dghcs00024.o): illegal symbol index 18
64673616 in relocs
collect2: ld returned 1 exit status
mingw32-make[1]: *** [bin\qutecsound.exe] Error 1
mingw32-make[1]: Leaving directory `C:/tools/qutecsound/trunk/qutecsound/src'
mingw32-make: *** [release] Error 2

If I just link to csnd.dll instead of the csound.dll.5.1 library, I get:
c:\Qt\4.3.2\bin\qmake.exe -win32 -o Makefile src.pro
mingw32-make -f Makefile.Release
mingw32-make[1]: Entering directory `C:/tools/qutecsound/trunk/qutecsound/src'
g++ -enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-rel
oc -Wl,-s -mthreads -Wl -Wl,-subsystem,windows -o "bin\qutecsound.exe" object_sc
ript.qutecsound.Release  -L"c:\Qt\4.3.2\lib" -lmingw32 -lqtmain "C:\Archivos de
programa\Csound\bin\csnd.dll" -lQtXml4 -lQtGui4 -lQtCore4
./release\qutecsound.o(.text+0x40):qutecsound.cpp: undefined reference to `csoun
dGetHostData'
./release\qutecsound.o(.text+0x11887):qutecsound.cpp: undefined reference to `cs
oundSetMessageCallback'
./release\qutecsound.o(.text+0x118a2):qutecsound.cpp: undefined reference to `cs
oundSetHostData'
./release\qutecsound.o(.text+0x1197b):qutecsound.cpp: undefined reference to `cs
oundStop'
collect2: ld returned 1 exit status
mingw32-make[1]: *** [bin\qutecsound.exe] Error 1
mingw32-make[1]: Leaving directory `C:/tools/qutecsound/trunk/qutecsound/src'
mingw32-make: *** [release] Error 2


Any ideas where I'm going wrong? (This happens with both the floats and double versions)

Cheers,
Andrés
--


Andrés


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/


_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel




--


Andrés


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/


_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel

Date2008-09-02 02:36
From"Andres Cabrera"
SubjectRe: [Cs-dev] Csound output from API on windows was Re: Using the C++ api on Windows with mingw
AttachmentsNone  None  None  None  

Date2008-09-02 10:59
FromVictor.Lazzarini@nuim.ie
SubjectRe: [Cs-dev] Csound output from API on windows was Re: Using the C++ api on Windows with mingw
AttachmentsNone  None  None  None  

Date2008-09-02 13:42
From"Andres Cabrera"
SubjectRe: [Cs-dev] Csound output from API on windows was Re: Using the C++ api on Windows with mingw
AttachmentsNone  None  None  None  

Date2008-09-02 14:36
FromVictor.Lazzarini@nuim.ie
SubjectRe: [Cs-dev] Csound output from API on windows was Re: Using the C++ api on Windows with mingw
AttachmentsNone  None  None  

Date2008-09-02 18:00
FromFelipe Sateler
SubjectRe: [Cs-dev] Csound output from API on windows was Re: Using the C++ api on Windows with mingw
AttachmentsNone  None  None