Hi Eitan,
I actually do have a resource DLL. I think there must be something wrong
with the way you have setup your VC++ project. Here is my .vcproj file for
you to review. Notice that the Resource Only DLL falg is set for both Release
and Debug:
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="7.10"
Name="ResourceOnlyDLL"
ProjectGUID="{6799E433-485C-4E48-B948-16BD0D9D8BD4}"
RootNamespace="ResourceOnlyDLL"
Keyword="Win32Proj">
<Platforms>
<Platform
Name="Win32"/>
</Platforms>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory="Debug"
IntermediateDirectory="Debug"
ConfigurationType="2"
CharacterSet="2">
<Tool
Name="VCCLCompilerTool"
Optimization="0"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;RESOURCEONLYDLL_EXPORTS"
MinimalRebuild="TRUE"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="TRUE"
DebugInformationFormat="4"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLinkerTool"
OutputFile="$(OutDir)/ResourceOnlyDLL.dll"
LinkIncremental="2"
GenerateDebugInformation="TRUE"
ProgramDatabaseFile="$(OutDir)/ResourceOnlyDLL.pdb"
SubSystem="2"
ResourceOnlyDLL="TRUE"
ImportLibrary="$(OutDir)/ResourceOnlyDLL.lib"
TargetMachine="1"/>
<Tool
Name="VCMIDLTool"/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCResourceCompilerTool"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCXMLDataGeneratorTool"/>
<Tool
Name="VCWebDeploymentTool"/>
<Tool
Name="VCManagedWrapperGeneratorTool"/>
<Tool
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="Release"
IntermediateDirectory="Release"
ConfigurationType="2"
CharacterSet="2">
<Tool
Name="VCCLCompilerTool"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;RESOURCEONLYDLL_EXPORTS"
RuntimeLibrary="0"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="TRUE"
DebugInformationFormat="3"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLinkerTool"
OutputFile="$(OutDir)/ResourceOnlyDLL.dll"
LinkIncremental="1"
GenerateDebugInformation="TRUE"
SubSystem="2"
OptimizeReferences="2"
EnableCOMDATFolding="2"
ResourceOnlyDLL="TRUE"
ImportLibrary="$(OutDir)/ResourceOnlyDLL.lib"
TargetMachine="1"/>
<Tool
Name="VCMIDLTool"/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCResourceCompilerTool"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCXMLDataGeneratorTool"/>
<Tool
Name="VCWebDeploymentTool"/>
<Tool
Name="VCManagedWrapperGeneratorTool"/>
<Tool
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Source Files"
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
</Filter>
<Filter
Name="Header Files"
Filter="h;hpp;hxx;hm;inl;inc;xsd"
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
</Filter>
<Filter
Name="Resource Files"
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
<File
RelativePath="..\..\Wrox\CSharp-3rdEd\ch17code\Localization\americanflag.bmp">
</File>
<File
RelativePath="..\GeneralConsoleApp\App.ico">
</File>
<File
RelativePath="..\..\Wrox\CSharp-3rdEd\ch17code\Localization\ResourceDemo\Form1.resx">
</File>
<File
RelativePath="..\..\Wrox\CSharp-3rdEd\ch17code\Localization\franceflag.bmp">
</File>
<File
RelativePath="..\..\Wrox\CSharp-3rdEd\ch17code\Localization\germanflag.bmp">
</File>
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>
[quoted text, click to view] "Eitan" wrote:
> I did create the project, and it compiled. But without adding files .cpp
> and/or .h there is not DLL created.
> What do you put in the CPP and/or the H files?
>
> "Daryush" wrote:
>
> > Here is what I did:
> > 1. Created Win32 Project.
> > 2. In the Application Settings section, chose DLL and Empty Project (Did not
> > add MFC support).
> > 3. Added one icon (.ICO file) and three bitmaps (.BMP files) to the project.
> > 4. Set the Resource Only DLL flag on in the Linker-->Advanced options section.
> > 5. Successfully built the DLL.
> >
> > I was even able to add a RESX file to this project (RESX file was a part of
> > a C# Localization test application) and it still worked.
> >
> > Try it once again, makesure that you choose the Empty Project option. See
> > what happens. Good Luck.
> >
> > Daryush
> >
> >
> > "Eitan" wrote:
> >
> > > I am trying to create a "Resource Only DLL". I followed your info, thanks,
> > > however the /NOENTRY linker option, as per the documentation, cause a linker
> > > problem. Any idea why?
> > > Eitan
> > >
> > >
> > > "Daryush" wrote:
> > >
> > > > Hello Eitan,
> > > >
> > > > What you can do, is to select Win32 Project amoung the Visual C++ project
> > > > templates, and then, on the first dialog box of the Wizard, click on
> > > > Application Settings. There you can choose to create a Win32 DLL or a Win32
> > > > Static Library.
> > > >
> > > > Daryush
> > > >
> > > >
> > > > "Eitan" wrote:
> > > >
> > > > > Hello,
> > > > > I am using Visual Studio.net 2003.
> > > > > I am trying to find how to create Win32 DLL & Win32 Static Library.
> > > > > When going through the wizard it does not show me the option for these two
> > > > > project types.
> > > > > Any Idea?