Csound Csound-dev Csound-tekno Search About

[Csnd] creating a MSVC import lib for Visual Studio Express...

Date2009-05-05 17:42
FromRory Walsh
Subject[Csnd] creating a MSVC import lib for Visual Studio Express...
I know this has been discussed many times but I'm having problems
linking to an import library I created using pexports and the MS lib
tool. I followed the steps outlined below:

1) create the DEF file (using pexports):
pexports csound32.dll.5.1 > csound32.def
2) then create the lib file (using the MSVC lib tool):
lib /machine:i386  /def:csound32.def

This all works fine but when I try to link to this .lib file I get a
whole load of unresolved errors:

1>ApplicationStartup.obj : error LNK2001: unresolved external symbol
_csoundGet0dBFS
1>ApplicationStartup.obj : error LNK2001: unresolved external symbol
_csoundGetRtPlayUserData
1>ApplicationStartup.obj : error LNK2001: unresolved external symbol
_csoundEnableMessageBuffer
1>ApplicationStartup.obj : error LNK2001: unresolved external symbol
_csoundGetControlChannelParams
1>ApplicationStartup.obj : error LNK2001: unresolved external symbol
_csoundTableGet
1>ApplicationStartup.obj : error LNK2001: unresolved external symbol
_csoundSetDrawGraphCallback
1>ApplicationStartup.obj : error LNK2001: unresolved external symbol
_csoundSetRecopenCallback
1>ApplicationStartup.obj : error LNK2001: unresolved external symbol
_csoundGetMessageLevel
1>ApplicationStartup.obj : error LNK2001: unresolved external symbol
_csoundKeyPress
1>ApplicationStartup.obj : error LNK2001: unresolved external symbol
_csoundGetRtRecordUserData
(this is just a sample of the errors, I get 114 of them...)

The import library is in the same folder as other libraries I use
which are all found. Anyone have any ideas?

Rory.

Date2009-05-05 18:15
FromMichael Gogins
Subject[Csnd] Re: creating a MSVC import lib for Visual Studio Express...
_x() versus x()?

Regards,
Mike

On 5/5/09, Rory Walsh  wrote:
> I know this has been discussed many times but I'm having problems
> linking to an import library I created using pexports and the MS lib
> tool. I followed the steps outlined below:
>
> 1) create the DEF file (using pexports):
> pexports csound32.dll.5.1 > csound32.def
> 2) then create the lib file (using the MSVC lib tool):
> lib /machine:i386  /def:csound32.def
>
> This all works fine but when I try to link to this .lib file I get a
> whole load of unresolved errors:
>
> 1>ApplicationStartup.obj : error LNK2001: unresolved external symbol
> _csoundGet0dBFS
> 1>ApplicationStartup.obj : error LNK2001: unresolved external symbol
> _csoundGetRtPlayUserData
> 1>ApplicationStartup.obj : error LNK2001: unresolved external symbol
> _csoundEnableMessageBuffer
> 1>ApplicationStartup.obj : error LNK2001: unresolved external symbol
> _csoundGetControlChannelParams
> 1>ApplicationStartup.obj : error LNK2001: unresolved external symbol
> _csoundTableGet
> 1>ApplicationStartup.obj : error LNK2001: unresolved external symbol
> _csoundSetDrawGraphCallback
> 1>ApplicationStartup.obj : error LNK2001: unresolved external symbol
> _csoundSetRecopenCallback
> 1>ApplicationStartup.obj : error LNK2001: unresolved external symbol
> _csoundGetMessageLevel
> 1>ApplicationStartup.obj : error LNK2001: unresolved external symbol
> _csoundKeyPress
> 1>ApplicationStartup.obj : error LNK2001: unresolved external symbol
> _csoundGetRtRecordUserData
> (this is just a sample of the errors, I get 114 of them...)
>
> The import library is in the same folder as other libraries I use
> which are all found. Anyone have any ideas?
>
> Rory.
>
>
> Send bugs reports to this list.
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
> csound"
>


-- 
Michael Gogins
Irreducible Productions
http://www.michael-gogins.com
Michael dot Gogins at gmail dot com

Date2009-05-05 19:15
FromRory Walsh
Subject[Csnd] Re: Re: creating a MSVC import lib for Visual Studio Express...
With regards to the export symbols? I tried editing the .def file to
add underscores but as it didn't work I didn't mention it in my
earlier post. Saying that should I add underscores to everything or
just the exports? Here's the first few lines from the def file:

LIBRARY csound32.dll.5.2
EXPORTS
cscoreCopyEvent
cscoreCreateEvent
cscoreDefineEvent
cscoreFileClose
cscoreFileGetCurrent
cscoreFileOpen
cscoreFileSetCurrent
cscoreFreeEvent
cscoreGetEvent
cscoreListAppendEvent
cscoreListAppendList
cscoreListAppendStringEvent

I tried adding some underscores to the exported functions but they
still showed up as unresolved.

Rory.



2009/5/5 Michael Gogins :
> _x() versus x()?
>
> Regards,
> Mike
>
> On 5/5/09, Rory Walsh  wrote:
>> I know this has been discussed many times but I'm having problems
>> linking to an import library I created using pexports and the MS lib
>> tool. I followed the steps outlined below:
>>
>> 1) create the DEF file (using pexports):
>> pexports csound32.dll.5.1 > csound32.def
>> 2) then create the lib file (using the MSVC lib tool):
>> lib /machine:i386  /def:csound32.def
>>
>> This all works fine but when I try to link to this .lib file I get a
>> whole load of unresolved errors:
>>
>> 1>ApplicationStartup.obj : error LNK2001: unresolved external symbol
>> _csoundGet0dBFS
>> 1>ApplicationStartup.obj : error LNK2001: unresolved external symbol
>> _csoundGetRtPlayUserData
>> 1>ApplicationStartup.obj : error LNK2001: unresolved external symbol
>> _csoundEnableMessageBuffer
>> 1>ApplicationStartup.obj : error LNK2001: unresolved external symbol
>> _csoundGetControlChannelParams
>> 1>ApplicationStartup.obj : error LNK2001: unresolved external symbol
>> _csoundTableGet
>> 1>ApplicationStartup.obj : error LNK2001: unresolved external symbol
>> _csoundSetDrawGraphCallback
>> 1>ApplicationStartup.obj : error LNK2001: unresolved external symbol
>> _csoundSetRecopenCallback
>> 1>ApplicationStartup.obj : error LNK2001: unresolved external symbol
>> _csoundGetMessageLevel
>> 1>ApplicationStartup.obj : error LNK2001: unresolved external symbol
>> _csoundKeyPress
>> 1>ApplicationStartup.obj : error LNK2001: unresolved external symbol
>> _csoundGetRtRecordUserData
>> (this is just a sample of the errors, I get 114 of them...)
>>
>> The import library is in the same folder as other libraries I use
>> which are all found. Anyone have any ideas?
>>
>> Rory.
>>
>>
>> Send bugs reports to this list.
>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
>> csound"
>>
>
>
> --
> Michael Gogins
> Irreducible Productions
> http://www.michael-gogins.com
> Michael dot Gogins at gmail dot com
>
>
> Send bugs reports to this list.
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
>


Date2009-05-06 10:06
FromRory Walsh
Subject[Csnd] Re: Re: creating a MSVC import lib for Visual Studio Express...
The latest on this is that I can build using the csound.h header. At
least I can create an instance of CSOUND without any problems. I only
get these unresolved errors when I include the csound.hpp header file
instead, this is without even creating or declaring a Csound() class.
I've seen on the list that people have been able to get this going
using the MS command line tools where you can specify exactly the lib
to import. From the IDE it seems you need only include the directory
to the .lib, does anyone know how to explicitly tell the IDE to import
to a particular lib? Specifying the paths to library directories does
however work with all my MS created libraries.

Rory.


2009/5/5 Rory Walsh :
> With regards to the export symbols? I tried editing the .def file to
> add underscores but as it didn't work I didn't mention it in my
> earlier post. Saying that should I add underscores to everything or
> just the exports? Here's the first few lines from the def file:
>
> LIBRARY csound32.dll.5.2
> EXPORTS
> cscoreCopyEvent
> cscoreCreateEvent
> cscoreDefineEvent
> cscoreFileClose
> cscoreFileGetCurrent
> cscoreFileOpen
> cscoreFileSetCurrent
> cscoreFreeEvent
> cscoreGetEvent
> cscoreListAppendEvent
> cscoreListAppendList
> cscoreListAppendStringEvent
>
> I tried adding some underscores to the exported functions but they
> still showed up as unresolved.
>
> Rory.
>
>
>
> 2009/5/5 Michael Gogins :
>> _x() versus x()?
>>
>> Regards,
>> Mike
>>
>> On 5/5/09, Rory Walsh  wrote:
>>> I know this has been discussed many times but I'm having problems
>>> linking to an import library I created using pexports and the MS lib
>>> tool. I followed the steps outlined below:
>>>
>>> 1) create the DEF file (using pexports):
>>> pexports csound32.dll.5.1 > csound32.def
>>> 2) then create the lib file (using the MSVC lib tool):
>>> lib /machine:i386  /def:csound32.def
>>>
>>> This all works fine but when I try to link to this .lib file I get a
>>> whole load of unresolved errors:
>>>
>>> 1>ApplicationStartup.obj : error LNK2001: unresolved external symbol
>>> _csoundGet0dBFS
>>> 1>ApplicationStartup.obj : error LNK2001: unresolved external symbol
>>> _csoundGetRtPlayUserData
>>> 1>ApplicationStartup.obj : error LNK2001: unresolved external symbol
>>> _csoundEnableMessageBuffer
>>> 1>ApplicationStartup.obj : error LNK2001: unresolved external symbol
>>> _csoundGetControlChannelParams
>>> 1>ApplicationStartup.obj : error LNK2001: unresolved external symbol
>>> _csoundTableGet
>>> 1>ApplicationStartup.obj : error LNK2001: unresolved external symbol
>>> _csoundSetDrawGraphCallback
>>> 1>ApplicationStartup.obj : error LNK2001: unresolved external symbol
>>> _csoundSetRecopenCallback
>>> 1>ApplicationStartup.obj : error LNK2001: unresolved external symbol
>>> _csoundGetMessageLevel
>>> 1>ApplicationStartup.obj : error LNK2001: unresolved external symbol
>>> _csoundKeyPress
>>> 1>ApplicationStartup.obj : error LNK2001: unresolved external symbol
>>> _csoundGetRtRecordUserData
>>> (this is just a sample of the errors, I get 114 of them...)
>>>
>>> The import library is in the same folder as other libraries I use
>>> which are all found. Anyone have any ideas?
>>>
>>> Rory.
>>>
>>>
>>> Send bugs reports to this list.
>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
>>> csound"
>>>
>>
>>
>> --
>> Michael Gogins
>> Irreducible Productions
>> http://www.michael-gogins.com
>> Michael dot Gogins at gmail dot com
>>
>>
>> Send bugs reports to this list.
>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
>>
>


