|
Post by barryk on Oct 23, 2014 4:02:00 GMT 1
Hi all, I downloaded 3.0.2beta a couple of days ago, and compiled hug.so.
Problem is, now all my previous apps that use the hug.so shared lib, won't start:
Symbol not found in library /usr/lib/hug.so: undefined symbol: HUGENTRY
I do vaguely recall ages go, having this problem when the symbol got changed from ENTRY to HUGENTRY -- have I remembered that right?
Anyway, is there a problem with the hug.so beta, or do I need to recompile my apps against the new hug.so?
Regards, Barry Kauler
|
|
|
Post by vovchik on Oct 23, 2014 18:38:29 GMT 1
Dear Barry, Peter dropped HUGENTRY in HUG v. 0.95 (current version is 0.96): REM Version 0.95 - Replaced MARKUP for HUGOPTION("MARKUP") to allow individual coloring of multiline text widgets REM - Deleted HUGENTRY alias as BaCon does not need <search.h> header file anymore
Since the symbol HUGENTRY will be in your old binaries and not in the new HUG lib, I think you will have to recompile the binaries if you use the new HUG. With kind regards, vovchik
|
|
|
Post by alexfish on Oct 23, 2014 20:36:16 GMT 1
Not sure if this of help
noticed the diff on the imports as
old =
IMPORT "HUGENTRY(char*,int,int)" FROM HUG_lib$ TYPE long ALIAS ENTRY
new=
IMPORT "ENTRY(char*,int,int)" FROM HUG_lib$ TYPE long ALIAS ENTRY
so for compat has there been an err
could try
IMPORT "ENTRY(char*,int,int)" FROM HUG_lib$ TYPE long ALIAS HUGENTRY
in the old hug lib there is at about line 806
USEC #define ENTRY HUGENTRY END USEC
only h hunch
could try a compile with
USEC #define HUGENTRY ENTRY END USEC
EDIT none of the above works
what will work after testing was to add the original HUGENTRY code to the new lib
so looks like recompile apps or the below
REM --------------------------------------------------------------------------------------------------
FUNCTION ENTRY(STRING hug_text$, int hug_xsize, int hug_ysize)
LOCAL ent
ent = gtk_entry_new() gtk_entry_set_text(ent, hug_text$) IF HUG_WIDGET_SHOW THEN gtk_widget_show(ent)
hug_widget_xsize(STR$(ent)) = hug_xsize hug_widget_ysize(STR$(ent)) = hug_ysize hug_widget_signal(STR$(ent)) = 3 hug_widget_s_widget(STR$(ent)) = ent
hug_widget_type$(STR$(ent)) = "entry" hug_widget_font(STR$(ent)) = ent hug_widget_focus(STR$(ent)) = ent WIDGET = ent
RETURN ent
END FUNCTION
FUNCTION HUGENTRY(STRING hug_text$, int hug_xsize, int hug_ysize)
LOCAL ent
ent = gtk_entry_new() gtk_entry_set_text(ent, hug_text$) IF HUG_WIDGET_SHOW THEN gtk_widget_show(ent)
hug_widget_xsize(STR$(ent)) = hug_xsize hug_widget_ysize(STR$(ent)) = hug_ysize hug_widget_signal(STR$(ent)) = 3 hug_widget_s_widget(STR$(ent)) = ent
hug_widget_type$(STR$(ent)) = "entry" hug_widget_font(STR$(ent)) = ent hug_widget_focus(STR$(ent)) = ent WIDGET = ent
RETURN ent
END FUNCTION REM --------------------------------------------------------------------------------------------------
other than that looks like a one for Peter
BR Alex
|
|
|
Post by barryk on Oct 24, 2014 1:59:26 GMT 1
alexfish, That fixed it!
Yes, I just inserted that HUGENTRY function into hug.bac, recompiled hug.so, and my apps work.
Thanks very much for figuring that out!
Regards, Barry
|
|
|
Post by Pjot on Oct 24, 2014 19:43:08 GMT 1
Hi Barry,
It seems I've been too rigorous deleting the workaround for the 'ENTRY' symbol, which unfortunately also appears in the <search.h> header file.
BaCon used this header files for looking up associative array members. However, it turns out that not all Unix platforms support it (e.g. Android), so the required functionality was replaced by a native implementation.
Therefore. the <search.h> header file was not needed anymore, and the workaround in HUG for the ENTRY symbol was not necessary.
The proposed solution by Alex works of course. To save code, it also can be done as follows:
FUNCTION HUGENTRY(STRING hug_text$, int hug_xsize, int hug_ysize)
RETURN ENTRY(hug_text$, hug_xsize, hug_ysize)
END FUNCTION
I will add this to the default HUG context.
Regards Peter
|
|