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 ... 301
Programming / Re: Duplicate symbol error
« on: October 02, 2023, 07:55:48 am »
Interesting that including it twice caused it. Builds here, crashes in Qt5pdf right away, so have to try to debug it.

Programming / Re: Duplicate symbol error
« on: October 02, 2023, 01:35:11 am »
Hi Flashback, thanks for the correction.
As for "moc_screensaver.cpp", all the source files seem to have moc_*.cpp included at the end of their files with the corresponding name of the cpp file. They're scattered through the generated Makefile

Programming / Re: Duplicate symbol error
« on: October 02, 2023, 01:28:15 am »
Hi Dave,
Did you look at the old ported smplayer sources by BWW, how they did it there, probably a lot off diff changes...
But you never know :)

Thanks for the link, was wondering about the source as they changed from svn  to git and no old commits.
Silvan luckily got his patches committed so it is mostly a matter of bit rot. In the case of the screensaver support, when they added supported for turning off power management on *nix they moved the WIn32/OS/2 code from screensaver.cpp to winscreensaver.cpp. To my inexpert eye, the only real change is making the class QObject, at that seems most classes are QObject and I don't think that is the problem.

Hardware / Re: ArcaOS on a HP EliteBook 840 G3?
« on: October 01, 2023, 09:47:11 am »
Ok, see  readusb.txt in ArcaOS-5.1.0-en.7z and how to use dfsanwin.exe to create your stick under Windows. I've never done it

Programming / Re: Duplicate symbol error
« on: October 01, 2023, 09:38:49 am »
So what does "moc_screensaver.cpp" contain ?

Good question. Seems to be a generated file that is not compiled and only in build/ which I created to do the compile in.
Code: [Select]
** Meta object code from reading C++ file 'screensaver.h'
** Created by: The Qt Meta Object Compiler version 67 (Qt 5.15.2)
** WARNING! All changes made in this file will be lost!

#include <memory>
#include "../src/screensaver.h"
#include <QtCore/qbytearray.h>
#include <QtCore/qmetatype.h>
#error "The header file 'screensaver.h' doesn't include <QObject>."
#error "This file was generated using the moc from 5.15.2. It"
#error "cannot be used with the include files from this version of Qt."
#error "(The moc has changed too much.)"