Date2009-05-06 13:57
FromAndy Fillebrown
Subject[Csnd] Re: Re: Re: creating a MSVC import lib for Visual Studio Express...
Hi Rory, 

I'm not sure exactly what the problems you're running into are, but it would seem that in addition to linking to csound32.dll.5.2 you also need to link to csnd.dll.  Is this something you've already tried? 

--- 

In the IDE you can add the directory containing the libs globally in: 
Tools -> Options -> Projects and Solutions -> VC++ Directories -> Show directories for (drop-down combo box on top right) -> Library files 

...or you can add the directory to the project locally in: 
Project -> Properties -> Configuration Properties -> Linker -> General -> Additional Library Directories 

Either way, you also need to add the 2 libraries by name in: 
Project -> Properties -> Configuration Properties -> Linker -> Input -> Additional Dependencies 

If you add the librarys' directory globally or locally in the "Additional Library Directories" field you can just specify the library name without a path in the "Additional Dependencies" field. If you haven't added the librarys' directory to the IDE globally or locally then you need to specify the full path to each library in "Additional Dependencies". 

My preferred method is to add the directories to each project locally. It keeps things uncluttered in the tiny dialog boxes and it doesn't add an unused global library directory to search through if you're working on a project that doesn't need csound. The only drawback to adding the directory locally is that it has to be done for each new project that links to the csound libraries, which isn't that big a deal but is easy to overlook when creating a new project. 

The reason why the MS libraries only need the directory to be able to link up is because the MS libraries are automatically inherited by each project, as you can see if you expand the "Additional Dependencies" field using the "..." box. 

--- 

Anyway, I may be misunderstanding your question, but hopefully that helps.

Regards, 
-andy.f 



----- "Rory Walsh"  wrote:
> The latest on this is that I can build using the csound.h header. At
> least I can create an instance of CSOUND without any problems. I only
> get these unresolved errors when I include the csound.hpp header file
> instead, this is without even creating or declaring a Csound() class.
> I've seen on the list that people have been able to get this going
> using the MS command line tools where you can specify exactly the lib
> to import. From the IDE it seems you need only include the directory
> to the .lib, does anyone know how to explicitly tell the IDE to import
> to a particular lib? Specifying the paths to library directories does
> however work with all my MS created libraries.
> 
> Rory.
> 
> 
> 2009/5/5 Rory Walsh :
> > With regards to the export symbols? I tried editing the .def file to
> > add underscores but as it didn't work I didn't mention it in my
> > earlier post. Saying that should I add underscores to everything or
> > just the exports? Here's the first few lines from the def file:
> >
> > LIBRARY csound32.dll.5.2
> > EXPORTS
> > cscoreCopyEvent
> > cscoreCreateEvent
> > cscoreDefineEvent
> > cscoreFileClose
> > cscoreFileGetCurrent
> > cscoreFileOpen
> > cscoreFileSetCurrent
> > cscoreFreeEvent
> > cscoreGetEvent
> > cscoreListAppendEvent
> > cscoreListAppendList
> > cscoreListAppendStringEvent
> >
> > I tried adding some underscores to the exported functions but they
> > still showed up as unresolved.
> >
> > Rory.
> >
> >
> >
> > 2009/5/5 Michael Gogins :
> >> _x() versus x()?
> >>
> >> Regards,
> >> Mike
> >>
> >> On 5/5/09, Rory Walsh  wrote:
> >>> I know this has been discussed many times but I'm having problems
> >>> linking to an import library I created using pexports and the MS
> lib
> >>> tool. I followed the steps outlined below:
> >>>
> >>> 1) create the DEF file (using pexports):
> >>> pexports csound32.dll.5.1 > csound32.def
> >>> 2) then create the lib file (using the MSVC lib tool):
> >>> lib /machine:i386  /def:csound32.def
> >>>
> >>> This all works fine but when I try to link to this .lib file I get
> a
> >>> whole load of unresolved errors:
> >>>
> >>> 1>ApplicationStartup.obj : error LNK2001: unresolved external
> symbol
> >>> _csoundGet0dBFS
> >>> 1>ApplicationStartup.obj : error LNK2001: unresolved external
> symbol
> >>> _csoundGetRtPlayUserData
> >>> 1>ApplicationStartup.obj : error LNK2001: unresolved external
> symbol
> >>> _csoundEnableMessageBuffer
> >>> 1>ApplicationStartup.obj : error LNK2001: unresolved external
> symbol
> >>> _csoundGetControlChannelParams
> >>> 1>ApplicationStartup.obj : error LNK2001: unresolved external
> symbol
> >>> _csoundTableGet
> >>> 1>ApplicationStartup.obj : error LNK2001: unresolved external
> symbol
> >>> _csoundSetDrawGraphCallback
> >>> 1>ApplicationStartup.obj : error LNK2001: unresolved external
> symbol
> >>> _csoundSetRecopenCallback
> >>> 1>ApplicationStartup.obj : error LNK2001: unresolved external
> symbol
> >>> _csoundGetMessageLevel
> >>> 1>ApplicationStartup.obj : error LNK2001: unresolved external
> symbol
> >>> _csoundKeyPress
> >>> 1>ApplicationStartup.obj : error LNK2001: unresolved external
> symbol
> >>> _csoundGetRtRecordUserData
> >>> (this is just a sample of the errors, I get 114 of them...)
> >>>
> >>> The import library is in the same folder as other libraries I use
> >>> which are all found. Anyone have any ideas?
> >>>
> >>> Rory.
> >>>
> >>>
> >>> Send bugs reports to this list.
> >>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
> "unsubscribe
> >>> csound"
> >>>
> >>
> >>
> >> --
> >> Michael Gogins
> >> Irreducible Productions
> >> http://www.michael-gogins.com
> >> Michael dot Gogins at gmail dot com
> >>
> >>
> >> Send bugs reports to this list.
> >> To unsubscribe, send email sympa@lists.bath.ac.uk with body
> "unsubscribe csound"
> >>
> >
> 
> 
> Send bugs reports to this list.
> To unsubscribe, send email sympa@lists.bath.ac.uk with body
> "unsubscribe csound"



Date2009-05-06 16:43
FromRory Walsh
Subject[Csnd] Re: Re: Re: Re: creating a MSVC import lib for Visual Studio Express...
Adding them directly did the trick, thanks for that. It's been almost
ten years since I used any MS IDEs, at times like this you gotta love
the command line. Thanks again, I hope I don't hit any other snags!

2009/5/6 Andy Fillebrown :
>
> Hi Rory,
>
> I'm not sure exactly what the problems you're running into are, but it would seem that in addition to linking to csound32.dll.5.2 you also need to link to csnd.dll.  Is this something you've already tried?
>
> ---
>
> In the IDE you can add the directory containing the libs globally in:
> Tools -> Options -> Projects and Solutions -> VC++ Directories -> Show directories for (drop-down combo box on top right) -> Library files
>
> ...or you can add the directory to the project locally in:
> Project -> Properties -> Configuration Properties -> Linker -> General -> Additional Library Directories
>
> Either way, you also need to add the 2 libraries by name in:
> Project -> Properties -> Configuration Properties -> Linker -> Input -> Additional Dependencies
>
> If you add the librarys' directory globally or locally in the "Additional Library Directories" field you can just specify the library name without a path in the "Additional Dependencies" field. If you haven't added the librarys' directory to the IDE globally or locally then you need to specify the full path to each library in "Additional Dependencies".
>
> My preferred method is to add the directories to each project locally. It keeps things uncluttered in the tiny dialog boxes and it doesn't add an unused global library directory to search through if you're working on a project that doesn't need csound. The only drawback to adding the directory locally is that it has to be done for each new project that links to the csound libraries, which isn't that big a deal but is easy to overlook when creating a new project.
>
> The reason why the MS libraries only need the directory to be able to link up is because the MS libraries are automatically inherited by each project, as you can see if you expand the "Additional Dependencies" field using the "..." box.
>
> ---
>
> Anyway, I may be misunderstanding your question, but hopefully that helps.
>
> Regards,
> -andy.f
>
>
>
> ----- "Rory Walsh"  wrote:
>> The latest on this is that I can build using the csound.h header. At
>> least I can create an instance of CSOUND without any problems. I only
>> get these unresolved errors when I include the csound.hpp header file
>> instead, this is without even creating or declaring a Csound() class.
>> I've seen on the list that people have been able to get this going
>> using the MS command line tools where you can specify exactly the lib
>> to import. From the IDE it seems you need only include the directory
>> to the .lib, does anyone know how to explicitly tell the IDE to import
>> to a particular lib? Specifying the paths to library directories does
>> however work with all my MS created libraries.
>>
>> Rory.
>>
>>
>> 2009/5/5 Rory Walsh :
>> > With regards to the export symbols? I tried editing the .def file to
>> > add underscores but as it didn't work I didn't mention it in my
>> > earlier post. Saying that should I add underscores to everything or
>> > just the exports? Here's the first few lines from the def file:
>> >
>> > LIBRARY csound32.dll.5.2
>> > EXPORTS
>> > cscoreCopyEvent
>> > cscoreCreateEvent
>> > cscoreDefineEvent
>> > cscoreFileClose
>> > cscoreFileGetCurrent
>> > cscoreFileOpen
>> > cscoreFileSetCurrent
>> > cscoreFreeEvent
>> > cscoreGetEvent
>> > cscoreListAppendEvent
>> > cscoreListAppendList
>> > cscoreListAppendStringEvent
>> >
>> > I tried adding some underscores to the exported functions but they
>> > still showed up as unresolved.
>> >
>> > Rory.
>> >
>> >
>> >
>> > 2009/5/5 Michael Gogins :
>> >> _x() versus x()?
>> >>
>> >> Regards,
>> >> Mike
>> >>
>> >> On 5/5/09, Rory Walsh  wrote:
>> >>> I know this has been discussed many times but I'm having problems
>> >>> linking to an import library I created using pexports and the MS
>> lib
>> >>> tool. I followed the steps outlined below:
>> >>>
>> >>> 1) create the DEF file (using pexports):
>> >>> pexports csound32.dll.5.1 > csound32.def
>> >>> 2) then create the lib file (using the MSVC lib tool):
>> >>> lib /machine:i386  /def:csound32.def
>> >>>
>> >>> This all works fine but when I try to link to this .lib file I get
>> a
>> >>> whole load of unresolved errors:
>> >>>
>> >>> 1>ApplicationStartup.obj : error LNK2001: unresolved external
>> symbol
>> >>> _csoundGet0dBFS
>> >>> 1>ApplicationStartup.obj : error LNK2001: unresolved external
>> symbol
>> >>> _csoundGetRtPlayUserData
>> >>> 1>ApplicationStartup.obj : error LNK2001: unresolved external
>> symbol
>> >>> _csoundEnableMessageBuffer
>> >>> 1>ApplicationStartup.obj : error LNK2001: unresolved external
>> symbol
>> >>> _csoundGetControlChannelParams
>> >>> 1>ApplicationStartup.obj : error LNK2001: unresolved external
>> symbol
>> >>> _csoundTableGet
>> >>> 1>ApplicationStartup.obj : error LNK2001: unresolved external
>> symbol
>> >>> _csoundSetDrawGraphCallback
>> >>> 1>ApplicationStartup.obj : error LNK2001: unresolved external
>> symbol
>> >>> _csoundSetRecopenCallback
>> >>> 1>ApplicationStartup.obj : error LNK2001: unresolved external
>> symbol
>> >>> _csoundGetMessageLevel
>> >>> 1>ApplicationStartup.obj : error LNK2001: unresolved external
>> symbol
>> >>> _csoundKeyPress
>> >>> 1>ApplicationStartup.obj : error LNK2001: unresolved external
>> symbol
>> >>> _csoundGetRtRecordUserData
>> >>> (this is just a sample of the errors, I get 114 of them...)
>> >>>
>> >>> The import library is in the same folder as other libraries I use
>> >>> which are all found. Anyone have any ideas?
>> >>>
>> >>> Rory.
>> >>>
>> >>>
>> >>> Send bugs reports to this list.
>> >>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>> "unsubscribe
>> >>> csound"
>> >>>
>> >>
>> >>
>> >> --
>> >> Michael Gogins
>> >> Irreducible Productions
>> >> http://www.michael-gogins.com
>> >> Michael dot Gogins at gmail dot com
>> >>
>> >>
>> >> Send bugs reports to this list.
>> >> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>> "unsubscribe csound"
>> >>
>> >
>>
>>
>> Send bugs reports to this list.
>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>> "unsubscribe csound"
>
>
>
> Send bugs reports to this list.
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"


