Dec 13, 2012

Screenshots for configuration of FFTW3 in C++ (Windows)


When you download the zip file from “http://fftw.org/install/windows.html”,



By default, the zip file is like this (I use 64-bit version):






First thing you should do is to generate .lib files for these .dll files. Refer to the post here:
(notice in this post also have information for debug in case you find this problem)
Then copy them to the same folder which should looks like:

Copy this folder to your project’s folder (actually you can put it anywhere).
Here begins the screen shots of configuration:

1 Open the property configuration for present project. Choose “General” under “C/C++” option tab.

2 add the .dll file’s directory by click “Additional Include Directories”:

3 under the “Linker/General” option, choose “Additional Library Directories”

4 add the directory of your  .dll file here:

5 add the .lib files’ names under the “Linker/Input” option here:

6 make sure you’ve input all the .lib files you want to use;


Now you should be able to see the external header file under “External Dependencies” :



And include it above the other library:


Done.


In my code, I begin to use it like this:


You should refer to the manual of FFTW3 for the use of it.


·         You can choose “Optimization for running the code” to save running time if you don't need debug info.
·         

Dec 8, 2012

C++ note (1) 20121208

IDE Integrated Development Environment

Editor
The Compiler
    covert source code into object code (.obj)
The Linker
    weld everything into an executable whole
The Libraries
    a collection of pre-written routines
        Standard C++ Library
        Microsoft Foundation Classes (MFC)
        Windows Forms

Projects and Solutions
    A project is a container for all things that make up a program of some kind. All files are stored in the project folder.
    Detailed information about the project is stored in an XML file (.vcxproj).
 
    A solution is a mechanism for bringing together all the programs and other resources that represent a solution to a particular data-processing problem. A solution may include several projects or a single project. Usually, a solution has only one project, where usually it has the same name as project, unless otherwise.
    .sln -- information about the projects in the solution
    .suo -- user options
    .sdf -- records data about Intellisense for the solution, which is the facility that provides autocompletion and prompts you for code in the Editor window as you enter it.
    .opensdf -- this file exists only while the project is open.

Building the solution
After you building the solution, in case of a Console Application, a few files would be generated:
    under solution name folder, a debug sub-folder would be generated
        .exe -- program in executable form
        .ilk used by the linker when rebuild the project. This avoids the need of relink everything each time you change the program
        .pdb -- contains debugging information when execute the program in debug mode
    under the project name folder there's another 'debug' folder, too. It has a large number of files that were created during the build process.

Debug and Release version of program
    When you  create a new project workspace, two versions of the application would be generated.
    Debug version -- includes additional information that helps you debug the program
    Release version -- no debug information and has the code-optimization options for the compiler.

Shortcuts
    F7 --  build the program
    Ctrl + F5 -- execute the program

Create an Empty Console Project
    stdafx.h -- head file being created in an default Win32 Console Application. This is a mechanism for making the compilation process more efficient when there are lots of files in a program.
    By default, the project options will be set to use Unicode libraries, which makes use of a non-standard name for the main function in the program. In order to use standard native C++ in your console programs, you need to switch off the use of Unicode libraries.( Project -> Properties -> Configuration Properties -> General -> Character Set -- 'Not Set' ).
    _tmain -- is defined to be either 'main' or 'wmain' (in the header tchar.h), depending on whether or not the program is defined to be to use Unicode characters. In standard of C++/IEC programs start execution in a function called main(), so you need to change the Character Set property value for native C++ to Not Set.

Create a CLR Console Project
After you create a CLR console project, there are no options for a CLR project.
A couple of files in the virtual Resource Files folder:
    .ico -- stores an icon for the application that is displayed when the program is minimized
    .rc -- records the resources for the application
AssemblyInfo.cpp -- an assembly consists of code and resources that forms a functional unit. Every CLR program consists of one or more assemblies. an assembly is a fundamental building block in all CLR programs.