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 | 29 | LIBNAME=lib@LIB3270_NAME@++ |
| 30 | 30 | |
| 31 | 31 | SOURCES= \ |
| 32 | - $(wildcard *.cc) | |
| 32 | + $(wildcard *.cc) \ | |
| 33 | + $(wildcard local/*.cc) \ | |
| 33 | 34 | |
| 34 | 35 | TEST_SOURCES= \ |
| 35 | 36 | $(wildcard testprogram/*.cc) |
| ... | ... | @@ -198,6 +199,7 @@ $(BINRLS)/$(LIBNAME)@DLLEXT@.@PACKAGE_MAJOR_VERSION@.@PACKAGE_MINOR_VERSION@: \ |
| 198 | 199 | -o $@ \ |
| 199 | 200 | $(LDFLAGS) \ |
| 200 | 201 | $(foreach SRC, $(basename $(SOURCES)), $(OBJRLS)/$(SRC).o) \ |
| 202 | + -L$(BINRLS) \ | |
| 201 | 203 | $(LIBS) |
| 202 | 204 | |
| 203 | 205 | $(BINRLS)/$(LIBNAME).a: \ |
| ... | ... | @@ -288,7 +290,12 @@ $(BINDBG)/$(LIBNAME)@EXEEXT@: \ |
| 288 | 290 | |
| 289 | 291 | @$(MKDIR) `dirname $@` |
| 290 | 292 | @echo $< ... |
| 291 | - $(LD) -o $@ $^ $(LDFLAGS) $(LIBS) | |
| 293 | + @$(LD) \ | |
| 294 | + -Wl,--rpath,$(BINDBG) \ | |
| 295 | + -o $@ \ | |
| 296 | + $^ \ | |
| 297 | + $(LDFLAGS) \ | |
| 298 | + $(LIBS) | |
| 292 | 299 | |
| 293 | 300 | run: \ |
| 294 | 301 | $(BINDBG)/$(LIBNAME)@EXEEXT@ |
| ... | ... | @@ -330,11 +337,15 @@ $(BINDBG)/$(LIBNAME)@DLLEXT@.@PACKAGE_MAJOR_VERSION@.@PACKAGE_MINOR_VERSION@: \ |
| 330 | 337 | @$(MKDIR) `dirname $@` |
| 331 | 338 | @echo $< ... |
| 332 | 339 | @$(LD) \ |
| 333 | - -shared -Wl,-soname,$(@F) \ | |
| 340 | + -shared \ | |
| 341 | + -Wl,-soname,$(@F) \ | |
| 342 | + -Wl,--rpath,$(BINDBG) \ | |
| 334 | 343 | -o $@ \ |
| 335 | 344 | $(LDFLAGS) \ |
| 336 | 345 | $(foreach SRC, $(basename $(SOURCES)), $(OBJDBG)/$(SRC).o) \ |
| 337 | - $(LIBS) | |
| 346 | + -L$(BINDBG) \ | |
| 347 | + $(LIBS) \ | |
| 348 | + -l3270 | |
| 338 | 349 | |
| 339 | 350 | #---[ Clean Targets ]-------------------------------------------------------------------- |
| 340 | 351 | ... | ... |
src/lib3270++/lib3270++.cbp
src/lib3270++/local/events.cc
| ... | ... | @@ -50,7 +50,7 @@ |
| 50 | 50 | namespace TN3270 { |
| 51 | 51 | |
| 52 | 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 | 55 | Local::Session * session = (Local::Session *) lib3270_get_user_data(h3270); |
| 56 | 56 | |
| ... | ... | @@ -100,8 +100,6 @@ |
| 100 | 100 | |
| 101 | 101 | session->fire(PopupEvent(type,title,msg,fmt,arg)); |
| 102 | 102 | |
| 103 | - return 0; | |
| 104 | - | |
| 105 | 103 | } |
| 106 | 104 | |
| 107 | 105 | /// @brief Connect Handler. | ... | ... |
src/lib3270++/private.h
| ... | ... | @@ -113,7 +113,7 @@ |
| 113 | 113 | std::mutex sync; |
| 114 | 114 | |
| 115 | 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 | 118 | /// @brief Connect Handler. |
| 119 | 119 | static void connectHandler(H3270 *session, unsigned char connected); | ... | ... |