Jump to content
Excelsior Forums


  • Content count

  • Joined

  • Last visited


Everything posted by Dimych

  1. C++ linkage

    Hello! Is it possible to link program with C++ library? One have C++ library (*.lib) with classes. Is it possible to create objects and call class/object methods? Thanks.
  2. Compiler error

    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?
  3. Modula-2 Debugger and C++ Exceptions

    I think you should ask Excelsior team directly, since it is an 'internal' question.
  4. Syntax highlighting

    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
  5. Syntax highlighting

    Hi! Try to use PSPAD Editor. http://www.pspad.com/index_en.html It has a lot of syntax highlighters, including Modula-2. Another one is a Far manager http://farmanager.com/?l=en with Colorer Plugin http://colorer.sourceforge.net/
  6. No, there is not. There is another question. Do you have some plans about 64 bit version?
  7. GDI+ problems

    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.
  8. GDI+ problems

    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
  9. Detecting EOF of pipeline input

    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).
  10. GDI+ problems

    The problem is that GDI+ is written in C++ and its interface is in C++ too. The possible solution is to use GdiPlus Delphi API as a start http://www.progdigy.com/modules.php?name=gdiplus and make the same with Modula/Oberon.
  11. XDS Modula 2 Debugger and .Net

    And what was the solution?
  12. Can you post both Modula code and C++ code to review?
  13. I have large *.h file with many #include clauses. When I run "h2d header.h", h2d fails with message #RTS: unhandled exception #18: out of heap space. As I understand, h2d cannot allocate more memory. Well, my machine has 512 MB memory... What should I do? Thanks
  14. h2d memory requirements

    One more thing What does it means: " ** Can't create identifier from <include/h1.h>"? (Error message printed by h2d)
  15. FreeBSD

    It works fine! Thanks!
  16. GTK+ in Modula 2

    Does anyone know, what does it means: I've called "h2d header.h" where header.h is a C header file, I've got message "All files are up to date" and no *.def files produced. What should I do?
  17. GTK+ in Modula 2

    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.
  18. GTK+ in Modula 2

    Well, xlib is a part of xds package... I spent at least 2 weeks until understand how it works...
  19. GTK+ in Modula 2

    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.
  20. GTK+ in Modula 2

    Project files are not simple to understand... Try xc =p hello.prj Review hello.prj and you'll see that hello.mod is pointed by !module directive.
  21. GTK+ in Modula 2

    Can you explain the problem? Show error messages, please.
  22. GTK+ in Modula 2

    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.
  23. GTK+ in Modula 2

    Hi! I've made GTK+ binding for Modula-2. It is version 1.0, so it is not bug free and need a lot of work. But it works! http://sourceforge.net/projects/xds-gtk2/ Use and enjoy!
  24. DLL/Oberon-2

    Hello! There is a sample how to make/use DLL in an distribution of Native XDS. But it is created with Modula-2. Is it possible to do the same with Oberon-2? And how (compiler options, definitions etc.)? Thanks!