Jump to content
Excelsior Forums

Dimych

Members
  • Content count

    0
  • Joined

  • Last visited

    Never

Posts posted by Dimych


  1. Hello!

    I have 2 questions.

    1) When I do "xc =browse module.ob2" it produces error "ASSERT(FALSE, 15)"

    2) When I do "xc =m module.ob2" it produces error

    "xlink fatal error (40) File ... - too much data for segment _TEXT".

    Both modules compiles (xc module.ob2) without error.

    How to resolve?


  2. Thanks, I got it :)

    Any chance there's also Oberon-2 syntax highlighting to be found?

    Thanks, I got it :)

    Any chance there's also Oberon-2 syntax highlighting to be found?

    1) Create file $(PS PAD folder)\syntax\Oberon-2.ini

    2) Paste lines below into it and save

    ===cut===

    ;PSPad user HighLighter definition file

    [settings]

    Name=Oberon-2

    HTMLGroup=0

    Label=1

    FileType=*.ob2,*.mod,*.obn

    CommentString=

    ANSIComment=1

    SQLComment=1

    IndentChar=

    UnIndentChar=

    TabWidth=2

    CaseSensitive=1

    SingleQuote=1

    DoubleQuote=1

    KeyWordChars=_

    CodeExplorer=ftUnknown

    [KeyWords]

    ARRAY=

    BEGIN=

    BY=

    CASE=

    CONST=

    DIV=

    DO=

    ELSE=

    ELSIF=

    END=

    EXIT=

    FOR=

    IF=

    IMPORT=

    IN=

    IS=

    LOOP=

    MOD=

    MODULE=

    NIL=

    OF=

    OR=

    POINTER=

    PROCEDURE=

    RECORD=

    REPEAT=

    RETURN=

    THEN=

    TO=

    TYPE=

    UNTIL=

    VAR=

    WHILE=

    WITH=

    [ReservedWords]

    [KeyWords2]

    ABS=

    ASH=

    CAP=

    CHAR=

    CHR=

    COPY=

    DEC=

    ENTIER=

    EXCL=

    HALT=

    INC=

    INCL=

    LEN=

    LONG=

    MAX=

    MIN=

    NEW=

    ODD=

    ORD=

    SET=

    SHORT=

    SIZE=

    [KeyWords3]

    BOOLEAN=

    CHAR=

    INTEGER=

    LONGINT=

    LONGREAL=

    REAL=

    SET=

    SHORTINT=

    ===cut===

    3) Choose Settings / Highlighter settings

    Scroll down to "<not assigned>", select it.

    On a tab "Specification" in the list "user highlighter" choose "Oberon-2"

    4) On tab "Colors" choose colors (font attributes) you like

    Key - Oberon keywords like "BEGIN"

    Key 2 - built in procedures like "ABS"

    Key 3 - built in datatypes like "BOOLEAN".

    5) Enjoy


  3. Perhaps I will make a SourceForge project of it, but currently I haven't got the time to manage such project. And to be honest, I don't think of modula-2 as thing I am willing to spend a lot of time with in the future (as I only needed to use XDS Modula-2 for a project for university, and I don't think of Modula-2 in general as a comfortable programming language).

    Language might be as comfortable as you want.

    My area of interest is Oberon more than Modula, but I can say, that both languages helps you make your program clearer than C(++)/Java.

    Make some libs, publish your code, and your work we'll be more comfortable.


  4. As far as I can recall, there once was a (deprecated) plain C API for GDI+. The C++ API used to be nothing more than a wrapper for that. You could try searching MSDN library.

    I'm aware of this flat C headers, in any case, I have a C headers file (gdiplusflat.h or was it gidplus_flat.h)  for the GDI+ which doesn't use any object ori?nted facilities, but it also doesn't load in H2D, so it's currently worthless to me.

    Update:

    I've got it working by now :-) Only some minor bugs in it, but debugging isn't an issue.

    Thank you, Dimych !

    If anyone wants my code (DLL, LIB, DEF, Delphi Project etc.), feel free to ask (send a mail or something, but please not that it doesn't include all features, only the loading of pictures to a buffer, which gets drawn onto a from. The code is also not an example of bug-proof, as it uses Delphi OpenArrays with no form of checking the indexes (which you get to assign by yourself).

    Publish it on sourceforge.net and post link here  :)


  5. I wrote a simple Delphi program to check console:

    program scat;

    {$Apptype console}

    var

      ch: char;

    begin

      while not eof do

        begin

          Read(ch);

          Write(ch);

        end;

    end.

    Well, it works fine as "scat.exe < scat.dpr | scat.exe"

    I think that ReadChar has an error because Delphi's code makes some checks while opening text file (and console too).


  6. However, I cannot seem to find the following functions (invoked from gtk2.mod).

    gtk_file_chooser_default_get_type

    gtk_file_chooser_embed_get_type

    gtk_file_chooser_entry_get_type

    A few mad searches using nm and grep turned up nothing.  Perhaps Dimych can tell us the library where they are found.

    This functions are exist in gtk2.def, but they have underscore prefix (i.e. _gtk_file_chooser_default_get_type).

    It was so in source *.inc file (and I don't know why).

    Moreover, this functions (like many other) are declared as part of GTK+ 2.4 and higher.

    Possibly I've lost some conditional defines - I'll review the library.


  7. The problem is that you made symlink to *.so libs.

    *.so (same as *.dll on windows) is a "code library".

    Your code (program) after compilation should be linked, that means that linker should take *.so (*.dll) and insert into your program some code which will locate functions within shared libraries. This is done with tool xlib.

    Steps to link:

    0) drop symlinks from ./lib

    1) xlib /implib  libatk-1.0.so.0.1213.0.lib /usr/lib/libatk-1.0.so.0.1213.0

    1a) ...same for other files

    2) copy/move created *.lib to ./lib

    (that files needed to link your compiled files - *.o to concrete file)

    3) try to build again.

    Well, it works on Windows.

    As far as I know, it must work on Linux.


  8. At the risk of sounding brainless, I have to ask:  Where do I find the Xlib libraries that I need to put in to the lib/ directory?

    I've done a locate on the names shown in the project file, and looked in the xds/ and many of my system libraray directories, and I don't see them. 

    This is on Linux, if it's significant.

    You've asked right question.

    Quote from readme.txt:

    "1) Create *.lib file (xlib /implib  <name>.lib <name>.dll)"

    It is on Windows.

    I've installed GTK+ and run command shown above in folder C:\Program Files\Common Files\Gtk\2.0\bin for each dll found there.

    I don't know where *.so libs located on Linux, but I think it is something like /usr/lib or /lib.

    Run command "xlib /implib <name>.lib <name>.so" there and you'll get libs you need. Copy them (*.lib) to "lib" folder near with hello.mod, correct *.prj file (lib names should be exact) and compile.

×