Commit 8997b78dd05abfea6226a33181c2d1fc6be6782b
1 parent
d8474916
Exists in
master
and in
3 other branches
Working on C++ API.
Showing
5 changed files
with
18 additions
and
8 deletions
Show diff stats
src/lib3270++/Makefile.in
| @@ -29,7 +29,8 @@ | @@ -29,7 +29,8 @@ | ||
| 29 | LIBNAME=lib@LIB3270_NAME@++ | 29 | LIBNAME=lib@LIB3270_NAME@++ |
| 30 | 30 | ||
| 31 | SOURCES= \ | 31 | SOURCES= \ |
| 32 | - $(wildcard *.cc) | 32 | + $(wildcard *.cc) \ |
| 33 | + $(wildcard local/*.cc) \ | ||
| 33 | 34 | ||
| 34 | TEST_SOURCES= \ | 35 | TEST_SOURCES= \ |
| 35 | $(wildcard testprogram/*.cc) | 36 | $(wildcard testprogram/*.cc) |
| @@ -198,6 +199,7 @@ $(BINRLS)/$(LIBNAME)@DLLEXT@.@PACKAGE_MAJOR_VERSION@.@PACKAGE_MINOR_VERSION@: \ | @@ -198,6 +199,7 @@ $(BINRLS)/$(LIBNAME)@DLLEXT@.@PACKAGE_MAJOR_VERSION@.@PACKAGE_MINOR_VERSION@: \ | ||
| 198 | -o $@ \ | 199 | -o $@ \ |
| 199 | $(LDFLAGS) \ | 200 | $(LDFLAGS) \ |
| 200 | $(foreach SRC, $(basename $(SOURCES)), $(OBJRLS)/$(SRC).o) \ | 201 | $(foreach SRC, $(basename $(SOURCES)), $(OBJRLS)/$(SRC).o) \ |
| 202 | + -L$(BINRLS) \ | ||
| 201 | $(LIBS) | 203 | $(LIBS) |
| 202 | 204 | ||
| 203 | $(BINRLS)/$(LIBNAME).a: \ | 205 | $(BINRLS)/$(LIBNAME).a: \ |
| @@ -288,7 +290,12 @@ $(BINDBG)/$(LIBNAME)@EXEEXT@: \ | @@ -288,7 +290,12 @@ $(BINDBG)/$(LIBNAME)@EXEEXT@: \ | ||
| 288 | 290 | ||
| 289 | @$(MKDIR) `dirname $@` | 291 | @$(MKDIR) `dirname $@` |
| 290 | @echo $< ... | 292 | @echo $< ... |
| 291 | - $(LD) -o $@ $^ $(LDFLAGS) $(LIBS) | 293 | + @$(LD) \ |
| 294 | + -Wl,--rpath,$(BINDBG) \ | ||
| 295 | + -o $@ \ | ||
| 296 | + $^ \ | ||
| 297 | + $(LDFLAGS) \ | ||
| 298 | + $(LIBS) | ||
| 292 | 299 | ||
| 293 | run: \ | 300 | run: \ |
| 294 | $(BINDBG)/$(LIBNAME)@EXEEXT@ | 301 | $(BINDBG)/$(LIBNAME)@EXEEXT@ |
| @@ -330,11 +337,15 @@ $(BINDBG)/$(LIBNAME)@DLLEXT@.@PACKAGE_MAJOR_VERSION@.@PACKAGE_MINOR_VERSION@: \ | @@ -330,11 +337,15 @@ $(BINDBG)/$(LIBNAME)@DLLEXT@.@PACKAGE_MAJOR_VERSION@.@PACKAGE_MINOR_VERSION@: \ | ||
| 330 | @$(MKDIR) `dirname $@` | 337 | @$(MKDIR) `dirname $@` |
| 331 | @echo $< ... | 338 | @echo $< ... |
| 332 | @$(LD) \ | 339 | @$(LD) \ |
| 333 | - -shared -Wl,-soname,$(@F) \ | 340 | + -shared \ |
| 341 | + -Wl,-soname,$(@F) \ | ||
| 342 | + -Wl,--rpath,$(BINDBG) \ | ||
| 334 | -o $@ \ | 343 | -o $@ \ |
| 335 | $(LDFLAGS) \ | 344 | $(LDFLAGS) \ |
| 336 | $(foreach SRC, $(basename $(SOURCES)), $(OBJDBG)/$(SRC).o) \ | 345 | $(foreach SRC, $(basename $(SOURCES)), $(OBJDBG)/$(SRC).o) \ |
| 337 | - $(LIBS) | 346 | + -L$(BINDBG) \ |
| 347 | + $(LIBS) \ | ||
| 348 | + -l3270 | ||
| 338 | 349 | ||
| 339 | #---[ Clean Targets ]-------------------------------------------------------------------- | 350 | #---[ Clean Targets ]-------------------------------------------------------------------- |
| 340 | 351 |
src/lib3270++/lib3270++.cbp
| @@ -3,6 +3,7 @@ | @@ -3,6 +3,7 @@ | ||
| 3 | <FileVersion major="1" minor="6" /> | 3 | <FileVersion major="1" minor="6" /> |
| 4 | <Project> | 4 | <Project> |
| 5 | <Option title="C++ Bindings for lib3270" /> | 5 | <Option title="C++ Bindings for lib3270" /> |
| 6 | + <Option makefile_is_custom="1" /> | ||
| 6 | <Option pch_mode="2" /> | 7 | <Option pch_mode="2" /> |
| 7 | <Option compiler="gcc" /> | 8 | <Option compiler="gcc" /> |
| 8 | <Build> | 9 | <Build> |
src/lib3270++/local/events.cc
| @@ -50,7 +50,7 @@ | @@ -50,7 +50,7 @@ | ||
| 50 | namespace TN3270 { | 50 | namespace TN3270 { |
| 51 | 51 | ||
| 52 | /// @brief Popup Handler. | 52 | /// @brief Popup Handler. |
| 53 | - int Local::Session::popupHandler(H3270 *h3270, LIB3270_NOTIFY type, const char *title, const char *msg, const char *fmt, va_list arg) { | 53 | + void Local::Session::popupHandler(H3270 *h3270, LIB3270_NOTIFY type, const char *title, const char *msg, const char *fmt, va_list arg) { |
| 54 | 54 | ||
| 55 | Local::Session * session = (Local::Session *) lib3270_get_user_data(h3270); | 55 | Local::Session * session = (Local::Session *) lib3270_get_user_data(h3270); |
| 56 | 56 | ||
| @@ -100,8 +100,6 @@ | @@ -100,8 +100,6 @@ | ||
| 100 | 100 | ||
| 101 | session->fire(PopupEvent(type,title,msg,fmt,arg)); | 101 | session->fire(PopupEvent(type,title,msg,fmt,arg)); |
| 102 | 102 | ||
| 103 | - return 0; | ||
| 104 | - | ||
| 105 | } | 103 | } |
| 106 | 104 | ||
| 107 | /// @brief Connect Handler. | 105 | /// @brief Connect Handler. |
src/lib3270++/private.h
| @@ -113,7 +113,7 @@ | @@ -113,7 +113,7 @@ | ||
| 113 | std::mutex sync; | 113 | std::mutex sync; |
| 114 | 114 | ||
| 115 | /// @brief Popup Handler. | 115 | /// @brief Popup Handler. |
| 116 | - static int popupHandler(H3270 *session, LIB3270_NOTIFY type, const char *title, const char *msg, const char *fmt, va_list arg); | 116 | + static void popupHandler(H3270 *session, LIB3270_NOTIFY type, const char *title, const char *msg, const char *fmt, va_list arg); |
| 117 | 117 | ||
| 118 | /// @brief Connect Handler. | 118 | /// @brief Connect Handler. |
| 119 | static void connectHandler(H3270 *session, unsigned char connected); | 119 | static void connectHandler(H3270 *session, unsigned char connected); |