Thank you both for your replies.
Build 3:
I modified linker option to /INCREMENTAL: NO
The compiling went as below:
1>------ Build started: Project: liboofem, Configuration: Debug Win32 ------
1> Creating library E:/learning_oofem/visual_studio_installation/build3/Debug/oofem.lib and object E:/learning_oofem/visual_studio_installation/build3/Debug/oofem.exp
1> liboofem.vcxproj -> E:\learning_oofem\visual_studio_installation\build3\Debug\oofem.dll
2>------ Build started: Project: oofem, Configuration: Debug Win32 ------
2>C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppBuild.targets(367,5): warning MSB8004: Intermediate Directory does not end with a trailing slash. This build instance will add the slash as it is required to allow proper evaluation of the Intermediate Directory.
2> oofem.vcxproj -> E:\learning_oofem\visual_studio_installation\build3\Debug\oofem.exe
========== Build: 2 succeeded, 0 failed, 5 up-to-date, 0 skipped ==========
The size of oofem.exe file is 57 kb only.
Build 4:
As a fresh start, I followed steps 4,5,6. I then opened the projects, added additional libraries (src\config, src\dss in project properties), turned off linker option to /INCREMENTAL:NO. On building the solution, I get many warnings while project is building 1.zero_check, 2. core 3. fm 4. sm 5. tm like
warning c4702: unreachable code
********************************************************************************************************************************************************
....
....
....
....
4>e:\learning_oofem\visual_studio_installation\oofem-2.4\oofem-2.4\src\oofemlib\element.h(237): warning C4702: unreachable code
4>e:\learning_oofem\visual_studio_installation\oofem-2.4\oofem-2.4\src\oofemlib\element.h(783): warning C4702: unreachable code
4>e:\learning_oofem\visual_studio_installation\oofem-2.4\oofem-2.4\src\sm\crosssections\structuralcrosssection.h(300): warning C4702: unreachable code
4>deformationtheorymaterial.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
4> sm.vcxproj -> E:\learning_oofem\visual_studio_installation\build4\src\sm\sm.dir\Debug\sm.lib
*********************************************************************************************************************************************************
and then errors for 6. liboofem 7. oofem
*************************************************************************************************************************************************************
7>------ Build started: Project: oofem, Configuration: Debug Win32 ------
7> Building Custom Rule E:/learning_oofem/visual_studio_installation/oofem-2.4/oofem-2.4/CMakeLists.txt
7> CMake does not need to re-run because E:\learning_oofem\visual_studio_installation\build4\CMakeFiles\generate.stamp is up-to-date.
7> main.C
7>e:\learning_oofem\visual_studio_installation\oofem-2.4\oofem-2.4\src\oofemlib\logger.h(55): error C2079: 'Logger' uses undefined class 'oofem::OOFEM_EXPORT'
7>e:\learning_oofem\visual_studio_installation\oofem-2.4\oofem-2.4\src\oofemlib\logger.h(56): error C2059: syntax error: 'public'
7>e:\learning_oofem\visual_studio_installation\oofem-2.4\oofem-2.4\src\oofemlib\logger.h(58): error C2143: syntax error: missing ';' before '{'
7>e:\learning_oofem\visual_studio_installation\oofem-2.4\oofem-2.4\src\oofemlib\logger.h(58): error C2447: '{': missing function header (old-style formal list?)
7>e:\learning_oofem\visual_studio_installation\oofem-2.4\oofem-2.4\src\oofemlib\logger.h(66): error C2059: syntax error: 'protected'
7>e:\learning_oofem\visual_studio_installation\oofem-2.4\oofem-2.4\src\oofemlib\logger.h(72): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
7>e:\learning_oofem\visual_studio_installation\oofem-2.4\oofem-2.4\src\oofemlib\logger.h(72): error C2146: syntax error: missing ';' before identifier 'logLevel'
7>e:\learning_oofem\visual_studio_installation\oofem-2.4\oofem-2.4\src\oofemlib\logger.h(75): error C2059: syntax error: 'public'
7>e:\learning_oofem\visual_studio_installation\oofem-2.4\oofem-2.4\src\oofemlib\logger.h(76): error C2146: syntax error: missing ')' before identifier 'level'
7>e:\learning_oofem\visual_studio_installation\oofem-2.4\oofem-2.4\src\oofemlib\logger.h(77): error C2588: '::~Logger': illegal global destructor
7>e:\learning_oofem\visual_studio_installation\oofem-2.4\oofem-2.4\src\oofemlib\logger.h(77): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
7>e:\learning_oofem\visual_studio_installation\oofem-2.4\oofem-2.4\src\oofemlib\logger.h(77): error C2365: 'oofem::Logger': redefinition; previous definition was 'data variable'
7> e:\learning_oofem\visual_studio_installation\oofem-2.4\oofem-2.4\src\oofemlib\logger.h(55): note: see declaration of 'oofem::Logger'
7>e:\learning_oofem\visual_studio_installation\oofem-2.4\oofem-2.4\src\oofemlib\logger.h(89): error C2146: syntax error: missing ')' before identifier 'level'
7>e:\learning_oofem\visual_studio_installation\oofem-2.4\oofem-2.4\src\oofemlib\logger.h(91): error C2146: syntax error: missing ')' before identifier 'level'
7>e:\learning_oofem\visual_studio_installation\oofem-2.4\oofem-2.4\src\oofemlib\logger.h(96): error C2146: syntax error: missing ')' before identifier 'level'
7>e:\learning_oofem\visual_studio_installation\oofem-2.4\oofem-2.4\src\oofemlib\logger.h(96): error C2143: syntax error: missing ';' before '{'
7>e:\learning_oofem\visual_studio_installation\oofem-2.4\oofem-2.4\src\oofemlib\logger.h(96): error C2447: '{': missing function header (old-style formal list?)
7>e:\learning_oofem\visual_studio_installation\oofem-2.4\oofem-2.4\src\oofemlib\logger.h(102): error C2059: syntax error: 'protected'
7>e:\learning_oofem\visual_studio_installation\oofem-2.4\oofem-2.4\src\oofemlib\logger.h(103): error C2146: syntax error: missing ')' before identifier 'l'
7>e:\learning_oofem\visual_studio_installation\oofem-2.4\oofem-2.4\src\oofemlib\logger.h(106): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
7>e:\learning_oofem\visual_studio_installation\oofem-2.4\oofem-2.4\src\oofemlib\logger.h(106): error C2146: syntax error: missing ';' before identifier 'Logger'
7>e:\learning_oofem\visual_studio_installation\oofem-2.4\oofem-2.4\src\oofemlib\logger.h(106): error C2146: syntax error: missing ';' before identifier 'oofem_logger'
7>e:\learning_oofem\visual_studio_installation\oofem-2.4\oofem-2.4\src\oofemlib\logger.h(121): error C2059: syntax error: '}'
7>e:\learning_oofem\visual_studio_installation\oofem-2.4\oofem-2.4\src\oofemlib\logger.h(121): error C2143: syntax error: missing ';' before '}'
7>e:\learning_oofem\visual_studio_installation\oofem-2.4\oofem-2.4\src\oofemlib\irresulttype.h(38): error C2143: syntax error: missing ';' before '{'
7>e:\learning_oofem\visual_studio_installation\oofem-2.4\oofem-2.4\src\oofemlib\irresulttype.h(38): error C2447: '{': missing function header (old-style formal list?)
7>e:\learning_oofem\visual_studio_installation\oofem-2.4\oofem-2.4\src\oofemlib\inputrecord.h(102): error C2079: 'InputRecord' uses undefined class 'oofem::OOFEM_EXPORT'
7>e:\learning_oofem\visual_studio_installation\oofem-2.4\oofem-2.4\src\oofemlib\inputrecord.h(103): error C2059: syntax error: 'public'
7>e:\learning_oofem\visual_studio_installation\oofem-2.4\oofem-2.4\src\oofemlib\inputrecord.h(107): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
7>e:\learning_oofem\visual_studio_installation\oofem-2.4\oofem-2.4\src\oofemlib\inputrecord.h(107): error C2143: syntax error: missing ',' before '&'
7>e:\learning_oofem\visual_studio_installation\oofem-2.4\oofem-2.4\src\oofemlib\inputrecord.h(107): error C2365: 'oofem::InputRecord': redefinition; previous definition was 'data variable'
7> e:\learning_oofem\visual_studio_installation\oofem-2.4\oofem-2.4\src\oofemlib\inputrecord.h(102): note: see declaration of 'oofem::InputRecord'
7>e:\learning_oofem\visual_studio_installation\oofem-2.4\oofem-2.4\src\oofemlib\inputrecord.h(109): error C2588: '::~InputRecord': illegal global destructor
7>e:\learning_oofem\visual_studio_installation\oofem-2.4\oofem-2.4\src\oofemlib\inputrecord.h(109): error C2575: 'InputRecord': only member functions and bases can be virtual
7>e:\learning_oofem\visual_studio_installation\oofem-2.4\oofem-2.4\src\oofemlib\inputrecord.h(109): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
7>e:\learning_oofem\visual_studio_installation\oofem-2.4\oofem-2.4\src\oofemlib\inputrecord.h(109): error C2365: 'oofem::InputRecord': redefinition; previous definition was 'data variable'
7> e:\learning_oofem\visual_studio_installation\oofem-2.4\oofem-2.4\src\oofemlib\inputrecord.h(102): note: see declaration of 'oofem::InputRecord'
7>e:\learning_oofem\visual_studio_installation\oofem-2.4\oofem-2.4\src\oofemlib\inputrecord.h(111): error C2143: syntax error: missing ';' before '&'
7>e:\learning_oofem\visual_studio_installation\oofem-2.4\oofem-2.4\src\oofemlib\inputrecord.h(111): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
7>e:\learning_oofem\visual_studio_installation\oofem-2.4\oofem-2.4\src\oofemlib\inputrecord.h(111): error C2086: 'int oofem::InputRecord': redefinition
7> e:\learning_oofem\visual_studio_installation\oofem-2.4\oofem-2.4\src\oofemlib\inputrecord.h(102): note: see declaration of 'oofem::InputRecord'
7>e:\learning_oofem\visual_studio_installation\oofem-2.4\oofem-2.4\src\oofemlib\inputrecord.h(111): error C2143: syntax error: missing ',' before '&'
7>e:\learning_oofem\visual_studio_installation\oofem-2.4\oofem-2.4\src\oofemlib\inputrecord.h(111): error C2801: 'oofem::operator =' must be a non-static member
7>e:\learning_oofem\visual_studio_installation\oofem-2.4\oofem-2.4\src\oofemlib\inputrecord.h(114): error C2143: syntax error: missing ';' before '*'
7>e:\learning_oofem\visual_studio_installation\oofem-2.4\oofem-2.4\src\oofemlib\inputrecord.h(114): error C2433: 'InputRecord': 'virtual' not permitted on data declarations
7>e:\learning_oofem\visual_studio_installation\oofem-2.4\oofem-2.4\src\oofemlib\inputrecord.h(114): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
7>e:\learning_oofem\visual_studio_installation\oofem-2.4\oofem-2.4\src\oofemlib\inputrecord.h(114): error C2086: 'int oofem::InputRecord': redefinition
7> e:\learning_oofem\visual_studio_installation\oofem-2.4\oofem-2.4\src\oofemlib\inputrecord.h(102): note: see declaration of 'oofem::InputRecord'
7>e:\learning_oofem\visual_studio_installation\oofem-2.4\oofem-2.4\src\oofemlib\inputrecord.h(114): error C2059: syntax error: '='
7>e:\learning_oofem\visual_studio_installation\oofem-2.4\oofem-2.4\src\oofemlib\inputrecord.h(117): error C2270: 'giveRecordAsString': modifiers not allowed on nonmember functions
7>e:\learning_oofem\visual_studio_installation\oofem-2.4\oofem-2.4\src\oofemlib\inputrecord.h(117): error C2059: syntax error: 'constant'
7>e:\learning_oofem\visual_studio_installation\oofem-2.4\oofem-2.4\src\oofemlib\inputrecord.h(127): error C2433: 'IRResultType': 'virtual' not permitted on data declarations
7>e:\learning_oofem\visual_studio_installation\oofem-2.4\oofem-2.4\src\oofemlib\inputrecord.h(127): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
7>e:\learning_oofem\visual_studio_installation\oofem-2.4\oofem-2.4\src\oofemlib\inputrecord.h(127): fatal error C1903: unable to recover from previous error(s); stopping compilation
========== Build: 6 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
**********************************************************************************************************************************************************************
Running Build 4 again :
Logger.h uses the class 'oofem::OOFEM_EXPORT' which is defined in the #include "oofem_export.h"
I ran the build solution again by adding an extra line
#include "oofem_export.h" and am getting the following output:
**********************************************************************************************************************************************************************
3>e:\learning_oofem\visual_studio_installation\oofem-2.4\oofem-2.4\src\sm\crosssections\structuralcrosssection.h(300): warning C4702: unreachable code
3>e:\learning_oofem\visual_studio_installation\oofem-2.4\oofem-2.4\src\oofemlib\element.h(237): warning C4702: unreachable code
3>e:\learning_oofem\visual_studio_installation\oofem-2.4\oofem-2.4\src\oofemlib\element.h(783): warning C4702: unreachable code
3>deformationtheorymaterial.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
3> sm.vcxproj -> E:\learning_oofem\visual_studio_installation\build4\src\sm\sm.dir\Debug\sm.lib
5>------ Build started: Project: liboofem, Configuration: Debug Win32 ------
5> Creating library E:/learning_oofem/visual_studio_installation/build4/Debug/oofem.lib and object E:/learning_oofem/visual_studio_installation/build4/Debug/oofem.exp
5> liboofem.vcxproj -> E:\learning_oofem\visual_studio_installation\build4\Debug\oofem.dll
6>------ Build started: Project: oofem, Configuration: Debug Win32 ------
6> main.C
6>e:\learning_oofem\visual_studio_installation\oofem-2.4\oofem-2.4\src\oofemlib\oofemtxtinputrecord.h(107): warning C4458: declaration of 'lineNumber' hides class member
6> e:\learning_oofem\visual_studio_installation\oofem-2.4\oofem-2.4\src\oofemlib\oofemtxtinputrecord.h(63): note: see declaration of 'oofem::OOFEMTXTInputRecord::lineNumber'
6>E:\learning_oofem\visual_studio_installation\oofem-2.4\oofem-2.4\src\main\main.C(249): error C2065: 'PRG_HEADER_SM': undeclared identifier
6>E:\learning_oofem\visual_studio_installation\oofem-2.4\oofem-2.4\src\main\main.C(332): error C2065: 'PRG_VERSION': undeclared identifier
6>E:\learning_oofem\visual_studio_installation\oofem-2.4\oofem-2.4\src\main\main.C(332): error C2065: 'MODULE_LIST': undeclared identifier
6>E:\learning_oofem\visual_studio_installation\oofem-2.4\oofem-2.4\src\main\main.C(332): error C2065: 'HOST_NAME': undeclared identifier
6>E:\learning_oofem\visual_studio_installation\oofem-2.4\oofem-2.4\src\main\main.C(338): error C2065: 'OOFEM_COPYRIGHT': undeclared identifier
========== Build: 5 succeeded, 1 failed, 1 up-to-date, 0 skipped ==========
Running Build 4 again :
Adding the path in linker additional library directory
E:\learning_oofem\visual_studio_installation\build4\liboofem.dir
E:\learning_oofem\visual_studio_installation\build4\oofem.dir
**********************************************************************************************************************************************************************
1>------ Build started: Project: oofem, Configuration: Debug Win32 ------
1> main.C
1>e:\learning_oofem\visual_studio_installation\oofem-2.4\oofem-2.4\src\oofemlib\oofemtxtinputrecord.h(107): warning C4458: declaration of 'lineNumber' hides class member
1> e:\learning_oofem\visual_studio_installation\oofem-2.4\oofem-2.4\src\oofemlib\oofemtxtinputrecord.h(63): note: see declaration of 'oofem::OOFEMTXTInputRecord::lineNumber'
1>E:\learning_oofem\visual_studio_installation\oofem-2.4\oofem-2.4\src\main\main.C(249): error C2065: 'PRG_HEADER_SM': undeclared identifier
1>E:\learning_oofem\visual_studio_installation\oofem-2.4\oofem-2.4\src\main\main.C(332): error C2065: 'PRG_VERSION': undeclared identifier
1>E:\learning_oofem\visual_studio_installation\oofem-2.4\oofem-2.4\src\main\main.C(332): error C2065: 'MODULE_LIST': undeclared identifier
1>E:\learning_oofem\visual_studio_installation\oofem-2.4\oofem-2.4\src\main\main.C(332): error C2065: 'HOST_NAME': undeclared identifier
1>E:\learning_oofem\visual_studio_installation\oofem-2.4\oofem-2.4\src\main\main.C(338): error C2065: 'OOFEM_COPYRIGHT': undeclared identifier
========== Build: 0 succeeded, 1 failed, 6 up-to-date, 0 skipped ==========
**********************************************************************************************************************************************************************