Walnut  

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

walnutcore-ground-buildup.txt

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

Build up WalnutCore 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: WalnutCore
       - Location: X:\Walnut\WalnutCore
         - 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\WalnutCore).
   Use the Explorer to do this.
   o Put all WalnutCore source files (*.h and *.cpp) in a 'source'
     subdirectory (X:\Walnut\WalnutCore\source)
   o Put the non-WalnutCore source files (such as MersenneTwister.h in
     subdirectory Mersenne) in an 'extern' subdirectory
     (X:\Walnut\WalnutCore\source\extern)
     The MersenneTwister random number generator goes to subdirectory
      X:\Walnut\WalnutCore\source\extern\Mersenne.
     If more generators are added, they should have a subdirectory of
     their own.

4. Add source files to the project.
   o FileView tab
     = Right-mouse click on 'WalnutCore files'
       - Add Files to Project...
       - Browse to the 'source' subdir,
         click on 1 file and control-a (= select all .h and .cpp files)
       OK.
     = Do the same for the 'extern' subsubdir in subdir 'source'.
       The header and source files will be distributed under
       "Header Files" and "Source Files" automatically.

5. Project settings for WalnutCore.
   o Project|Settings menu
     = The top level item 'WalnutCore' 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 WALNUTCORE_EXPORTS with:  __WLNT_WALNUTCORE
           - leave the rest intact
       - 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: Win32 Release
         - Category: General
         - Output file name: \Walnut\Release\WalnutCore.dll
       - Settings For: Win32 Debug
         - Category: General
         - Output file name: \Walnut\Debug\WalnutCore.dll
     OK.

   Although WalnutCore 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. This project does not depend on other projects, so it is not necessary
   to insert other workspaces nor define project dependencies.

7. Create MakeFile.
   o Project|Export Makefile menu
     - [X] 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.
   WalnutCore will be built automatically when building the Components,
   Paradigms or Nutshell project, because they are set dependent on the
   WalnutCore project.

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


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


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