Date2009-05-06 17:11
FromRory Walsh
Subject[Csnd] Re: Re: Re: Re: creating a MSVC import lib for Visual Studio Express...
Ok next thing is that I'm getting ambiguous symbols between the GUI
lib I'm using and some MSVC defines found in sysdep.h? Any ideas how I
can resolve these?

1>c:\mydocuments\sourcecode\csound5\csound5\h\csound.h(456) : error
C2872: 'int32' : ambiguous symbol
1>        could be
'c:\mydocuments\sourcecode\csound5\csound5\h\sysdep.h(53) : int int32'
1>        or
'c:\mydocuments\sourcecode\juce\src\juce_core\basics\juce_MathsFunctions.h(52)
: juce::int32'
1>c:\mydocuments\sourcecode\csound5\csound5\h\csound.h(459) : error
C2872: 'int32' : ambiguous symbol

The relavant section of the sysdep.h file is here:

#ifdef MSVC
typedef __int32 int32;
typedef __int16 int16;
typedef unsigned __int32 uint32;
typedef unsigned __int16 uint16;
#else

Rory.

2009/5/6 Rory Walsh :
> Adding them directly did the trick, thanks for that. It's been almost
> ten years since I used any MS IDEs, at times like this you gotta love
> the command line. Thanks again, I hope I don't hit any other snags!
>
> 2009/5/6 Andy Fillebrown :
>>
>> Hi Rory,
>>
>> I'm not sure exactly what the problems you're running into are, but it would seem that in addition to linking to csound32.dll.5.2 you also need to link to csnd.dll.  Is this something you've already tried?
>>
>> ---
>>
>> In the IDE you can add the directory containing the libs globally in:
>> Tools -> Options -> Projects and Solutions -> VC++ Directories -> Show directories for (drop-down combo box on top right) -> Library files
>>
>> ...or you can add the directory to the project locally in:
>> Project -> Properties -> Configuration Properties -> Linker -> General -> Additional Library Directories
>>
>> Either way, you also need to add the 2 libraries by name in:
>> Project -> Properties -> Configuration Properties -> Linker -> Input -> Additional Dependencies
>>
>> If you add the librarys' directory globally or locally in the "Additional Library Directories" field you can just specify the library name without a path in the "Additional Dependencies" field. If you haven't added the librarys' directory to the IDE globally or locally then you need to specify the full path to each library in "Additional Dependencies".
>>
>> My preferred method is to add the directories to each project locally. It keeps things uncluttered in the tiny dialog boxes and it doesn't add an unused global library directory to search through if you're working on a project that doesn't need csound. The only drawback to adding the directory locally is that it has to be done for each new project that links to the csound libraries, which isn't that big a deal but is easy to overlook when creating a new project.
>>
>> The reason why the MS libraries only need the directory to be able to link up is because the MS libraries are automatically inherited by each project, as you can see if you expand the "Additional Dependencies" field using the "..." box.
>>
>> ---
>>
>> Anyway, I may be misunderstanding your question, but hopefully that helps.
>>
>> Regards,
>> -andy.f
>>
>>
>>
>> ----- "Rory Walsh"  wrote:
>>> The latest on this is that I can build using the csound.h header. At
>>> least I can create an instance of CSOUND without any problems. I only
>>> get these unresolved errors when I include the csound.hpp header file
>>> instead, this is without even creating or declaring a Csound() class.
>>> I've seen on the list that people have been able to get this going
>>> using the MS command line tools where you can specify exactly the lib
>>> to import. From the IDE it seems you need only include the directory
>>> to the .lib, does anyone know how to explicitly tell the IDE to import
>>> to a particular lib? Specifying the paths to library directories does
>>> however work with all my MS created libraries.
>>>
>>> Rory.
>>>
>>>
>>> 2009/5/5 Rory Walsh :
>>> > With regards to the export symbols? I tried editing the .def file to
>>> > add underscores but as it didn't work I didn't mention it in my
>>> > earlier post. Saying that should I add underscores to everything or
>>> > just the exports? Here's the first few lines from the def file:
>>> >
>>> > LIBRARY csound32.dll.5.2
>>> > EXPORTS
>>> > cscoreCopyEvent
>>> > cscoreCreateEvent
>>> > cscoreDefineEvent
>>> > cscoreFileClose
>>> > cscoreFileGetCurrent
>>> > cscoreFileOpen
>>> > cscoreFileSetCurrent
>>> > cscoreFreeEvent
>>> > cscoreGetEvent
>>> > cscoreListAppendEvent
>>> > cscoreListAppendList
>>> > cscoreListAppendStringEvent
>>> >
>>> > I tried adding some underscores to the exported functions but they
>>> > still showed up as unresolved.
>>> >
>>> > Rory.
>>> >
>>> >
>>> >
>>> > 2009/5/5 Michael Gogins :
>>> >> _x() versus x()?
>>> >>
>>> >> Regards,
>>> >> Mike
>>> >>
>>> >> On 5/5/09, Rory Walsh  wrote:
>>> >>> I know this has been discussed many times but I'm having problems
>>> >>> linking to an import library I created using pexports and the MS
>>> lib
>>> >>> tool. I followed the steps outlined below:
>>> >>>
>>> >>> 1) create the DEF file (using pexports):
>>> >>> pexports csound32.dll.5.1 > csound32.def
>>> >>> 2) then create the lib file (using the MSVC lib tool):
>>> >>> lib /machine:i386  /def:csound32.def
>>> >>>
>>> >>> This all works fine but when I try to link to this .lib file I get
>>> a
>>> >>> whole load of unresolved errors:
>>> >>>
>>> >>> 1>ApplicationStartup.obj : error LNK2001: unresolved external
>>> symbol
>>> >>> _csoundGet0dBFS
>>> >>> 1>ApplicationStartup.obj : error LNK2001: unresolved external
>>> symbol
>>> >>> _csoundGetRtPlayUserData
>>> >>> 1>ApplicationStartup.obj : error LNK2001: unresolved external
>>> symbol
>>> >>> _csoundEnableMessageBuffer
>>> >>> 1>ApplicationStartup.obj : error LNK2001: unresolved external
>>> symbol
>>> >>> _csoundGetControlChannelParams
>>> >>> 1>ApplicationStartup.obj : error LNK2001: unresolved external
>>> symbol
>>> >>> _csoundTableGet
>>> >>> 1>ApplicationStartup.obj : error LNK2001: unresolved external
>>> symbol
>>> >>> _csoundSetDrawGraphCallback
>>> >>> 1>ApplicationStartup.obj : error LNK2001: unresolved external
>>> symbol
>>> >>> _csoundSetRecopenCallback
>>> >>> 1>ApplicationStartup.obj : error LNK2001: unresolved external
>>> symbol
>>> >>> _csoundGetMessageLevel
>>> >>> 1>ApplicationStartup.obj : error LNK2001: unresolved external
>>> symbol
>>> >>> _csoundKeyPress
>>> >>> 1>ApplicationStartup.obj : error LNK2001: unresolved external
>>> symbol
>>> >>> _csoundGetRtRecordUserData
>>> >>> (this is just a sample of the errors, I get 114 of them...)
>>> >>>
>>> >>> The import library is in the same folder as other libraries I use
>>> >>> which are all found. Anyone have any ideas?
>>> >>>
>>> >>> Rory.
>>> >>>
>>> >>>
>>> >>> Send bugs reports to this list.
>>> >>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>> "unsubscribe
>>> >>> csound"
>>> >>>
>>> >>
>>> >>
>>> >> --
>>> >> Michael Gogins
>>> >> Irreducible Productions
>>> >> http://www.michael-gogins.com
>>> >> Michael dot Gogins at gmail dot com
>>> >>
>>> >>
>>> >> Send bugs reports to this list.
>>> >> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>> "unsubscribe csound"
>>> >>
>>> >
>>>
>>>
>>> Send bugs reports to this list.
>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>> "unsubscribe csound"
>>
>>
>>
>> Send bugs reports to this list.
>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
>


Date2009-05-06 19:23
Fromvictor
Subject[Csnd] Re: Re: Re: Re: Re: creating a MSVC import lib for Visual Studio Express...
Try not to define MSVC...
----- Original Message ----- 
From: "Rory Walsh" 
To: 
Sent: Wednesday, May 06, 2009 5:11 PM
Subject: [Csnd] Re: Re: Re: Re: creating a MSVC import lib for Visual Studio 
Express...


Ok next thing is that I'm getting ambiguous symbols between the GUI
lib I'm using and some MSVC defines found in sysdep.h? Any ideas how I
can resolve these?

1>c:\mydocuments\sourcecode\csound5\csound5\h\csound.h(456) : error
C2872: 'int32' : ambiguous symbol
1>        could be
'c:\mydocuments\sourcecode\csound5\csound5\h\sysdep.h(53) : int int32'
1>        or
'c:\mydocuments\sourcecode\juce\src\juce_core\basics\juce_MathsFunctions.h(52)
: juce::int32'
1>c:\mydocuments\sourcecode\csound5\csound5\h\csound.h(459) : error
C2872: 'int32' : ambiguous symbol

