Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Dave Yeo

Pages: [1] 2 3 ... 326
1
Seems __system__ etc are internal to GCC, no idea what is happening with the errors.
Are you including os2.h? If not, I think you have to include unidef.h for _system
BTW, even using dllexport, you still need a DEF file, just without any exports. Still need the NAME etc to be passed to the linker

2

.def file - the whole thing started as I could not find out how to convince
Code: [Select]
g++.exe (GCC) 9.2.0 20190812 (OS/2 RPM build 9.2.0-5.oc00)to use a .def file. So I thought it's more clear to put such thing straight into the code.

Just add the def file to the linker line. Should also use -Zomf for linking to use a native linker and be able to debug.
Code: [Select]
g++ -Zdll -Zomf foo.def foo.o -o foo.dll
or for an executable,
Code: [Select]
g++ -Zomf bar.def bar.o -o bar.exe
Add -Zmap to produce a map file, -Zhigh-mem to use high memory, -g for debug symbols etc.

BTW, libc seems to use _system, not __system__

3
Virtualization / Re: ArcaOS 5.1 on Apple Silicone
« on: Today at 12:49:47 am »
I doubt that 86box supports enough of the i386 to run OS/2 and for QEMU, they have finally fixed the bug that stopped OS/2 4.5+ running so as long as UTM has a new enough QEMU, it should work.

4
It uses open JDK 6.

What were the steps to get open JKD 6 to work on an OS/2 machine?

Code: [Select]
REQUIREMENTS

In order to use this version of OpenJDK, you will need the following:

  - A OS/2 Warp 4 Fixpack 16+, OS/2 Warp 4.5 or eComStation operating system.

  - LIBC runtime version 0.6.5 (you probably have it already installed):

    ftp://ftp.netlabs.org/pub/libc/libc-0_6_5-csd5.wpi

  - GCC 4 runtime libraries:

    ftp://ftp.netlabs.org/pub/gcc/gcc4core-1_2_1.wpi

  - Odin runtime version 0.8.9 or above:

    ftp://ftp.netlabs.org/pub/odin/0.8.9/odin-0.8.9.zip

  - Extended system tray widget for XCenter version 0.1.1 or above (optional,
    but required for system tray support in Java applications):

    ftp://ftp.netlabs.org/pub/qt4/xsystray/xsystray-0_1_1.wpi

If you use the YUM/RPM package manager, you may install all the requirements
with a single command from the command line (except the system tray widget):

    yum install libc libgcc446 libodin

Unluckily netlabs is having problems right now for downloading it. Alternative download, http://hobbesarchive.com/Home/Download?path=/Hobbes/pub/os2/system/java/OpenJDK_6_b27_GA5.wpi

Read the README.OS2 for installation directions.

5
I tried various combinations of dllexport (which seems to be mandatory to export the symbol) and stdcall cdecl... But I ever end up with exporting _NdpTypes instead NdpTypes. I was under the impression that c++ don't add the _ but obviously I misinterpreted some stuff.

Another idea, is there any emx tool which can modify the exported symbols? Or add a new symbol to a dll which references to the orignal?

Btw. this all started cause I didn't manage to convince c++/linker to work with a .def file as it was used with icc or watcom. You know I'm not experienced with all this stuff so there is much guessing on my side.

You only need dllexport if you don't have the symbols in the def file. Traditionally, before we got dllexport, you hand wrote a DEF file including the exports, either by name or ordinal or you ran emxexp on the
object files and piped the results to the def file. Run emxexp with no parameters to see usage..
I've only done it the other way, pulling in symbols from a GCC DLL to a OW binary.
Note that with OW, you have to be careful to use the right calling convention to begin with, it defaults to its own calling convention which is incompatible with GCC DLLs, it uses registers instead of the stack.
See "Open Watcom 2.0 C/C++ Programmers Guide under Commonly Asked Questions, Converting to OpenWatcom C/C++, Conversion from IBM-compatible PC compilers.
In the case of porting from icc or OW, I simply edit the DEF, adding the underscores

Edit: You might also need the extern keyword

6
Isn't it _System to use non-underscored variable names?

Might be.

7
Applications / Re: Experiment: Moving OS/2 Graphic/MM Resources
« on: July 15, 2024, 05:56:49 pm »
After unpacking, preferably a copy of the DLL, you can run strings on it, piping the results through less,
Code: [Select]
strings WPCONFIG.DLL | less
And see all text in the DLL. Strings is not perfect so you do get some garbage mixed in. There's a lot of strings in this DLL.
Or if you know what you are looking for, use grep,
Code: [Select]
H:\tmp>strings WPCONFIG.DLL  | grep "POINTERS"
NAMEFILTER=*;CLASSLIST=WPPointer;STARTFOLDER=?:\OS2\POINTERS;DEFAULTCRITERIA=YES

