 |
Scrplus Quick Start |
VC++ versions of all the example savers
are in directories with the letters 'VC' at their end.
- Best to start of with one of the example VC++ projects (BLANK
or BLOBSVC) and modify them. Copy all the files into a new folder
and start from there. If you want to know how to start from scratch,
then read on...
- First, do File|New...ProjectWorkspace and choose to create an application.
- Copy the saver.rc and resource.h file from an existing Visual C++ saver.
Insert|FileIntoProject to insert this resource script into your project.
- Insert|FileIntoProject to insert scrplus\lib\scrplus_coff.obj
(or _release_ if you have the full version of ScrPlus). These files are in
the ScrPlus lib directory.
- Also, you might get linker error messages saying that _imp_PropertySheet@4
is not found, or _GetFileVersionInfo@8 or similar. If you get these error
messages, it means that the relevant import libraries have not been added
to your project. Build|Settings|Link, and look at the 'ProjectOptions'
box at the bottom. It includes things like kernel32.lib, user32.lib &c.
You will have to add comctl32.lib and version.lib. (If more than one
target is selected, and the box has the title 'CommonOptions', then
you will not be able to insert text: you must first select just a single
target in the list box to the left).
- #include "\scrplus\lib\scrplus.h" at the start of your project file.
- You must be multithreaded. Build|Settings|CodeGeneration|UseRuntimeLibrary:
MultiThreaded.
Project files are included for Borland C++5.
- To load any of the example projects, load the project file
'proj50' from the relevant directory.
- Link with scrplus_omf.obj, in the lib directory
- You must be multithreaded. Use the TargetExpert.
- You should #include "\scrplus\lib\scrplus.h".
- Add \scrplus\lib\scrplus.res to the project.
- The ready-compiled obj file scrplus_omf.obj is incompatible with BC++5.02.
If you have BC++5.02, you'll need to link to the source code scrplus.cpp itself.
See below.
Other compilers
- All screen savers must use your compiler's multi-threaded run-time library
- Your main source code should include \scrplus\lib\scrplus.h and \scrplus\lib\scrplus.rh
- Link to \scrplus\lib\scrplus_coff.obj. Or maybe \scrplus\lib\scrplus_omf.obj.
(Most compilers use the COFF .obj format. Borland use the OMF format.)
- Link to \scrplus\lib\scrplus.res
- Savers are nicer if they're statically linked. It makes it easier for end-users to install.
- If your compiler doesn't like either scrplus_omf.obj or scrplus_coff.obj, you'll need
to link against the scrplus.cpp source code itself. See below.
Linking to scrplus.cpp source code
The scrplus.cpp source code is not normally distributed. Normally, you only get the source code if
(1) you have purchased an Scrplus license, or (2) you are a hobbyist and have emailed me for it.
However, if neither scrplus_coff.obj nor scrplus_omf.obj link succesfully in your compiler,
then you'll need to link to scrplus.cpp itself. Please email me,
and tell me which compiler you're using, and I'll give you the password to unlock the source code.
I'd be grateful in this case if you could email me a scrplus.obj file for your compiler,
so that I can include it in future releases.