Re: Resources in a static library
- From: Stuart Redmann <DerTopper@xxxxxx>
- Date: Fri, 14 Dec 2007 14:31:25 +0100
Torsten Hensel wrote:
Hi!
I've created a static library that contains a dialog class. The dialog is created using the dialog editor, so it's described in a resource file. However, static libraries cannot contain resources.
You are wrong. Static libraries can very well contain resources. It's just the resource editor that cannot cope easily with distributed resource IDs.
> So the application using
the lib needs to include the resources. When I add a resource include I must include the resource.h, but this may lead to resource ID clashes. I could copy the resources from the library project to the application project, but this is not what I want. Creating a DLL is no option either.
Is there any way that I can create a static library that contains a dialog and link to this library without any additional steps? Perhaps there is a way to create C++ code from the resource file so that the dialog is created "manually" instead of using resources...
Just add a resource file to your static library. The build step will compile all ..rc files that are part of the project with the resource compiler. Keep in mind that the resource compiler generates plain .obj/.res files which can be linked just like code object files.
Regards,
Stuart
.
- Follow-Ups:
- Re: Resources in a static library
- From: Somebody
- Re: Resources in a static library
- From: Doug Harrison [MVP]
- Re: Resources in a static library
- Prev by Date: Re: GDI Shape Question
- Next by Date: Re: ExecWB and VARIANT
- Previous by thread: Re: Resources in a static library
- Next by thread: Re: Resources in a static library
- Index(es):
Relevant Pages
|