IonicWind Software

IWBasic => General Questions => Topic started by: Andy on May 25, 2016, 06:49:26 AM

Title: Adding a resource to a library file
Post by: Andy on May 25, 2016, 06:49:26 AM
As everyone knows (and is probably fed up with me now lol), I've been working on my StringMap library for some time now.

And I wondered if I could just add some version information to the .lib file which is built as a project.

I've done this many times before for .exe files, so thought I would try it for a .lib file.

I created a stringmap.rc file with some version information in it, built the library, then browsed to the file... when I clicked on "details" under properties it did not show the details e.g. File Version etc.

So I tried to add the resource into the project but it does not show .rc files when you browse to add in a resource, (Insert Library/Object/Resource files into project) so I had the same result - no details.

Is this just me getting it wrong again  ???
Is it Windows not showing the details because It's a lib file? or is this a bug  ???
The IDE allows you to add a resource for a lib file - should this be disabled  ???

Thanks,
Andy.


 
Title: Re: Adding a resource to a library file
Post by: Egil on May 25, 2016, 09:18:40 AM
Most of the external libraries I have seen have built-in functions that show version information when called.

Egil

Title: Re: Adding a resource to a library file
Post by: Brian on May 25, 2016, 09:34:23 AM
Andy,

Not too sure, but I think you have to tell the linker to add the version info - /VERSION:major:minor - or something like that

Look it up - I would be interested to know. I am at work right now, and people look over your shoulder!

Brian
Title: Re: Adding a resource to a library file
Post by: LarryMc on May 25, 2016, 09:46:36 AM
1st - I have no problem  adding resources to a static lib project via the IDE
2nd - if you look at ANY windows .lib via the right click and try to see what you want via Properties you can't.

3rd - as far as I know you have to do as Egil said: add the functionality to your lib  yourself.
Title: Re: Adding a resource to a library file
Post by: Andy on May 25, 2016, 10:35:07 PM
Thanks everyone,

I took my alternative task manager and altered a copy of it so I could browse to my lib file.

LarryMc helped with the reading of file information in my task manager, so I thought I would look and see what it would do with my lib file.

When I browsed to the lib file, it displayed only the file size, nothing else, but yet works correctly on an exe file.

So although file information can be added into a lib file, it looks like the o/s can't (or won't) read it.

This is not a problem, I was just curious.

I have already added into the library a function to return It's version, guess I need to add in the other details.

Thanks,
Andy.
:)