Library object name collision
frame
frame86 at live.com
Tue Jan 24 09:54:01 UTC 2023
On Tuesday, 24 January 2023 at 08:15:55 UTC, Richard (Rikki)
Andrew Cattermole wrote:
> On 24/01/2023 8:59 PM, frame wrote:
>> Also why have most objects an unique postfix in the name but
>> those files havn't? It's mostly a `__ModuleInfoZ` or `__initZ`
>> but not always.
>
> Symbols which end in __ModuleInfoZ are symbols that hold
> per-module information for features like unittests and module
> constructors.
>
> Symbols which end in __initZ hold information on types,
> specifically their default initialization state.
>
> So if these two are missing, and they should be there, you have
> a problem.
It's a library - if any symbol is missing it will be a problem ;-)
> Now wrt. LNK4255, I'm not sure why its doing this. You haven't
> shown how you're building. But if you're doing it manually you
> may want to try:
>
> -od=<directory> write object & library files to directory
> -of=<filename> name output file to filename
> -op preserve source path for output files
Doing it via dub, manually would be the `-lib` switch I guess.
Thanks! it works well with the `-op` switch, didn't know I can do
with libraries. Only drawback is that every path now stored as
absolute path - any way to store only a relative one?
More information about the Digitalmars-d-learn
mailing list