[vorbis-dev] new DLL additions in core libs

Brian Havard brianh at kheldar.apana.org.au
Wed Sep 12 19:28:18 PDT 2001



On Wed, 12 Sep 2001 19:16:38 -0700, Chris Wolf wrote:

>On 9/13/2001 at 11:55 AM Brian Havard wrote:
>
>>>
>>>OK.  So the basic problem is that static externs are unsharable?  
>>
>>That doesn't sound right. It should work if (and only if) the variables are
>>declared to the dll's user using __declspec(dllimport).
>
>I'm afraid that's not really true.  That is just an optimization.
>To quote Microsoft's documentation:
>
>>You do not need to use _declspec(dllimport) for your code to compile
>>correctly, but doing so allows the compiler to generate better code. The
>>compiler is able to generate better code because it knows for sure whether
>>a function exists in a DLL or not, so the compiler can produce codes that
>>skip a level of indirection that would normally be present in a function
>>call that crossed a DLL boundary. 

That's not my experience. When porting a DLL of mine to Win32 I found that
I was getting total garbage when accessing an array exported from it until
I added the _declspec(dllimport). However, this was using Watcom C++, not
VC. I'd still give it a try if I were you.


-- 
 ______________________________________________________________________________
 |  Brian Havard                 |  "He is not the messiah!                   |
 |  brianh at kheldar.apana.org.au  |  He's a very naughty boy!" - Life of Brian |
 ------------------------------------------------------------------------------

--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'vorbis-dev-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.




More information about the Vorbis-dev mailing list