NAMEFILTER=*;CLASSLIST=WPFolder;STARTFOLDER=?:\OS2\POINTERS;DEFAULTCRITERIA=YES DIALOG=NO

8
Applications / Re: Experiment: Moving OS/2 Graphic/MM Resources
« on: July 14, 2024, 07:25:12 pm »
I think "lxlite /x file"

9
It's one of the things that I find irritating about the various Linux desktop environments, this forcing everything to open in the centre of the desktop. In theory you could pass -geometry x y IIRC to force where to open but wouldn't be surprised geometry is ignored.
Another irritation is associating an icon with a program, which seems non-trivial.

10
Hi JTA, earlier versions of Hobbes existed, some were distributed in CD form by Walnut Creek such as https://archive.org/details/hobbes-arch, there's a couple of other ones floating around.
Most of this software will run on AOS, sometimes needing a simple recompile.

11
Applications / Re: ArcaOS v5.1 and VirtualBox OS/2 Version
« on: July 05, 2024, 02:22:37 am »
Was wondering if you were finally able to download the VBOX source?

I was having profile problems the last few days, which was locking me out of my account here. But two days ago, I noted an email was sent to Adrian @ Netlabs that trac.netlabs.org timeline was not working as expected, and downloads were really slow.

Best!

M

Hi Mark, I ended up downloading in Linux, where it only timed out once. Building, I ran into a problem with OpenSSL where the API has changed and it seems non-trivial to figure it out, at least for me. Guess I should download the official source and see how they fixed it.
Meanwhile after a normal wet cold spring, something that hasn't been happening here for some years, we're back to the heat, only low 30's unlike the other year where it was mid 40's. At least no fires or flooding, at that the Fraser barely rose at all at the Mission train bridge.
Hopefully you will have an uneventful year.

12
It's the calling convention, cdecl vs stdcall. I think you need __attribute__ ((__cdecl)), might be ((__stdlib)) and __declspec instead of __attribute__
Code: [Select]
__attribute__ ((dllexport)) __attribute__((__stdcall)) extern const char *NdpTypes[];
or __cdecl
Been a while since I thought about this so sorry for being unclear, needed it in the past for linking OW and GCC.
gcc vs g++ shouldn't matter

13
Applications / Re: General Software Testing
« on: June 30, 2024, 08:50:34 am »
I did try that, along with a larger stack,
Code: [Select]
06-25-2024  22:00:48  SYS3175  PID 01d5  TID 0001  Slot 0082
H:\TMP\FRACTZ\FRACTZ.EXE
c0000005
1f9adf76
P1=00000001  P2=0c685000  P3=XXXXXXXX  P4=XXXXXXXX
EAX=00001740  EBX=00001740  ECX=00000230  EDX=121ff344
ESI=0c685000  EDI=122001c4
DS=0053  DSACC=d0f3  DSLIM=bfffffff
ES=0053  ESACC=d0f3  ESLIM=bfffffff
FS=150b  FSACC=00f3  FSLIM=00000030
GS=0000  GSACC=****  GSLIM=********
CS:EIP=005b:1f9adf76  CSACC=d0df  CSLIM=bfffffff
SS:ESP=0053:0809278c  SSACC=d0f3  SSLIM=bfffffff
EBP=ffffe8c0  FLG=00010202

PMMERGE.DLL 0004:0001df76

I've since lost my work as it was on the ram disk

14
Applications / Re: ArcaOS v5.1 and VirtualBox OS/2 Version
« on: June 29, 2024, 07:27:51 am »
As a general comment, since this version of VirtualBox was compiled on 2018, I really hope/wish that someone can recompile it just point to our currents DLLs. (if it works). I guess the full source code is here: http://trac.netlabs.org/vbox/browser?order=name

Thought I'd give it a try, or at least see where newer GCC's have broken it. Unluckily I'm having a hell of a time downloading the source. I've downloaded about 1.5 GB's so far. It runs for a while updating the files, then stalls though I see I'm downloading at close to 500KB/s, eventually times out, have to do a "svn cleanup" and redo "svn up"
The correct command for the source is,
Code: [Select]
svn checkout https://svn.netlabs.org/repos/vbox/ vbox
Adjust the last argument to how you want the source labeled.
More later when I get the source downloaded.
BTW, IIRC, the workaround for that error was to wait a while and retry.

15
Applications / Re: General Software Testing
« on: June 28, 2024, 05:02:12 pm »
Ran fine here, besides the default scaling being too small. After adjusting the scale to 100% looks good.

Pages: [1] 2 3 ... 326