Walnut  

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

hopfield-ground-buildup.txt

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

Build up Hopfield paradigm 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 is a generic description.
    Replace 'Hopfield' with 'MacGregor' and you have the description
    for the biologically plausible MacGregor neural net paradigm!
    Likewise, replace 'ParHopfield' (Project name) with 'ParMacGregor' etc.

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: ParHopfield
       - Location: X:\Walnut\Paradigms\Hopfield
         - Important: verify that you type this path exactly as showed!
           (Remove the 'Par' part in the Location)
       - (o) Create new workspace
       - Platforms: [X] Win32
     OK.

2. What kind of windows application would you like to create?
   - (o) An empty project
   Finish, OK.
 
3. Populate Project Directory (X:\Walnut\Paradigms\Hopfield).
   Use the Explorer to do this.
   o Put all Hopfield source files (*.h and *.cpp) in a 'source'
     subdirectory (X:\Walnut\Paradigms\Hopfield\source)

4. Add source files to the project.
   o FileView tab
     = Right-mouse click on 'ParHopfield 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 ParHopfield.
   o Project|Settings menu
     = The top level item 'ParHopfield' 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
         - Additional include directories:
           [Note: names are _comma_ separated and must be on one (1) line!]
             \Walnut\Paradigms\Base\source,\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!]
             Paradigms.lib Components.lib WalnutCore.lib
       - Settings For: Win32 Release
         - Category: General
         - Output file name (replace!): \Walnut\Release\Paradigm\Hopfield.np
           Note: do not forget to remove the 'Par' part if present and replace
           'dll' with 'np' in the filename and note the (longer) path!
         - Category: Input
         - Additional library path:
           [Note: names are _comma_ separated and must be on one (1) line!]
             \Walnut\Paradigms\Base\Release,\Walnut\Components\Base\Release,
             \Walnut\WalnutCore\Release
       - Settings For: Win32 Debug
         - Category: General
         - Output file name (replace!): \Walnut\Debug\Paradigm\Hopfield.np
           Note: do not forget to remove the 'Par' part if present and replace
           'dll' with 'np' in the filename and note the (longer) path!
         - Category: Input
         - Additional library path:
           [Note: names are _comma_ separated and must be on one (1) line!]
             \Walnut\Paradigms\Base\Debug,\Walnut\Components\Base\Debug,
             \Walnut\WalnutCore\Debug
     OK.

   Although ParHopfield 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, Components and Paradigms into workspace.
   If you are _Nutshell_ developer _or_ need to put new or updated project
   files in the CVS tree (e.g. when creating a new paradigm or project)
   do this step.
   This step is _not_ necessary if you are a _Paradigm_ developer!
   So if you are developing a Paradigm (eg. some cool new Kohonen type
   paradigm) or working on an existing Paradigm, you do not need to insert
   the WalnutCore, Components and Paradigms into the workspace.
   In this case, you are probably using a stable version of Nutshell and
   only need to upgrade if Nutshell itself or one or more of the core
   libraries (WalnutCore, Components and Paradigms) changes in such a way
   that the interfaces are not compatible anymore.

   o Project|Insert Projects into Workspace menu
     - Select WalnutCore.dsp from X:\Walnut\WalnutCore
   o Project|Insert Projects into Workspace menu
     - Select Components.dsp from X:\Walnut\Components\Base
   o Project|Insert Projects into Workspace menu
     - Select Paradigms.dsp from X:\Walnut\Paradigms\Base
   o Project|Dependencies menu
     - Select project to modify: ParHopfield
     - [X] Components
     - [X] Paradigms
     - [X] WalnutCore
     OK.
   o Project|Dependencies menu
     - Select project to modify: Components
     - [X] WalnutCore
     OK.
   o Project|Dependencies menu
     - Select project to modify: Paradigms
     - [X] Components
     - [X] WalnutCore
     OK.

7. Create MakeFile.
   Skip this step unless you are a Nutshell developer!
   See the notes in step 6.

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

8. Save workspace.
   o File|Save Workspace menu

9. Build project.
   The next notes about the compilation process apply if you are a Nutshell
   developer. If you are a paradigm developer, the list of projects to be
   built will just include ParHopfield (Win32 Release and Debug).
   See the notes in step 6.
   Compiling ParHopfield implies a build of WalnutCore, Components and
   Paradigms first, because the ParHopfield project depends on those three
   projects.
   Use a batch build to ensure this.
   Perhaps you have already built WalnutCore, Components and Paradigms
   previously: this is ok, as all dependencies are always checked
   automatically.
   Note that you do _not_ need to rebuild Nutshell!
   Nutshell will dynamically update it's list of specific paradigms,
   by scanning the paradigm sub directory for *.np files.
   Nutshell looks by default in the 'Paradigm' subdirectory from which
   is was started.
   Thus, if you use a release version of Nutshell (ie. started from
   X:\Walnut\Release) Nutshell will look in X:\Walnut\Release\Paradigm,
   whereas if you use a debug version of Nutshell (ie. started from
   X:\Walnut\Debug) Nutshell will look in X:\Walnut\Debug\Paradigm
   Finally Nutshell loads the found paradigms, after verifying version
   number compatibility.

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


$Source: /home/cvsroot/Walnut/C++/Doc/internal/hopfield-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!