The relavant section of the sysdep.h file is here:

#ifdef MSVC
typedef __int32 int32;
typedef __int16 int16;
typedef unsigned __int32 uint32;
typedef unsigned __int16 uint16;
#else

Rory.

2009/5/6 Rory Walsh :
> Adding them directly did the trick, thanks for that. It's been almost
> ten years since I used any MS IDEs, at times like this you gotta love
> the command line. Thanks again, I hope I don't hit any other snags!
>
> 2009/5/6 Andy Fillebrown :
>>
>> Hi Rory,
>>
>> I'm not sure exactly what the problems you're running into are, but it 
>> would seem that in addition to linking to csound32.dll.5.2 you also need 
>> to link to csnd.dll. Is this something you've already tried?
>>
>> ---
>>
>> In the IDE you can add the directory containing the libs globally in:
>> Tools -> Options -> Projects and Solutions -> VC++ Directories -> Show 
>> directories for (drop-down combo box on top right) -> Library files
>>
>> ...or you can add the directory to the project locally in:
>> Project -> Properties -> Configuration Properties -> Linker -> General -> 
>> Additional Library Directories
>>
>> Either way, you also need to add the 2 libraries by name in:
>> Project -> Properties -> Configuration Properties -> Linker -> Input -> 
>> Additional Dependencies
>>
>> If you add the librarys' directory globally or locally in the "Additional 
>> Library Directories" field you can just specify the library name without 
>> a path in the "Additional Dependencies" field. If you haven't added the 
>> librarys' directory to the IDE globally or locally then you need to 
>> specify the full path to each library in "Additional Dependencies".
>>
>> My preferred method is to add the directories to each project locally. It 
>> keeps things uncluttered in the tiny dialog boxes and it doesn't add an 
>> unused global library directory to search through if you're working on a 
>> project that doesn't need csound. The only drawback to adding the 
>> directory locally is that it has to be done for each new project that 
>> links to the csound libraries, which isn't that big a deal but is easy to 
>> overlook when creating a new project.
>>
>> The reason why the MS libraries only need the directory to be able to 
>> link up is because the MS libraries are automatically inherited by each 
>> project, as you can see if you expand the "Additional Dependencies" field 
>> using the "..." box.
>>
>> ---
>>
>> Anyway, I may be misunderstanding your question, but hopefully that 
>> helps.
>>
>> Regards,
>> -andy.f
>>
>>
>>
>> ----- "Rory Walsh"  wrote:
>>> The latest on this is that I can build using the csound.h header. At
>>> least I can create an instance of CSOUND without any problems. I only
>>> get these unresolved errors when I include the csound.hpp header file
>>> instead, this is without even creating or declaring a Csound() class.
>>> I've seen on the list that people have been able to get this going
>>> using the MS command line tools where you can specify exactly the lib
>>> to import. From the IDE it seems you need only include the directory
>>> to the .lib, does anyone know how to explicitly tell the IDE to import
>>> to a particular lib? Specifying the paths to library directories does
>>> however work with all my MS created libraries.
>>>
>>> Rory.
>>>
>>>
>>> 2009/5/5 Rory Walsh :
>>> > With regards to the export symbols? I tried editing the .def file to
>>> > add underscores but as it didn't work I didn't mention it in my
>>> > earlier post. Saying that should I add underscores to everything or
>>> > just the exports? Here's the first few lines from the def file:
>>> >
>>> > LIBRARY csound32.dll.5.2
>>> > EXPORTS
>>> > cscoreCopyEvent
>>> > cscoreCreateEvent
>>> > cscoreDefineEvent
>>> > cscoreFileClose
>>> > cscoreFileGetCurrent
>>> > cscoreFileOpen
>>> > cscoreFileSetCurrent
>>> > cscoreFreeEvent
>>> > cscoreGetEvent
>>> > cscoreListAppendEvent
>>> > cscoreListAppendList
>>> > cscoreListAppendStringEvent
>>> >
>>> > I tried adding some underscores to the exported functions but they
>>> > still showed up as unresolved.
>>> >
>>> > Rory.
>>> >
>>> >
>>> >
>>> > 2009/5/5 Michael Gogins :
>>> >> _x() versus x()?
>>> >>
>>> >> Regards,
>>> >> Mike
>>> >>
>>> >> On 5/5/09, Rory Walsh  wrote:
>>> >>> I know this has been discussed many times but I'm having problems
>>> >>> linking to an import library I created using pexports and the MS
>>> lib
>>> >>> tool. I followed the steps outlined below:
>>> >>>
>>> >>> 1) create the DEF file (using pexports):
>>> >>> pexports csound32.dll.5.1 > csound32.def
>>> >>> 2) then create the lib file (using the MSVC lib tool):
>>> >>> lib /machine:i386 /def:csound32.def
>>> >>>
>>> >>> This all works fine but when I try to link to this .lib file I get
>>> a
>>> >>> whole load of unresolved errors:
>>> >>>
>>> >>> 1>ApplicationStartup.obj : error LNK2001: unresolved external
>>> symbol
>>> >>> _csoundGet0dBFS
>>> >>> 1>ApplicationStartup.obj : error LNK2001: unresolved external
>>> symbol
>>> >>> _csoundGetRtPlayUserData
>>> >>> 1>ApplicationStartup.obj : error LNK2001: unresolved external
>>> symbol
>>> >>> _csoundEnableMessageBuffer
>>> >>> 1>ApplicationStartup.obj : error LNK2001: unresolved external
>>> symbol
>>> >>> _csoundGetControlChannelParams
>>> >>> 1>ApplicationStartup.obj : error LNK2001: unresolved external
>>> symbol
>>> >>> _csoundTableGet
>>> >>> 1>ApplicationStartup.obj : error LNK2001: unresolved external
>>> symbol
>>> >>> _csoundSetDrawGraphCallback
>>> >>> 1>ApplicationStartup.obj : error LNK2001: unresolved external
>>> symbol
>>> >>> _csoundSetRecopenCallback
>>> >>> 1>ApplicationStartup.obj : error LNK2001: unresolved external
>>> symbol
>>> >>> _csoundGetMessageLevel
>>> >>> 1>ApplicationStartup.obj : error LNK2001: unresolved external
>>> symbol
>>> >>> _csoundKeyPress
>>> >>> 1>ApplicationStartup.obj : error LNK2001: unresolved external
>>> symbol
>>> >>> _csoundGetRtRecordUserData
>>> >>> (this is just a sample of the errors, I get 114 of them...)
>>> >>>
>>> >>> The import library is in the same folder as other libraries I use
>>> >>> which are all found. Anyone have any ideas?
>>> >>>
>>> >>> Rory.
>>> >>>
>>> >>>
>>> >>> Send bugs reports to this list.
>>> >>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>> "unsubscribe
>>> >>> csound"
>>> >>>
>>> >>
>>> >>
>>> >> --
>>> >> Michael Gogins
>>> >> Irreducible Productions
>>> >> http://www.michael-gogins.com
>>> >> Michael dot Gogins at gmail dot com
>>> >>
>>> >>
>>> >> Send bugs reports to this list.
>>> >> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>> "unsubscribe csound"
>>> >>
>>> >
>>>
>>>
>>> Send bugs reports to this list.
>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>> "unsubscribe csound"
>>
>>
>>
>> Send bugs reports to this list.
>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe 
>> csound"
>


Send bugs reports to this list.
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe 
csound"= 


Date2009-05-06 19:50
FromRory Walsh
Subject[Csnd] Re: Re: Re: Re: Re: Re: creating a MSVC import lib for Visual Studio Express...
With that I was getting a could not find stdint.h.. so I tried using
-DMSVC. I'm getting close, once it's done it's done and hopefully
won't have to go messing around with these things again, I can't see
myself using MSVC for anything but this one project.

Rory.


