Waitrud Weber’s blog

things and reminders for memories

3d: WindowsAPI: Windows-make: How do we face memories problem: Double Compilation:

(20200510: )
From GNU Project Folder, we could check if GNU cimpilation and Visual Studio Compilation are good or not:
Microsoft Project Files:
  
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
  

------

Double Compilation:

Which Project we could use:
In the same folder:
1. We could use GNU-compilation:
2. We could use Microsoft-compilation:

Also,
3. We could GNU-compile source file by use of Microsoft Cimpilation: VC++:

 

------

  <ItemGroup>
<ClCompile Include="..\..\..\..\Documents\source\analyzer\analyzer_20200502\array_counter.cpp" />
<ClCompile Include="..\..\..\..\Documents\source\analyzer\analyzer_20200502\display_threeD.cpp" />
<ClCompile Include="..\..\..\..\Documents\source\analyzer\analyzer_20200502\Print.cpp" />
<ClCompile Include="..\..\..\..\Documents\source\analyzer\analyzer_20200502\sender.cpp" />
<ClCompile Include="..\..\..\..\Documents\source\analyzer\analyzer_20200502\v3dCalculation.cpp" />
<ClCompile Include="..\..\..\..\Documents\source\analyzer\analyzer_20200502\vCalculation.cpp" />
<ClCompile Include="..\..\..\..\Documents\source\analyzer\analyzer_20200502\vCircle.cpp" />
<ClCompile Include="..\..\..\..\Documents\source\analyzer\analyzer_20200502\vCurveCalculation.cpp" />
<ClCompile Include="..\..\..\..\Documents\source\analyzer\analyzer_20200502\vIntersection.cpp" />
<ClCompile Include="..\..\..\..\Documents\source\analyzer\analyzer_20200502\visualMain.cpp" />
<ClCompile Include="..\..\..\..\Documents\source\analyzer\analyzer_20200502\vLine.cpp" />
<ClCompile Include="..\..\..\..\Documents\source\analyzer\analyzer_20200502\vPoint.cpp" />
<ClCompile Include="..\..\..\..\Documents\source\analyzer\analyzer_20200502\vPointLinear.cpp" />
<ClCompile Include="..\..\..\..\Documents\source\analyzer\analyzer_20200502\vPointStructure.cpp" />
<ClCompile Include="..\..\..\..\Documents\source\analyzer\analyzer_20200502\vScreen.cpp" />
<ClCompile Include="..\..\..\..\Documents\source\analyzer\analyzer_20200502\vTriangle.cpp" />
</ItemGroup>

------

 

------

 (20200511)

Inclustion: wmain_001.cpp compilation:
Tough work, we'd rather love to avoid:

The reason:
1. C++ iso compilation:
2. C compilation(cdec):

And, inclusion as headder:

In common:
1. nullptr and NULL
2. #define _CRT_SECURE_NO_WARNINGS
3. #define _CRT_NONSTDC_NO_DEPRECATE

------

We must define "_CRT_SECURE_NO_WARNINGS" before <stdio.h> inclusion like the below:

 // : https://stackoverflow.com/questions/14386/fopen-deprecated-warning
#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>

------

 (20200512)
Compilation on the following the below: Success about Inclusion:
---
analyzer_C.h :
array_counter.h :
aToken.h :
parse.h :
Print.h :
sender.h :
wC_Structure.h :
---
analyzer_C.cpp :
array_counter.cpp :
aToken.cpp :
parse.cpp :
Print.cpp :
sender.cpp :
wC_Structure.cpp :
visualMain_001.cpp :
------

 (20200512)

------

 (20200513: Compilation: )

.\visualMain_001.cpp Wed May 13 18:41:05 2020

1 :#define WIN32_LEAN_AND_MEAN
2 :#define _WIN32_WINNT 0x501
3 :
4 :#include <stdio.h>
5 :#include <tchar.h>
6 :#include <windows.h>
7 :#include <windowsx.h>
8 :
9 :#include <ctime>
10 :
11 :#include <stdio.h>
12 :#include <stdlib.h>
13 :
14 :#include <windows.h>
15 :#include <winsock2.h>
16 :#include <ws2tcpip.h>
17 :#include <stdlib.h>
18 :#include <stdio.h>
19 :
20 :// #include "array_counter.h"
21 :#include "sender.h"
22 :#include "Print.h"
23 :#include "array_counter.h"
24 :#include "parse.h"
25 :#include "wC_structure.h"
26 :#include "analyzer_C.h"
27 :
28 :#define DEFAULT_BUFLEN 512
29 :#define DEFAULT_PORT "27015"
30 :
31 :#pragma comment(lib, "Ws2_32.lib")
32 :
33 :int sender_main_001(int argc, char** argv);
34 :int set_sender_default_parameters_001(int* argc, char** argv);
35 :
36 :/*#include "wTextarea.h"
37 :#include "clipboard.h"
38 :#include "Print.h" //ADD: 20191228
39 :*/
40 :
41 :/*#include "vPoint.h"
42 :#include "vLine.h"
43 :#include "vTriangle.h"
44 :#include "vCalculation.h"
45 :
46 :#include "vCurveCalculation.h"
47 :#include "vIntersection.h"
48 :#include "vScreen.h"
49 :#include "vLine.h"
50 :#include "vCircle.h"
51 :#include "vPointStructure.h"
52 :#include "vPointLinear.h"
53 :#include "display_threeD.h"
54 :#include "v3dCalculation.h"*/
55 :
56 ://v3dCalculation
57 :
58 :int main( int argc, char** argv ) {
59 : printf("main starts.\r\n");
60 :
61 : Analyzer* anl = new Analyzer();
62 : anl->analyze_C( argc, argv );
63 :
64 :
65 : log_msg_003("send_main\r\n");
66 : printf("main ends.\r\n");
67 : return 0;
68 :}
69 :

------

 

------

 

------

 

willinglytranslate.blogspot.com

------