Commit 0e98696981da651b9b4eb6b5ab444b5c395413a1

Authored by Perry Werneck
1 parent 4cb4d2e2
Exists in master and in 1 other branch develop

Working on MSVC build.

.gitignore
... ... @@ -25,5 +25,9 @@ doxygen/doxyfile
25 25 doxygen/html
26 26 *.obj
27 27 *.bat
  28 +*.exe
  29 +*.dll
  30 +*.lib
  31 +*.exp
28 32  
29 33  
... ...
client/src/core/windows/dynamic/init.cc
... ... @@ -42,6 +42,7 @@
42 42  
43 43 #if defined(_MSC_VER)
44 44 #pragma comment(lib,"lib3270.lib")
  45 + #pragma comment(lib,"DelayImp.lib")
45 46 #endif // _MSC_VER
46 47  
47 48 extern "C" {
... ...
client/src/include/lib3270/ipc.h
... ... @@ -39,7 +39,7 @@
39 39 #include <lib3270/keyboard.h>
40 40 #include <lib3270/actions.h>
41 41  
42   - #if defined(_WIN32)
  42 + #if defined(_WIN32) || defined(_MSC_VER)
43 43  
44 44 #define TN3270_PUBLIC __declspec (dllexport)
45 45 #define TN3270_PRIVATE
... ...
client/src/testprogram/testprogram.cc
... ... @@ -41,6 +41,10 @@
41 41 #pragma GCC diagnostic ignored "-Wunused-function"
42 42 #endif // _WIN32
43 43  
  44 +#if defined(_MSC_VER)
  45 + #pragma comment(lib,"ipc3270.lib")
  46 +#endif // _MSC_VER
  47 +
44 48 #include <cstdlib>
45 49 #include <lib3270.h>
46 50 #include <lib3270/ipc.h>
... ... @@ -117,6 +121,9 @@
117 121 // test host object
118 122 static void testHost(const char *session) {
119 123  
  124 + cout
  125 + << "Creating host" << endl;
  126 +
120 127 TN3270::Host host{session,nullptr,10};
121 128  
122 129 try {
... ...
lib3270.dll
No preview for this file type
lib3270.exp
No preview for this file type
lib3270.lib
No preview for this file type
win/Makefile.msc
... ... @@ -75,17 +75,29 @@ OBJ_FILES= \
75 75 /DPACKAGE_NAME=\"ipc3270\" \
76 76 /DPRODUCT_NAME=\"$(PRODUCT_NAME)" \
77 77 /DLIB3270_NAME=\"$(LIB3270_NAME)" \
  78 + /DDEBUG=1 \
78 79 /I"C:\msys64\project\pw3270\ipc\client\src\include" \
79 80 /I"c:\Program Files\pw3270\sdk\include" \
80 81 /EHsc \
81 82 /Fo"$@" \
82 83 $<
83 84  
  85 +testprogram.exe: \
  86 + client\src\testprogram\testprogram.obj \
  87 + ipc3270.dll
  88 + @echo Build exe file....
  89 + link \
  90 + /nologo \
  91 + /OUT:"$@" \
  92 + client\src\testprogram\testprogram.obj
  93 +
84 94 ipc3270.dll: \
85 95 $(OBJ_FILES) \
86 96 client\src\core\windows\dynamic\init.obj \
87 97 lib3270.lib
  98 + @echo Build dll file....
88 99 link \
  100 + /NOLOGO \
89 101 /DLL \
90 102 /OUT:"$@" \
91 103 $(OBJ_FILES) \
... ... @@ -98,4 +110,9 @@ $(LIB3270_NAME).lib:
98 110 /out:$(LIB3270_NAME).lib
99 111  
100 112 clean:
101   - del $(LIB3270_NAME).lib
102 113 \ No newline at end of file
  114 + del \
  115 + $(LIB3270_NAME).lib \
  116 + $(LIB3270_NAME).dll \
  117 + ipc3270.lib \
  118 + ipc3270.dll \
  119 + $(OBJ_FILES)
... ...