2009/5/6 victor :
> Try not to define MSVC...
> ----- Original Message ----- From: "Rory Walsh" 
> To: 
> Sent: Wednesday, May 06, 2009 5:11 PM
> Subject: [Csnd] Re: Re: Re: Re: creating a MSVC import lib for Visual Studio
> Express...
>
>
> Ok next thing is that I'm getting ambiguous symbols between the GUI
> lib I'm using and some MSVC defines found in sysdep.h? Any ideas how I
> can resolve these?
>
> 1>c:\mydocuments\sourcecode\csound5\csound5\h\csound.h(456) : error
> C2872: 'int32' : ambiguous symbol
> 1>        could be
> 'c:\mydocuments\sourcecode\csound5\csound5\h\sysdep.h(53) : int int32'
> 1>        or
> 'c:\mydocuments\sourcecode\juce\src\juce_core\basics\juce_MathsFunctions.h(52)
> : juce::int32'
> 1>c:\mydocuments\sourcecode\csound5\csound5\h\csound.h(459) : error
> C2872: 'int32' : ambiguous symbol
>
> The relavant section of the sysdep.h file is here:
>
> #ifdef MSVC
> typedef __int32 int32;
> typedef __int16 int16;
> typedef unsigned __int32 uint32;
> typedef unsigned __int16 uint16;
> #else
>
> Rory.
>
> 2009/5/6 Rory Walsh :
>>
>> Adding them directly did the trick, thanks for that. It's been almost
>> ten years since I used any MS IDEs, at times like this you gotta love
>> the command line. Thanks again, I hope I don't hit any other snags!
>>
>> 2009/5/6 Andy Fillebrown :
>>>
>>> Hi Rory,
>>>
>>> I'm not sure exactly what the problems you're running into are, but it
>>> would seem that in addition to linking to csound32.dll.5.2 you also need to
>>> link to csnd.dll. Is this something you've already tried?
>>>
>>> ---
>>>
>>> In the IDE you can add the directory containing the libs globally in:
>>> Tools -> Options -> Projects and Solutions -> VC++ Directories -> Show
>>> directories for (drop-down combo box on top right) -> Library files
>>>
>>> ...or you can add the directory to the project locally in:
>>> Project -> Properties -> Configuration Properties -> Linker -> General ->
>>> Additional Library Directories
>>>
>>> Either way, you also need to add the 2 libraries by name in:
>>> Project -> Properties -> Configuration Properties -> Linker -> Input ->
>>> Additional Dependencies
>>>
>>> If you add the librarys' directory globally or locally in the "Additional
>>> Library Directories" field you can just specify the library name without a
>>> path in the "Additional Dependencies" field. If you haven't added the
>>> librarys' directory to the IDE globally or locally then you need to specify
>>> the full path to each library in "Additional Dependencies".
>>>
>>> My preferred method is to add the directories to each project locally. It
>>> keeps things uncluttered in the tiny dialog boxes and it doesn't add an
>>> unused global library directory to search through if you're working on a
>>> project that doesn't need csound. The only drawback to adding the directory
>>> locally is that it has to be done for each new project that links to the
>>> csound libraries, which isn't that big a deal but is easy to overlook when
>>> creating a new project.
>>>
>>> The reason why the MS libraries only need the directory to be able to
>>> link up is because the MS libraries are automatically inherited by each
>>> project, as you can see if you expand the "Additional Dependencies" field
>>> using the "..." box.
>>>
>>> ---
>>>
>>> Anyway, I may be misunderstanding your question, but hopefully that
>>> helps.
>>>
>>> Regards,
>>> -andy.f
>>>
>>>
>>>
>>> ----- "Rory Walsh"  wrote:
>>>>
>>>> The latest on this is that I can build using the csound.h header. At
>>>> least I can create an instance of CSOUND without any problems. I only
>>>> get these unresolved errors when I include the csound.hpp header file
>>>> instead, this is without even creating or declaring a Csound() class.
>>>> I've seen on the list that people have been able to get this going
>>>> using the MS command line tools where you can specify exactly the lib
>>>> to import. From the IDE it seems you need only include the directory
>>>> to the .lib, does anyone know how to explicitly tell the IDE to import
>>>> to a particular lib? Specifying the paths to library directories does
>>>> however work with all my MS created libraries.
>>>>
>>>> Rory.
>>>>
>>>>
>>>> 2009/5/5 Rory Walsh :
>>>> > With regards to the export symbols? I tried editing the .def file to
>>>> > add underscores but as it didn't work I didn't mention it in my
>>>> > earlier post. Saying that should I add underscores to everything or
>>>> > just the exports? Here's the first few lines from the def file:
>>>> >
>>>> > LIBRARY csound32.dll.5.2
>>>> > EXPORTS
>>>> > cscoreCopyEvent
>>>> > cscoreCreateEvent
>>>> > cscoreDefineEvent
>>>> > cscoreFileClose
>>>> > cscoreFileGetCurrent
>>>> > cscoreFileOpen
>>>> > cscoreFileSetCurrent
>>>> > cscoreFreeEvent
>>>> > cscoreGetEvent
>>>> > cscoreListAppendEvent
>>>> > cscoreListAppendList
>>>> > cscoreListAppendStringEvent
>>>> >
>>>> > I tried adding some underscores to the exported functions but they
>>>> > still showed up as unresolved.
>>>> >
>>>> > Rory.
>>>> >
>>>> >
>>>> >
>>>> > 2009/5/5 Michael Gogins :
>>>> >> _x() versus x()?
>>>> >>
>>>> >> Regards,
>>>> >> Mike
>>>> >>
>>>> >> On 5/5/09, Rory Walsh  wrote:
>>>> >>> I know this has been discussed many times but I'm having problems
>>>> >>> linking to an import library I created using pexports and the MS
>>>> lib
>>>> >>> tool. I followed the steps outlined below:
>>>> >>>
>>>> >>> 1) create the DEF file (using pexports):
>>>> >>> pexports csound32.dll.5.1 > csound32.def
>>>> >>> 2) then create the lib file (using the MSVC lib tool):
>>>> >>> lib /machine:i386 /def:csound32.def
>>>> >>>
>>>> >>> This all works fine but when I try to link to this .lib file I get
>>>> a
>>>> >>> whole load of unresolved errors:
>>>> >>>
>>>> >>> 1>ApplicationStartup.obj : error LNK2001: unresolved external
>>>> symbol
>>>> >>> _csoundGet0dBFS
>>>> >>> 1>ApplicationStartup.obj : error LNK2001: unresolved external
>>>> symbol
>>>> >>> _csoundGetRtPlayUserData
>>>> >>> 1>ApplicationStartup.obj : error LNK2001: unresolved external
>>>> symbol
>>>> >>> _csoundEnableMessageBuffer
>>>> >>> 1>ApplicationStartup.obj : error LNK2001: unresolved external
>>>> symbol
>>>> >>> _csoundGetControlChannelParams
>>>> >>> 1>ApplicationStartup.obj : error LNK2001: unresolved external
>>>> symbol
>>>> >>> _csoundTableGet
>>>> >>> 1>ApplicationStartup.obj : error LNK2001: unresolved external
>>>> symbol
>>>> >>> _csoundSetDrawGraphCallback
>>>> >>> 1>ApplicationStartup.obj : error LNK2001: unresolved external
>>>> symbol
>>>> >>> _csoundSetRecopenCallback
>>>> >>> 1>ApplicationStartup.obj : error LNK2001: unresolved external
>>>> symbol
>>>> >>> _csoundGetMessageLevel
>>>> >>> 1>ApplicationStartup.obj : error LNK2001: unresolved external
>>>> symbol
>>>> >>> _csoundKeyPress
>>>> >>> 1>ApplicationStartup.obj : error LNK2001: unresolved external
>>>> symbol
>>>> >>> _csoundGetRtRecordUserData
>>>> >>> (this is just a sample of the errors, I get 114 of them...)
>>>> >>>
>>>> >>> The import library is in the same folder as other libraries I use
>>>> >>> which are all found. Anyone have any ideas?
>>>> >>>
>>>> >>> Rory.
>>>> >>>
>>>> >>>
>>>> >>> Send bugs reports to this list.
>>>> >>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>>> "unsubscribe
>>>> >>> csound"
>>>> >>>
>>>> >>
>>>> >>
>>>> >> --
>>>> >> Michael Gogins
>>>> >> Irreducible Productions
>>>> >> http://www.michael-gogins.com
>>>> >> Michael dot Gogins at gmail dot com
>>>> >>
>>>> >>
>>>> >> Send bugs reports to this list.
>>>> >> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>>> "unsubscribe csound"
>>>> >>
>>>> >
>>>>
>>>>
>>>> Send bugs reports to this list.
>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>>> "unsubscribe csound"
>>>
>>>
>>>
>>> Send bugs reports to this list.
>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
>>> csound"
>>
>
>
> Send bugs reports to this list.
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
> csound"=
>
>
> Send bugs reports to this list.
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
> csound"
>


Date2009-05-06 20:49
Fromvictor
Subject[Csnd] Re: Re: Re: Re: Re: Re: Re: creating a MSVC import lib for Visual Studio Express...
you may as well try and find a stdint.h (say from mingw) and put it with
the other headers).
----- Original Message ----- 
From: "Rory Walsh" 
To: 
Sent: Wednesday, May 06, 2009 7:50 PM
Subject: [Csnd] Re: Re: Re: Re: Re: Re: creating a MSVC import lib for 
Visual Studio Express...


With that I was getting a could not find stdint.h.. so I tried using
-DMSVC. I'm getting close, once it's done it's done and hopefully
won't have to go messing around with these things again, I can't see
myself using MSVC for anything but this one project.

Rory.


