Q: DSSS: Library name being prefixed with S

Kirk McDonald kirklin.mcdonald at gmail.com
Tue Jun 12 17:21:37 PDT 2007


Myron Alexander wrote:
> Kirk McDonald wrote:
>>
>> Gregor might be able to answer this more completely, but it is so that 
>> you can have multiple different versions of the library installed 
>> side-by-side in DSSS. That's not the only prefix. I believe there are 
>> others for whether it was compiled with DMD or GDC; whether it's a 
>> static library or a dynamic one; and maybe whether it uses Phobos vs. 
>> Tango. (I don't recall what 'S' on its own means.)
>>
>> The idea is that, if you're compiling with DSSS, you'll also be 
>> compiling anything using your library with DSSS. DSSS knows what all 
>> those prefixes mean, and it should Just Work. If you want more 
>> complete control over the compilation process, you can try using 
>> Rebuild directly (althogh then you lose the extra power of DSSS.)
>>
> 
> It makes sense in that context but it is not what I want. I tried 
> rebuild but it kept on complaining about not having a module declaration 
> in my main file so I have gone back to Bud for now.
> 

That's just a warning, and you can usually just ignore it. Getting rid 
of it is easy: If your main file is called "main.d", just add "module 
main;" to the top of it. It is related to how rebuild handles 
fully-qualified object files, and is only an issue if you somehow have 
another file called "main.d" which doesn't have a module declaration in 
your project. Always including a module declaration is good practice, so 
you should include one as a matter of course.

> Until D gets a better library mechanism, I will be using source 
> libraries. My library is open-source anyway so it does not affect me, yet.

-- 
Kirk McDonald
http://kirkmcdonald.blogspot.com
Pyd: Connecting D and Python
http://pyd.dsource.org


More information about the Digitalmars-d-learn mailing list