struct qt_meta_stringdata_ScreenSaver_t {
    QByteArrayData data[4];
    char stringdata0[28];
#define QT_MOC_LITERAL(idx, ofs, len) \
    qptrdiff(offsetof(qt_meta_stringdata_ScreenSaver_t, stringdata0) + ofs \
        - idx * sizeof(QByteArrayData)) \
static const qt_meta_stringdata_ScreenSaver_t qt_meta_stringdata_ScreenSaver = {
QT_MOC_LITERAL(0, 0, 11), // "ScreenSaver"
QT_MOC_LITERAL(1, 12, 6), // "enable"
QT_MOC_LITERAL(2, 19, 0), // ""
QT_MOC_LITERAL(3, 20, 7) // "disable"


static const uint qt_meta_data_ScreenSaver[] = {

 // content:
       8,       // revision
       0,       // classname
       0,    0, // classinfo
       2,   14, // methods
       0,    0, // properties
       0,    0, // enums/sets
       0,    0, // constructors
       0,       // flags
       0,       // signalCount

 // slots: name, argc, parameters, tag, flags
       1,    0,   24,    2, 0x0a /* Public */,
       3,    0,   25,    2, 0x0a /* Public */,

 // slots: parameters

       0        // eod

void ScreenSaver::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
    if (_c == QMetaObject::InvokeMetaMethod) {
        auto *_t = static_cast<ScreenSaver *>(_o);
        switch (_id) {
        case 0: _t->enable(); break;
        case 1: _t->disable(); break;
        default: ;

QT_INIT_METAOBJECT const QMetaObject ScreenSaver::staticMetaObject = { {
} };

const QMetaObject *ScreenSaver::metaObject() const
    return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : &staticMetaObject;

void *ScreenSaver::qt_metacast(const char *_clname)
    if (!_clname) return nullptr;
    if (!strcmp(_clname, qt_meta_stringdata_ScreenSaver.stringdata0))
        return static_cast<void*>(this);
    return QObject::qt_metacast(_clname);

int ScreenSaver::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
    _id = QObject::qt_metacall(_c, _id, _a);
    if (_id < 0)
        return _id;
    if (_c == QMetaObject::InvokeMetaMethod) {
        if (_id < 2)
            qt_static_metacall(this, _c, _id, _a);
        _id -= 2;
    } else if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
        if (_id < 2)
            *reinterpret_cast<int*>(_a[0]) = -1;
        _id -= 2;
    return _id;

As it doesn't seem to get compiled, can probably be ignored, but maybe can be treated as an include.

Programming / Re: Duplicate symbol error
« on: October 01, 2023, 02:50:28 am »
Are you sure the codepath below isn't being called?
Code: [Select]
#include "powersaving.h"

Afterall, we are often OS_UNIX and not MAC :)

Anyways, commented out the OS_UNIX_NOT_MAC chunk, no difference. Also fixed the pro file so winscreensaver.cpp is compiled.
Ran emxexp on screensaver.obj and don't see the duplicate symbol,
Code: [Select]
K:\work\smplayer\build>emxexp screensaver.obj
  ; segment DATA32
  "__ZN11ScreenSaver16staticMetaObjectE"                                ; magics
eg='DATA32' len=36

  ; segment TEXT32
  "__ZN11ScreenSaverD2Ev"                                               ; magics
eg='TEXT32' len=21
  "__ZN11ScreenSaverD1Ev"                                               ; magics
eg='TEXT32' len=21
  "__ZN11ScreenSaverD0Ev"                                               ; magics
eg='TEXT32' len=21
  "__ZNK11ScreenSaver10metaObjectEv"                                    ; magics
eg='TEXT32' len=32
            ; magicseg='TEXT32' len=71
  "__ZN11ScreenSaverC2EP7QObject"                                       ; magics
eg='TEXT32' len=29
  "__ZN11ScreenSaverC1EP7QObject"                                       ; magics
eg='TEXT32' len=29
  "__ZN11ScreenSaver6enableEv"                                          ; magics
eg='TEXT32' len=26
  "__ZN11ScreenSaver7disableEv"                                         ; magics
eg='TEXT32' len=27
  "__ZN11ScreenSaver11qt_metacastEPKc"                                  ; magics
eg='TEXT32' len=34
  "__ZN11ScreenSaver11qt_metacallEN11QMetaObject4CallEiPPv"             ; magics
eg='TEXT32' len=55
  "__ZTV11ScreenSaver"                                                  ; magics
eg='TEXT32' len=18  weak
  "__ZTS7QObject"                                                       ; magics
eg='TEXT32' len=13  weak
  "__ZTI7QObject"                                                       ; magics
eg='TEXT32' len=13  weak
  "__ZTS11ScreenSaver"                                                  ; magics
eg='TEXT32' len=18  weak
  "__ZTI11ScreenSaver"                                                  ; magics
eg='TEXT32' len=18  weak


Programming / Re: Duplicate symbol error
« on: October 01, 2023, 02:27:43 am »
Pretty sure, there was a lot of errors about powermanager before I added the OS/2 defines.
I do see that winscreensaver.cpp isn't being compiled. I patched like this,
Code: [Select]
--- a/src/
+++ b/src/
@@ -593,7 +593,7 @@ contains( DEFINES, SCREENSAVER_OFF ) {
                HEADERS += powersaving.h
                SOURCES += powersaving.cpp
-       win32 {
+       win32:os2 {
                HEADERS += winscreensaver.h
                SOURCES += winscreensaver.cpp
Is that the correct way to add OS/2 support?

Programming / Duplicate symbol error
« on: October 01, 2023, 01:07:51 am »
So I tried to compile the latest smplayer, it went pretty well, a couple of minor fixes, until it got to screensaver.cpp where it tried to take the *nix path of disabling power savings.
Investigation showed that winscreensaver.cpp had the code to disable Doodles screensaver, so fixed screensaver.cpp/h by changing all the #ifdef Q_OS_WIN to #if defined (Q_OS_WIN) || defined (Q_OS_OS2), made sure that winscreensaver.cpp was compiled on OS/2 and screensaver.cpp compiled fine. Linking died with,
Code: [Select]
weakld: K:\work\smplayer\build\screensaver.obj - error: Duplicate symbol '__ZN11ScreenSaverD2Ev' ('__ZN11ScreenSaverD2Ev').
weakld: K:\work\smplayer\build\screensaver.obj - error: Symbol previosly defined in this module.
weakld: info: fFlags new 0x0001  fFlags old 0x0001 (PUBLIC).
emxomfld: weak prelinker failed. (rc=-1)
make.exe: *** [Makefile:794: smplayer.exe] Error 1

K:\work\smplayer\build>c++filt __ZN11ScreenSaverD2Ev

I don't understand where the duplicate symbol is coming from. The code,
Code: [Select]
#include "screensaver.h"

#if defined (Q_OS_WIN) || defined (Q_OS_OS2)
#include "winscreensaver.h"
#include "powersaving.h"
#ifdef Q_OS_MACX
#include "powersaving_mac.h"

ScreenSaver::ScreenSaver(QObject * parent) : QObject(parent) {
#if defined (Q_OS_WIN) || defined (Q_OS_OS2)
win_screensaver = new WinScreenSaver();
power_saving = new PowerSaving(this);

ScreenSaver::~ScreenSaver() {
#if defined (Q_OS_WIN) || defined (Q_OS_OS2)
delete win_screensaver;

void ScreenSaver::enable() {
#if defined (Q_OS_WIN) || defined (Q_OS_OS2)

void ScreenSaver::disable() {
#if defined (Q_OS_WIN) || defined (Q_OS_OS2)

#include "moc_screensaver.cpp"

Code: [Select]

#include <QObject>

class PowerSaving;
class WinScreenSaver;

class ScreenSaver : public QObject

        ScreenSaver(QObject * parent = 0);

public slots:
        void enable();
        void disable();

#if defined (Q_OS_WIN) || defined (Q_OS_OS2)
        WinScreenSaver * win_screensaver;
        PowerSaving * power_saving;


Winscreensaver.cpp is at change the .cpp to h for the header.

Hardware / Re: ArcaOS on a HP EliteBook 840 G3?
« on: October 01, 2023, 12:56:58 am »
You have to use the ArcaOS tool to create your installation USB stick, on OS/2, the USB stack is loaded late in the boot process so can't load an ISO from the stick, instead it creates a ram disk, boots from that and then it loads the ISO.
On your ArcaOS 5.07 install, double click the ISO and mount it, then switch to the drive letter you gave it and go to the AOSBOOT directory and read the txt file and then run aosboot.cmd with the stick inserted. The command is something like,
Code: [Select]
aosboot Q: C:\downloads\ArcaOS-5.1.isoAdjust drive letters and path as needed.

Applications / Re: Test build of dooble with qt5
« on: September 28, 2023, 01:59:49 am »
I built it on the 28th of Aug, Thought I announced it here.
Edit: the debug package and source package are also there.

Programming / Re: dart.h
« on: September 27, 2023, 12:44:59 am »
Thanks, that's probably it. Have to test.

Programming / Re: dart.h
« on: September 27, 2023, 12:16:46 am »
The github site only has some limited stuff such as the patches, which I should look at and apply.
Thanks for the reminder.

Programming / Re: shared memory value - Odin win32k or DosQuerySysInfo???
« on: September 26, 2023, 10:33:41 pm »
Wouldn't using win2k.h introduce a dependency in win2k.sys, which is now depreciated IIRC.

Applications / Re: General Software Testing
« on: September 26, 2023, 10:25:15 pm »
Demo, sample or a skeleton to be built on. It is small and running strings on it produces little,
Code: [Select]
H:\tmp>strings Ruki.sys
.sys 0.01 Device Driver
Copyright (C) 1998 Alex Romanov (2:50340/759)
All R
4s Reserved.

Programming / dart.h
« on: September 26, 2023, 09:53:43 pm »
Seems this has been discussed before. Where to find dart.h as I'm building MPlayer and its configure script tests for it.

Pages: [1] 2 3 ... 301