2009/5/6 victor :
> Try not to define MSVC...
> ----- Original Message ----- From: "Rory Walsh" 
> To: 
> Sent: Wednesday, May 06, 2009 5:11 PM
> Subject: [Csnd] Re: Re: Re: Re: creating a MSVC import lib for Visual 
> Studio
> Express...
>
>
> Ok next thing is that I'm getting ambiguous symbols between the GUI
> lib I'm using and some MSVC defines found in sysdep.h? Any ideas how I
> can resolve these?
>
> 1>c:\mydocuments\sourcecode\csound5\csound5\h\csound.h(456) : error
> C2872: 'int32' : ambiguous symbol
> 1> could be
> 'c:\mydocuments\sourcecode\csound5\csound5\h\sysdep.h(53) : int int32'
> 1> or
> 'c:\mydocuments\sourcecode\juce\src\juce_core\basics\juce_MathsFunctions.h(52)
> : juce::int32'
> 1>c:\mydocuments\sourcecode\csound5\csound5\h\csound.h(459) : error
> C2872: 'int32' : ambiguous symbol
>
> The relavant section of the sysdep.h file is here:
>
> #ifdef MSVC
> typedef __int32 int32;
> typedef __int16 int16;
> typedef unsigned __int32 uint32;
> typedef unsigned __int16 uint16;
> #else
>
> Rory.
>
> 2009/5/6 Rory Walsh :
>>
>> Adding them directly did the trick, thanks for that. It's been almost
>> ten years since I used any MS IDEs, at times like this you gotta love
>> the command line. Thanks again, I hope I don't hit any other snags!
>>
>> 2009/5/6 Andy Fillebrown :
>>>
>>> Hi Rory,
>>>
>>> I'm not sure exactly what the problems you're running into are, but it
>>> would seem that in addition to linking to csound32.dll.5.2 you also need 
>>> to
>>> link to csnd.dll. Is this something you've already tried?
>>>
>>> ---
>>>
>>> In the IDE you can add the directory containing the libs globally in:
>>> Tools -> Options -> Projects and Solutions -> VC++ Directories -> Show
>>> directories for (drop-down combo box on top right) -> Library files
>>>
>>> ...or you can add the directory to the project locally in:
>>> Project -> Properties -> Configuration Properties -> Linker -> 
>>> General ->
>>> Additional Library Directories
>>>
>>> Either way, you also need to add the 2 libraries by name in:
>>> Project -> Properties -> Configuration Properties -> Linker -> Input ->
>>> Additional Dependencies
>>>
>>> If you add the librarys' directory globally or locally in the 
>>> "Additional
>>> Library Directories" field you can just specify the library name without 
>>> a
>>> path in the "Additional Dependencies" field. If you haven't added the
>>> librarys' directory to the IDE globally or locally then you need to 
>>> specify
>>> the full path to each library in "Additional Dependencies".
>>>
>>> My preferred method is to add the directories to each project locally. 
>>> It
>>> keeps things uncluttered in the tiny dialog boxes and it doesn't add an
>>> unused global library directory to search through if you're working on a
>>> project that doesn't need csound. The only drawback to adding the 
>>> directory
>>> locally is that it has to be done for each new project that links to the
>>> csound libraries, which isn't that big a deal but is easy to overlook 
>>> when
>>> creating a new project.
>>>
>>> The reason why the MS libraries only need the directory to be able to
>>> link up is because the MS libraries are automatically inherited by each
>>> project, as you can see if you expand the "Additional Dependencies" 
>>> field
>>> using the "..." box.
>>>
>>> ---
>>>
>>> Anyway, I may be misunderstanding your question, but hopefully that
>>> helps.
>>>
>>> Regards,
>>> -andy.f
>>>
>>>
>>>
>>> ----- "Rory Walsh"  wrote:
>>>>
>>>> The latest on this is that I can build using the csound.h header. At
>>>> least I can create an instance of CSOUND without any problems. I only
>>>> get these unresolved errors when I include the csound.hpp header file
>>>> instead, this is without even creating or declaring a Csound() class.
>>>> I've seen on the list that people have been able to get this going
>>>> using the MS command line tools where you can specify exactly the lib
>>>> to import. From the IDE it seems you need only include the directory
>>>> to the .lib, does anyone know how to explicitly tell the IDE to import
>>>> to a particular lib? Specifying the paths to library directories does
>>>> however work with all my MS created libraries.
>>>>
>>>> Rory.
>>>>
>>>>
>>>> 2009/5/5 Rory Walsh :
>>>> > With regards to the export symbols? I tried editing the .def file to
>>>> > add underscores but as it didn't work I didn't mention it in my
>>>> > earlier post. Saying that should I add underscores to everything or
>>>> > just the exports? Here's the first few lines from the def file:
>>>> >
>>>> > LIBRARY csound32.dll.5.2
>>>> > EXPORTS
>>>> > cscoreCopyEvent
>>>> > cscoreCreateEvent
>>>> > cscoreDefineEvent
>>>> > cscoreFileClose
>>>> > cscoreFileGetCurrent
>>>> > cscoreFileOpen
>>>> > cscoreFileSetCurrent
>>>> > cscoreFreeEvent
>>>> > cscoreGetEvent
>>>> > cscoreListAppendEvent
>>>> > cscoreListAppendList
>>>> > cscoreListAppendStringEvent
>>>> >
>>>> > I tried adding some underscores to the exported functions but they
>>>> > still showed up as unresolved.
>>>> >
>>>> > Rory.
>>>> >
>>>> >
>>>> >
>>>> > 2009/5/5 Michael Gogins :
>>>> >> _x() versus x()?
>>>> >>
>>>> >> Regards,
>>>> >> Mike
>>>> >>
>>>> >> On 5/5/09, Rory Walsh  wrote:
>>>> >>> I know this has been discussed many times but I'm having problems
>>>> >>> linking to an import library I created using pexports and the MS
>>>> lib
>>>> >>> tool. I followed the steps outlined below:
>>>> >>>
>>>> >>> 1) create the DEF file (using pexports):
>>>> >>> pexports csound32.dll.5.1 > csound32.def
>>>> >>> 2) then create the lib file (using the MSVC lib tool):
>>>> >>> lib /machine:i386 /def:csound32.def
>>>> >>>
>>>> >>> This all works fine but when I try to link to this .lib file I get
>>>> a
>>>> >>> whole load of unresolved errors:
>>>> >>>
>>>> >>> 1>ApplicationStartup.obj : error LNK2001: unresolved external
>>>> symbol
>>>> >>> _csoundGet0dBFS
>>>> >>> 1>ApplicationStartup.obj : error LNK2001: unresolved external
>>>> symbol
>>>> >>> _csoundGetRtPlayUserData
>>>> >>> 1>ApplicationStartup.obj : error LNK2001: unresolved external
>>>> symbol
>>>> >>> _csoundEnableMessageBuffer
>>>> >>> 1>ApplicationStartup.obj : error LNK2001: unresolved external
>>>> symbol
>>>> >>> _csoundGetControlChannelParams
>>>> >>> 1>ApplicationStartup.obj : error LNK2001: unresolved external
>>>> symbol
>>>> >>> _csoundTableGet
>>>> >>> 1>ApplicationStartup.obj : error LNK2001: unresolved external
>>>> symbol
>>>> >>> _csoundSetDrawGraphCallback
>>>> >>> 1>ApplicationStartup.obj : error LNK2001: unresolved external
>>>> symbol
>>>> >>> _csoundSetRecopenCallback
>>>> >>> 1>ApplicationStartup.obj : error LNK2001: unresolved external
>>>> symbol
>>>> >>> _csoundGetMessageLevel
>>>> >>> 1>ApplicationStartup.obj : error LNK2001: unresolved external
>>>> symbol
>>>> >>> _csoundKeyPress
>>>> >>> 1>ApplicationStartup.obj : error LNK2001: unresolved external
>>>> symbol
>>>> >>> _csoundGetRtRecordUserData
>>>> >>> (this is just a sample of the errors, I get 114 of them...)
>>>> >>>
>>>> >>> The import library is in the same folder as other libraries I use
>>>> >>> which are all found. Anyone have any ideas?
>>>> >>>
>>>> >>> Rory.
>>>> >>>
>>>> >>>
>>>> >>> Send bugs reports to this list.
>>>> >>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>>> "unsubscribe
>>>> >>> csound"
>>>> >>>
>>>> >>
>>>> >>
>>>> >> --
>>>> >> Michael Gogins
>>>> >> Irreducible Productions
>>>> >> http://www.michael-gogins.com
>>>> >> Michael dot Gogins at gmail dot com
>>>> >>
>>>> >>
>>>> >> Send bugs reports to this list.
>>>> >> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>>> "unsubscribe csound"
>>>> >>
>>>> >
>>>>
>>>>
>>>> Send bugs reports to this list.
>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>>> "unsubscribe csound"
>>>
>>>
>>>
>>> Send bugs reports to this list.
>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
>>> csound"
>>
>
>
> Send bugs reports to this list.
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
> csound"=
>
>
> Send bugs reports to this list.
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
> csound"
>


Send bugs reports to this list.
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe 
csound"= 


Date2009-05-06 22:24
FromRory Walsh
Subject[Csnd] Re: Re: Re: Re: Re: Re: Re: Re: creating a MSVC import lib for Visual Studio Express...
I'm assuming that the problem is caused by the juce library having the
same typedefs in one of its header files. So I left in the MSVC and
commented out the typedefs in sysdep.h and it now gets much further, I
get on unresovled symbol about csPerfThread:

1>ApplicationStartup.obj : error LNK2001: unresolved external symbol
"public: __thiscall
CsoundPerformanceThread::CsoundPerformanceThread(class Csound *)" (??

Normally I would just include csPerfThread.cpp to my project and build
it, without linking to csnd.dll but when I try that here I get the
following, I've only included a sample, you get the idea:

1>c:\mydocuments\sourcecode\csound5\csound5\h\csound.h(456) : error
C2146: syntax error : missing ';' before identifier 'N'
1>c:\mydocuments\sourcecode\csound5\csound5\h\csound.h(456) : error
C4430: missing type specifier - int assumed. Note: C++ does not
support default-int
1>c:\mydocuments\sourcecode\csound5\csound5\h\csound.h(456) : error
C4430: missing type specifier - int assumed. Note: C++ does not
support default-int
1>c:\mydocuments\sourcecode\csound5\csound5\h\csound.h(459) : error
C2146: syntax error : missing ';' before identifier 'NB'
1>c:\mydocuments\sourcecode\csound5\csound5\h\csound.h(459) : error
C4430: missing type specifier - int assumed. Note: C++ does not
support default-int
1>c:\mydocuments\sourcecode\csound5\csound5\h\csound.h(459) : error
C4430: missing type specifier - int assumed. Note: C++ does not
support default-int

Which are immediately followed by lot of these:
1>C:\Program Files\Microsoft Visual Studio 9.0\VC\include\ivec.h(96) :
warning C4190: '&' has C-linkage specified, but returns UDT 'M64'
which is incompatible with C
1>        C:\Program Files\Microsoft Visual Studio
9.0\VC\include\ivec.h(77) : see declaration of 'M64'
1>C:\Program Files\Microsoft Visual Studio 9.0\VC\include\ivec.h(97) :
warning C4190: '|' has C-linkage specified, but returns UDT 'M64'
which is incompatible with C
1>        C:\Program Files\Microsoft Visual Studio
9.0\VC\include\ivec.h(77) : see declaration of 'M64'
1>C:\Program Files\Microsoft Visual Studio 9.0\VC\include\ivec.h(98) :
warning C4190: '^' has C-linkage specified, but returns UDT 'M64'
which is incompatible with C
1>        C:\Program Files\Microsoft Visual Studio
9.0\VC\include\ivec.h(77) : see declaration of 'M64'
1>C:\Program Files\Microsoft Visual Studio 9.0\VC\include\ivec.h(99) :
warning C4190: 'andnot' has C-linkage specified, but returns UDT 'M64'
which is incompatible with C
1>        C:\Program Files\Microsoft Visual Studio
9.0\VC\include\ivec.h(77) : see declaration of 'M64'
1>C:\Program Files\Microsoft Visual Studio 9.0\VC\include\ivec.h(162)
: warning C4190: 'cmpeq' has C-linkage specified, but returns UDT
'I32vec2' which is incompatible with C
1>        C:\Program Files\Microsoft Visual Studio
9.0\VC\include\ivec.h(133) : see declaration of 'I32vec2'
1>C:\Program Files\Microsoft Visual Studio 9.0\VC\include\ivec.h(163)
: warning C4190: 'cmpneq' has C-linkage specified, but returns UDT
'I32vec2' which is incompatible with C
1>        C:\Program Files\Microsoft Visual Studio
9.0\VC\include\ivec.h(133) : see declaration of 'I32vec2'
1>C:\Program Files\Microsoft Visual Studio 9.0\VC\include\ivec.h(165)
: warning C4190: 'unpack_low' has C-linkage specified, but returns UDT
'I32vec2' which is incompatible with C
1>        C:\Program Files\Microsoft Visual Studio
9.0\VC\include\ivec.h(133) : see declaration of 'I32vec2'
1>C:\Program Files\Microsoft Visual Studio 9.0\VC\include\ivec.h(166)
: warning C4190: 'unpack_high' has C-linkage specified, but returns
UDT 'I32vec2' which is incompatible with C

The section of Csound.h referenced is from here:

  typedef struct pvsdat_ext {
        int32            N;
#ifndef OLPC
        int             sliding; /* Flag to indicate sliding case */
        int32           NB;
#endif
        int32           overlap;
        int32           winsize;
        int             wintype;
        int32           format;
        uint32          framecount;
        float*          frame;
 } PVSDATEXT;

If I commet that section out I get the 'missing type specifier '
errors from above, instead I just get more of these errors:

1>        C:\Program Files\Microsoft Visual Studio
9.0\VC\include\ivec.h(133) : see declaration of 'I32vec2'
1>C:\Program Files\Microsoft Visual Studio 9.0\VC\include\ivec.h(233)
: warning C4190: 'cmpeq' has C-linkage specified, but returns UDT
'Is32vec2' which is incompatible with C
1>        C:\Program Files\Microsoft Visual Studio
9.0\VC\include\ivec.h(171) : see declaration of 'Is32vec2'
1>C:\Program Files\Microsoft Visual Studio 9.0\VC\include\ivec.h(233)
: error C2733: second C linkage of overloaded function 'cmpeq' not
allowed

I think I'm back to square one. Unless of I try to work without the
thread class which I might not need. I was just curious to see if it
would work. I must try a simple non-threading example and see if it
works...I'll report back shortly. Some win for Barcalona tonight! Good
match.

Rory.

