Walnut
>
Documentation
>
Nutshell ground build-up
>
components-ground-buildup.txt
components-ground-buildup.txt
$Id: components-ground-buildup.txt,v 1.1 2002/07/11 12:56:10 maryniak Exp $
Build up Components Project from the ground (ie. source files) up.
Copyright (C) 2000-2002 University of Amsterdam
Authors: Robert Berg <rjberg@xs4all.nl>
Eric Maryniak <e.maryniak@pobox.com>
The NeuroMod Group on the Web:
http://static/
Note:
Drive "X:" is your harddisk (eg. "C:") or network drive (eg. "U:")
on which you store your local MSVC++ project and source files.
1. Start MSVC++ 6.0.
o File|New menu
= Projects tab
- Win32 Dynamic-Link Library
- Project name: Components
- Location: X:\Walnut\Components\Base
- Important: verify that you type this path exactly as showed!
- (o) Create new workspace
- Platforms: [X] Win32
OK.
2. What kind of DLL would you like to create ?
- (o) An empty DLL project
Finish, OK.
3. Populate Project Directory (X:\Walnut\Components\Base).
Use the Explorer to do this.
o Put all Components source files (*.h and *.cpp) in a 'source'
subdirectory (X:\Walnut\Components\Base\source)
4. Add source files to the project.
o FileView tab
= Right-mouse click on 'Components files'
- Add Files to Project...
- Browse to the 'source' subdir,
click on 1 file and control-a (= select all .h and .cpp files)
OK.
The header and source files will be distributed under
"Header Files" and "Source Files" automatically.
5. Project settings for Components.
o Project|Settings menu
= The top level item 'Components' in the fileview must always be
selected.
= General tab
- Settings For: Win32 Release
- Microsoft Foundation classes: Not Using MFC
- Settings For: Win32 Debug
- Microsoft Foundation classes: Use MFC in a Shared DLL
= C/C++ tab
- Settings For: All Configurations
- Category: Preprocessor
- Preprocessor definitions:
- replace COMPONENTS_EXPORTS with: __WLNT_COMPONENTS
- leave the rest intact
- Additional include directories:
\Walnut\WalnutCore\source
- Settings For: Win32 Release
- Category: Code Generation
- Use run-time library: Multithreaded DLL
- Settings For: Win32 Debug
- Category: Code Generation
- Use run-time library: Debug Multithreaded DLL
= Link tab
- Settings For: All Configurations
- Category: General
- Object/library modules: WalnutCore.lib
- Settings For: Win32 Release
- Category: General
- Output file name: \Walnut\Release\Components.dll
- Category: Input
- Additional library path: \Walnut\WalnutCore\Release
- Settings For: Win32 Debug
- Category: General
- Output file name: \Walnut\Debug\Components.dll
- Category: Input
- Additional library path: \Walnut\WalnutCore\Debug
OK.
Although Components does not use MFC, it must be linked in Win32 Debug
mode, or else Nutshell will not work (in Debug mode). This has to do
with MFC's overloading of the new and delete operator (in Debug mode).
6. Insert WalnutCore project into workspace.
o Project|Insert Projects into Workspace menu
- Select WalnutCore.dsp from X:\Walnut\WalnutCore
o Project|Dependencies menu
- Select project to modify: Components
- [X] WalnutCore
OK.
7. Create MakeFile.
o Project|Export Makefile menu
- [X] Components (.\Components.mak)
- [X] WalnutCore (\Walnut\WalnutCore\WalnutCore.mak)
--------------------------------------------------
- [X] Write dependencies when writing makefiles.
OK.
8. Save workspace.
o File|Save Workspace menu
9. Build project.
Optionally you can skip this step.
Components will be built automatically when building the Paradigms
or Nutshell project, because they are set dependent on the Components
project.
o Build|Batch Build menu
- [X] Components - Win32 Release
- [X] Components - Win32 Debug
- [X] WalnutCore - Win32 Release
- [X] WalnutCore - Win32 Debug
Build.
$Source: /home/cvsroot/Walnut/C++/Doc/internal/components-ground-buildup.txt,v $
Other relevant documents:
|