Freelancer Community Network

HowToBuildDllFromRcScript » History » Version 7

Version 6 (Bullwinkle, 06/05/2010 04:37 AM) → Version 7/9 (Bullwinkle, 06/05/2010 04:47 AM)

h1. How To Build a .DLL From a .RC Script

1) Get Visual C++ Express from Microsoft (the Express version is free):

*http://www.microsoft.com/express/Downloads/#2010-Visual-CPP*

2) To create a resource-only DLL, you create a new Win32 DLL (non-MFC) project, add your script, then build the project.

Detailed Steps:

* *File / New / Project*
* *Select Win32 Project in the New Project dialog.*
* *Give the Project a name (usually the name of the DLL).*

!HowToBuildDllFromRc01.jpg!

* *Click _Next_ to begin the Win32 Application Wizard.*

!HowToBuildDllFromRc02.jpg!

* *Specify a DLL project type in the Win32 Application Wizard.*
* *Click _Finish_.*

!HowToBuildDllFromRc03.jpg!

* *Project / Preferences* from the menu to get the Property Pages for your project.
* *Configuration Properties / Linker / Advanced*
* *Specify the /NOENTRY linker option.* /NOENTRY prevents the linker from linking a reference to _main into the DLL; this option is required to create a resource-only DLL.

!HowToBuildDllFromRc04.jpg!

* *Project / On the Project menu, *click Add Existing Item*

!HowToBuildDllFromRc06.jpg!

* *Navigate to your
and insert the new .rc script.*
* *Click _Add_ to add your .rc script to
file into the project.* project.

!HowToBuildDllFromRc07.jpg! !HowToBuildDllFromRc05.jpg!

* *Choose _Release_* in *Build the Solution Configuration box. DLL.*

!HowToBuildDllFromRc06.jpg!

!HowToBuildDllFromRc07.jpg!

!HowToBuildDllFromRc08.jpg!

* *Build the Solution.*



!HowToBuildDllFromRc09.jpg!

* *Look in the Output Window to see whether your build was successful.



!HowToBuildDllFromRc10.jpg!