Date2009-05-06 23:07
FromRory Walsh
Subject[Csnd] Re: Re: Re: Re: Re: Re: Re: Re: creating a MSVC import lib for Visual Studio Express...
Just to follow up on that. It does run without the threading class,
both using the Csound class and the C style STRUCT. Compile fails when
executed from the IDE, it's probably looking in the wrong place for
the csd. I can just use JUCEs native audio IO class and run Csound as
a plugin through them, that way I won't need the threading class at
all. Thankfully I leave these horrid mess or errors behind me. On the
other hand if anyone wants me to try anything they think might
alleviate the errors please feel free to make suggestions.

Rory.

Date2009-05-06 23:22
FromAndy Fillebrown
Subject[Csnd] Re: Re: Re: Re: Re: Re: Re: Re: Re: creating a MSVC import lib for Visual Studio Express...
The typedef errors are because they were commented out in sysdep.h -- just swap the changes to the juice header.  I'm not sure about the linkage warnings, but it sounds like csPerfThread.cpp is being included from a .c module and __cplusplus isn't defined.

-af



----- "Rory Walsh"  wrote:
> I'm assuming that the problem is caused by the juce library having
> the
> same typedefs in one of its header files. So I left in the MSVC and
> commented out the typedefs in sysdep.h and it now gets much further,
> I
> get on unresovled symbol about csPerfThread:
> 
> 1>ApplicationStartup.obj : error LNK2001: unresolved external symbol
> "public: __thiscall
> CsoundPerformanceThread::CsoundPerformanceThread(class Csound *)" (??
> 
> Normally I would just include csPerfThread.cpp to my project and
> build
> it, without linking to csnd.dll but when I try that here I get the
> following, I've only included a sample, you get the idea:
> 
> 1>c:\mydocuments\sourcecode\csound5\csound5\h\csound.h(456) : error
> C2146: syntax error : missing ';' before identifier 'N'
> 1>c:\mydocuments\sourcecode\csound5\csound5\h\csound.h(456) : error
> C4430: missing type specifier - int assumed. Note: C++ does not
> support default-int
> 1>c:\mydocuments\sourcecode\csound5\csound5\h\csound.h(456) : error
> C4430: missing type specifier - int assumed. Note: C++ does not
> support default-int
> 1>c:\mydocuments\sourcecode\csound5\csound5\h\csound.h(459) : error
> C2146: syntax error : missing ';' before identifier 'NB'
> 1>c:\mydocuments\sourcecode\csound5\csound5\h\csound.h(459) : error
> C4430: missing type specifier - int assumed. Note: C++ does not
> support default-int
> 1>c:\mydocuments\sourcecode\csound5\csound5\h\csound.h(459) : error
> C4430: missing type specifier - int assumed. Note: C++ does not
> support default-int
> 
> Which are immediately followed by lot of these:
> 1>C:\Program Files\Microsoft Visual Studio 9.0\VC\include\ivec.h(96)
> :
> warning C4190: '&' has C-linkage specified, but returns UDT 'M64'
> which is incompatible with C
> 1>        C:\Program Files\Microsoft Visual Studio
> 9.0\VC\include\ivec.h(77) : see declaration of 'M64'
> 1>C:\Program Files\Microsoft Visual Studio 9.0\VC\include\ivec.h(97)
> :
> warning C4190: '|' has C-linkage specified, but returns UDT 'M64'
> which is incompatible with C
> 1>        C:\Program Files\Microsoft Visual Studio
> 9.0\VC\include\ivec.h(77) : see declaration of 'M64'
> 1>C:\Program Files\Microsoft Visual Studio 9.0\VC\include\ivec.h(98)
> :
> warning C4190: '^' has C-linkage specified, but returns UDT 'M64'
> which is incompatible with C
> 1>        C:\Program Files\Microsoft Visual Studio
> 9.0\VC\include\ivec.h(77) : see declaration of 'M64'
> 1>C:\Program Files\Microsoft Visual Studio 9.0\VC\include\ivec.h(99)
> :
> warning C4190: 'andnot' has C-linkage specified, but returns UDT
> 'M64'
> which is incompatible with C
> 1>        C:\Program Files\Microsoft Visual Studio
> 9.0\VC\include\ivec.h(77) : see declaration of 'M64'
> 1>C:\Program Files\Microsoft Visual Studio 9.0\VC\include\ivec.h(162)
> : warning C4190: 'cmpeq' has C-linkage specified, but returns UDT
> 'I32vec2' which is incompatible with C
> 1>        C:\Program Files\Microsoft Visual Studio
> 9.0\VC\include\ivec.h(133) : see declaration of 'I32vec2'
> 1>C:\Program Files\Microsoft Visual Studio 9.0\VC\include\ivec.h(163)
> : warning C4190: 'cmpneq' has C-linkage specified, but returns UDT
> 'I32vec2' which is incompatible with C
> 1>        C:\Program Files\Microsoft Visual Studio
> 9.0\VC\include\ivec.h(133) : see declaration of 'I32vec2'
> 1>C:\Program Files\Microsoft Visual Studio 9.0\VC\include\ivec.h(165)
> : warning C4190: 'unpack_low' has C-linkage specified, but returns
> UDT
> 'I32vec2' which is incompatible with C
> 1>        C:\Program Files\Microsoft Visual Studio
> 9.0\VC\include\ivec.h(133) : see declaration of 'I32vec2'
> 1>C:\Program Files\Microsoft Visual Studio 9.0\VC\include\ivec.h(166)
> : warning C4190: 'unpack_high' has C-linkage specified, but returns
> UDT 'I32vec2' which is incompatible with C
> 
> The section of Csound.h referenced is from here:
> 
>   typedef struct pvsdat_ext {
>         int32            N;
> #ifndef OLPC
>         int             sliding; /* Flag to indicate sliding case */
>         int32           NB;
> #endif
>         int32           overlap;
>         int32           winsize;
>         int             wintype;
>         int32           format;
>         uint32          framecount;
>         float*          frame;
>  } PVSDATEXT;
> 
> If I commet that section out I get the 'missing type specifier '
> errors from above, instead I just get more of these errors:
> 
> 1>        C:\Program Files\Microsoft Visual Studio
> 9.0\VC\include\ivec.h(133) : see declaration of 'I32vec2'
> 1>C:\Program Files\Microsoft Visual Studio 9.0\VC\include\ivec.h(233)
> : warning C4190: 'cmpeq' has C-linkage specified, but returns UDT
> 'Is32vec2' which is incompatible with C
> 1>        C:\Program Files\Microsoft Visual Studio
> 9.0\VC\include\ivec.h(171) : see declaration of 'Is32vec2'
> 1>C:\Program Files\Microsoft Visual Studio 9.0\VC\include\ivec.h(233)
> : error C2733: second C linkage of overloaded function 'cmpeq' not
> allowed
> 
> I think I'm back to square one. Unless of I try to work without the
> thread class which I might not need. I was just curious to see if it
> would work. I must try a simple non-threading example and see if it
> works...I'll report back shortly. Some win for Barcalona tonight!
> Good
> match.
> 
> Rory.
> 
> 
> Send bugs reports to this list.
> To unsubscribe, send email sympa@lists.bath.ac.uk with body
> "unsubscribe csound"


Date2009-05-07 00:41
FromRory Walsh
Subject[Csnd] Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: creating a MSVC import lib for Visual Studio Express...
Thanks, I'll try that tomorrow and let you know how I get on.

Rory.


2009/5/6 Andy Fillebrown :
>
> The typedef errors are because they were commented out in sysdep.h -- just swap the changes to the juice header.  I'm not sure about the linkage warnings, but it sounds like csPerfThread.cpp is being included from a .c module and __cplusplus isn't defined.
>
> -af
>
>
>
> ----- "Rory Walsh"  wrote:
>> I'm assuming that the problem is caused by the juce library having
>> the
>> same typedefs in one of its header files. So I left in the MSVC and
>> commented out the typedefs in sysdep.h and it now gets much further,
>> I
>> get on unresovled symbol about csPerfThread:
>>
>> 1>ApplicationStartup.obj : error LNK2001: unresolved external symbol
>> "public: __thiscall
>> CsoundPerformanceThread::CsoundPerformanceThread(class Csound *)" (??
>>
>> Normally I would just include csPerfThread.cpp to my project and
>> build
>> it, without linking to csnd.dll but when I try that here I get the
>> following, I've only included a sample, you get the idea:
>>
>> 1>c:\mydocuments\sourcecode\csound5\csound5\h\csound.h(456) : error
>> C2146: syntax error : missing ';' before identifier 'N'
>> 1>c:\mydocuments\sourcecode\csound5\csound5\h\csound.h(456) : error
>> C4430: missing type specifier - int assumed. Note: C++ does not
>> support default-int
>> 1>c:\mydocuments\sourcecode\csound5\csound5\h\csound.h(456) : error
>> C4430: missing type specifier - int assumed. Note: C++ does not
>> support default-int
>> 1>c:\mydocuments\sourcecode\csound5\csound5\h\csound.h(459) : error
>> C2146: syntax error : missing ';' before identifier 'NB'
>> 1>c:\mydocuments\sourcecode\csound5\csound5\h\csound.h(459) : error
>> C4430: missing type specifier - int assumed. Note: C++ does not
>> support default-int
>> 1>c:\mydocuments\sourcecode\csound5\csound5\h\csound.h(459) : error
>> C4430: missing type specifier - int assumed. Note: C++ does not
>> support default-int
>>
>> Which are immediately followed by lot of these:
>> 1>C:\Program Files\Microsoft Visual Studio 9.0\VC\include\ivec.h(96)
>> :
>> warning C4190: '&' has C-linkage specified, but returns UDT 'M64'
>> which is incompatible with C
>> 1>        C:\Program Files\Microsoft Visual Studio
>> 9.0\VC\include\ivec.h(77) : see declaration of 'M64'
>> 1>C:\Program Files\Microsoft Visual Studio 9.0\VC\include\ivec.h(97)
>> :
>> warning C4190: '|' has C-linkage specified, but returns UDT 'M64'
>> which is incompatible with C
>> 1>        C:\Program Files\Microsoft Visual Studio
>> 9.0\VC\include\ivec.h(77) : see declaration of 'M64'
>> 1>C:\Program Files\Microsoft Visual Studio 9.0\VC\include\ivec.h(98)
>> :
>> warning C4190: '^' has C-linkage specified, but returns UDT 'M64'
>> which is incompatible with C
>> 1>        C:\Program Files\Microsoft Visual Studio
>> 9.0\VC\include\ivec.h(77) : see declaration of 'M64'
>> 1>C:\Program Files\Microsoft Visual Studio 9.0\VC\include\ivec.h(99)
>> :
>> warning C4190: 'andnot' has C-linkage specified, but returns UDT
>> 'M64'
>> which is incompatible with C
>> 1>        C:\Program Files\Microsoft Visual Studio
>> 9.0\VC\include\ivec.h(77) : see declaration of 'M64'
>> 1>C:\Program Files\Microsoft Visual Studio 9.0\VC\include\ivec.h(162)
>> : warning C4190: 'cmpeq' has C-linkage specified, but returns UDT
>> 'I32vec2' which is incompatible with C
>> 1>        C:\Program Files\Microsoft Visual Studio
>> 9.0\VC\include\ivec.h(133) : see declaration of 'I32vec2'
>> 1>C:\Program Files\Microsoft Visual Studio 9.0\VC\include\ivec.h(163)
>> : warning C4190: 'cmpneq' has C-linkage specified, but returns UDT
>> 'I32vec2' which is incompatible with C
>> 1>        C:\Program Files\Microsoft Visual Studio
>> 9.0\VC\include\ivec.h(133) : see declaration of 'I32vec2'
>> 1>C:\Program Files\Microsoft Visual Studio 9.0\VC\include\ivec.h(165)
>> : warning C4190: 'unpack_low' has C-linkage specified, but returns
>> UDT
>> 'I32vec2' which is incompatible with C
>> 1>        C:\Program Files\Microsoft Visual Studio
>> 9.0\VC\include\ivec.h(133) : see declaration of 'I32vec2'
>> 1>C:\Program Files\Microsoft Visual Studio 9.0\VC\include\ivec.h(166)
>> : warning C4190: 'unpack_high' has C-linkage specified, but returns
>> UDT 'I32vec2' which is incompatible with C
>>
>> The section of Csound.h referenced is from here:
>>
>>   typedef struct pvsdat_ext {
>>         int32            N;
>> #ifndef OLPC
>>         int             sliding; /* Flag to indicate sliding case */
>>         int32           NB;
>> #endif
>>         int32           overlap;
>>         int32           winsize;
>>         int             wintype;
>>         int32           format;
>>         uint32          framecount;
>>         float*          frame;
>>  } PVSDATEXT;
>>
>> If I commet that section out I get the 'missing type specifier '
>> errors from above, instead I just get more of these errors:
>>
>> 1>        C:\Program Files\Microsoft Visual Studio
>> 9.0\VC\include\ivec.h(133) : see declaration of 'I32vec2'
>> 1>C:\Program Files\Microsoft Visual Studio 9.0\VC\include\ivec.h(233)
>> : warning C4190: 'cmpeq' has C-linkage specified, but returns UDT
>> 'Is32vec2' which is incompatible with C
>> 1>        C:\Program Files\Microsoft Visual Studio
>> 9.0\VC\include\ivec.h(171) : see declaration of 'Is32vec2'
>> 1>C:\Program Files\Microsoft Visual Studio 9.0\VC\include\ivec.h(233)
>> : error C2733: second C linkage of overloaded function 'cmpeq' not
>> allowed
>>
>> I think I'm back to square one. Unless of I try to work without the
>> thread class which I might not need. I was just curious to see if it
>> would work. I must try a simple non-threading example and see if it
>> works...I'll report back shortly. Some win for Barcalona tonight!
>> Good
>> match.
>>
>> Rory.
>>
>>
>> Send bugs reports to this list.
>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>> "unsubscribe csound"
>
>
>
> Send bugs reports to this list.
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
>


