Walnut  

Walnut  >  Documentation  >  Nutshell ground build-up  >  paradigms-ground-buildup.txt

paradigms-ground-buildup.txt

$Id: paradigms-ground-buildup.txt,v 1.1 2002/07/11 12:56:10 maryniak Exp $

Build up Paradigms 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 1:
    This installs the generic Nutshell code to support paradigms: Base.
    Specific paradigms (like Hopfield or MacGregor) are also present in
    the Paradigms directory but the installation of those is described
    in separate documents (eg.: hopfield-ground-buildup.txt).

Note 2:
    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: Paradigms
       - Location: X:\Walnut\Paradigms\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\Paradigms\Base).
   Use the Explorer to do this.
   o Put all Paradigms source files (*.h and *.cpp) in a 'source'
     subdirectory (X:\Walnut\Paradigms\Base\source)

4. Add source files to the project.
   o FileView tab
     = Right-mouse click on 'Paradigms 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 Paradigms.
   o Project|Settings menu
     = The top level item 'Paradigms' 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 PARADIGMS_EXPORTS with:  __WLNT_PARADIGMS
           - leave the rest intact
         - Additional include directories:
           [Note: names are _comma_ separated and must be on one (1) line!]
             \Walnut\Components\Base\source,\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:
           [Note: names are _space_ separated and must be on one (1) line!]
             Components.lib WalnutCore.lib
       - Settings For: Win32 Release
         - Category: General
         - Output file name: \Walnut\Release\Paradigms.dll
         - Category: Input
         - Additional library path:
           [Note: names are _comma_ separated and must be on one (1) line!]
             \Walnut\Components\Base\Release,\Walnut\WalnutCore\Release
       - Settings For: Win32 Debug
         - Category: General
         - Output file name: \Walnut\Debug\Paradigms.dll
         - Category: Input
         - Additional library path:
           [Note: names are _comma_ separated and must be on one (1) line!]
             \Walnut\Components\Base\Debug,\Walnut\WalnutCore\Debug
     OK.

   Although Paradigms 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 and Components project into workspace.
   o Project|Insert Project into Workspace menu
     - Select WalnutCore.dsp from X:\Walnut\WalnutCore
   o Project|Insert Project into Workspace menu
     - Select Components.dsp from X:\Walnut\Components\Base
   o Project|Dependencies menu
     - Select project to modify: Paradigms
     - [X] Components
     - [X] WalnutCore
     OK.
   o Project|Dependencies menu
     - Select project to modify: Components
     - [X] WalnutCore
     OK.

7. Create MakeFile.
   o Project|Export Makefile menu
     - [X] Paradigms (.\Paradigms.mak)
     - [X] WalnutCore (\Walnut\WalnutCore\WalnutCore.mak)
     - [X] Components (\Walnut\Components\Base\Components.mak)
       -------------------------------------------------------
     - [X] Write dependencies when writing makefiles.
     OK.

8. Save workspace.
   o File|Save Workspace menu

9. Build Paradigms project and projects WalnutCore and Components.
   At this point we are ready to build the 'core' Walnut libraries:
   WalnutCore, Components and Paradigms.
   Compiling Paradigms implies a build of WalnutCore and Components first,
   because the Paradigms project depends on those two projects.
   Use a batch build to ensure this.
   Perhaps you have already built WalnutCore and Components previously:
   this is ok, as all dependencies are always checked automatically.
   Optionally you can skip this step, too, if you want to wait to the
   very last and build everything in one go!
   Paradigms will be built automatically when building the Nutshell project,
   because Nutshell is set dependent on the Paradigms project.

   o Build|Batch Build menu
     - [X] Paradigms  - Win32 Release
     - [X] Paradigms  - Win32 Debug
     - [X] WalnutCore - Win32 Release
     - [X] WalnutCore - Win32 Debug
     - [X] Components - Win32 Release
     - [X] Components - Win32 Debug
     Build.


$Source: /home/cvsroot/Walnut/C++/Doc/internal/paradigms-ground-buildup.txt,v $

Other relevant documents:


University of AmsterdamUniversity of Amsterdam
Department of Psychology
Page last modified: 2008-09-29. Validate html.
Copyright © 2000-2009 NeuroMod Group. Send us Feedback!