Date2009-05-07 08:53
FromRory Walsh
Subject[Csnd] Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: creating a MSVC import lib for Visual Studio Express...
Hi Andy. I tried making those changes in the juce header but it still
led to errors. For now it seems that commenting out the MSVC section
while using -DMSVC is enough to get me over this hurdle. Hopefully
I'll learn more about all this as I continue my work on the project
and eventually I might come up with a more eloquent solution. Thanks
again for your help on this..

Rory.


2009/5/7 Rory Walsh :
> Thanks, I'll try that tomorrow and let you know how I get on.
>
> Rory.
>
>
> 2009/5/6 Andy Fillebrown :
>>
>> The typedef errors are because they were commented out in sysdep.h -- just swap the changes to the juice header.  I'm not sure about the linkage warnings, but it sounds like csPerfThread.cpp is being included from a .c module and __cplusplus isn't defined.
>>
>> -af
>>
>>
>>
>> ----- "Rory Walsh"  wrote:
>>> I'm assuming that the problem is caused by the juce library having
>>> the
>>> same typedefs in one of its header files. So I left in the MSVC and
>>> commented out the typedefs in sysdep.h and it now gets much further,
>>> I
>>> get on unresovled symbol about csPerfThread:
>>>
>>> 1>ApplicationStartup.obj : error LNK2001: unresolved external symbol
>>> "public: __thiscall
>>> CsoundPerformanceThread::CsoundPerformanceThread(class Csound *)" (??
>>>
>>> Normally I would just include csPerfThread.cpp to my project and
>>> build
>>> it, without linking to csnd.dll but when I try that here I get the
>>> following, I've only included a sample, you get the idea:
>>>
>>> 1>c:\mydocuments\sourcecode\csound5\csound5\h\csound.h(456) : error
>>> C2146: syntax error : missing ';' before identifier 'N'
>>> 1>c:\mydocuments\sourcecode\csound5\csound5\h\csound.h(456) : error
>>> C4430: missing type specifier - int assumed. Note: C++ does not
>>> support default-int
>>> 1>c:\mydocuments\sourcecode\csound5\csound5\h\csound.h(456) : error
>>> C4430: missing type specifier - int assumed. Note: C++ does not
>>> support default-int
>>> 1>c:\mydocuments\sourcecode\csound5\csound5\h\csound.h(459) : error
>>> C2146: syntax error : missing ';' before identifier 'NB'
>>> 1>c:\mydocuments\sourcecode\csound5\csound5\h\csound.h(459) : error
>>> C4430: missing type specifier - int assumed. Note: C++ does not
>>> support default-int
>>> 1>c:\mydocuments\sourcecode\csound5\csound5\h\csound.h(459) : error
>>> C4430: missing type specifier - int assumed. Note: C++ does not
>>> support default-int
>>>
>>> Which are immediately followed by lot of these:
>>> 1>C:\Program Files\Microsoft Visual Studio 9.0\VC\include\ivec.h(96)
>>> :
>>> warning C4190: '&' has C-linkage specified, but returns UDT 'M64'
>>> which is incompatible with C
>>> 1>        C:\Program Files\Microsoft Visual Studio
>>> 9.0\VC\include\ivec.h(77) : see declaration of 'M64'
>>> 1>C:\Program Files\Microsoft Visual Studio 9.0\VC\include\ivec.h(97)
>>> :
>>> warning C4190: '|' has C-linkage specified, but returns UDT 'M64'
>>> which is incompatible with C
>>> 1>        C:\Program Files\Microsoft Visual Studio
>>> 9.0\VC\include\ivec.h(77) : see declaration of 'M64'
>>> 1>C:\Program Files\Microsoft Visual Studio 9.0\VC\include\ivec.h(98)
>>> :
>>> warning C4190: '^' has C-linkage specified, but returns UDT 'M64'
>>> which is incompatible with C
>>> 1>        C:\Program Files\Microsoft Visual Studio
>>> 9.0\VC\include\ivec.h(77) : see declaration of 'M64'
>>> 1>C:\Program Files\Microsoft Visual Studio 9.0\VC\include\ivec.h(99)
>>> :
>>> warning C4190: 'andnot' has C-linkage specified, but returns UDT
>>> 'M64'
>>> which is incompatible with C
>>> 1>        C:\Program Files\Microsoft Visual Studio
>>> 9.0\VC\include\ivec.h(77) : see declaration of 'M64'
>>> 1>C:\Program Files\Microsoft Visual Studio 9.0\VC\include\ivec.h(162)
>>> : warning C4190: 'cmpeq' has C-linkage specified, but returns UDT
>>> 'I32vec2' which is incompatible with C
>>> 1>        C:\Program Files\Microsoft Visual Studio
>>> 9.0\VC\include\ivec.h(133) : see declaration of 'I32vec2'
>>> 1>C:\Program Files\Microsoft Visual Studio 9.0\VC\include\ivec.h(163)
>>> : warning C4190: 'cmpneq' has C-linkage specified, but returns UDT
>>> 'I32vec2' which is incompatible with C
>>> 1>        C:\Program Files\Microsoft Visual Studio
>>> 9.0\VC\include\ivec.h(133) : see declaration of 'I32vec2'
>>> 1>C:\Program Files\Microsoft Visual Studio 9.0\VC\include\ivec.h(165)
>>> : warning C4190: 'unpack_low' has C-linkage specified, but returns
>>> UDT
>>> 'I32vec2' which is incompatible with C
>>> 1>        C:\Program Files\Microsoft Visual Studio
>>> 9.0\VC\include\ivec.h(133) : see declaration of 'I32vec2'
>>> 1>C:\Program Files\Microsoft Visual Studio 9.0\VC\include\ivec.h(166)
>>> : warning C4190: 'unpack_high' has C-linkage specified, but returns
>>> UDT 'I32vec2' which is incompatible with C
>>>
>>> The section of Csound.h referenced is from here:
>>>
>>>   typedef struct pvsdat_ext {
>>>         int32            N;
>>> #ifndef OLPC
>>>         int             sliding; /* Flag to indicate sliding case */
>>>         int32           NB;
>>> #endif
>>>         int32           overlap;
>>>         int32           winsize;
>>>         int             wintype;
>>>         int32           format;
>>>         uint32          framecount;
>>>         float*          frame;
>>>  } PVSDATEXT;
>>>
>>> If I commet that section out I get the 'missing type specifier '
>>> errors from above, instead I just get more of these errors:
>>>
>>> 1>        C:\Program Files\Microsoft Visual Studio
>>> 9.0\VC\include\ivec.h(133) : see declaration of 'I32vec2'
>>> 1>C:\Program Files\Microsoft Visual Studio 9.0\VC\include\ivec.h(233)
>>> : warning C4190: 'cmpeq' has C-linkage specified, but returns UDT
>>> 'Is32vec2' which is incompatible with C
>>> 1>        C:\Program Files\Microsoft Visual Studio
>>> 9.0\VC\include\ivec.h(171) : see declaration of 'Is32vec2'
>>> 1>C:\Program Files\Microsoft Visual Studio 9.0\VC\include\ivec.h(233)
>>> : error C2733: second C linkage of overloaded function 'cmpeq' not
>>> allowed
>>>
>>> I think I'm back to square one. Unless of I try to work without the
>>> thread class which I might not need. I was just curious to see if it
>>> would work. I must try a simple non-threading example and see if it
>>> works...I'll report back shortly. Some win for Barcalona tonight!
>>> Good
>>> match.
>>>
>>> Rory.
>>>
>>>
>>> Send bugs reports to this list.
>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>> "unsubscribe csound"
>>
>>
>>
>> Send bugs reports to this list.
>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
>>
>