0

I'm trying to build a C payload to run on my PS4.

This is what I have:

#include "ps4.h"

int (*sceSysUtilSendSystemNotificationWithText)(int messageType, int userID, char* message);

void notify(char *message) {
    char buffer[512];
    sprintf(buffer, "%s\n\n\n\n\n\n\n", message);
    sceSysUtilSendSystemNotificationWithText(36, 0x10000000, buffer);
}

int _main(void) {
    initKernel();
    initLibc();
    initPthread();
    initNetwork();
    initJIT();

    int module;
    loadModule("libSceSysUtil.sprx", &module);
    RESOLVE(module, sceSysUtilSendSystemNotificationWithText);

    notify("Hello World!");

    return 0;
}

But I'm getting this error:

In function notify: main.c:(.text+0x39): undefined reference to sceSysUtilSendSystemNotificationWithText

But I defined it on line 3, what is going wrong?

Mitch
  • 183
  • 1
  • 10
  • Hi, Are you sure this fonction is compiled ? this error is because I think you don't compile the .c where your fonction is – Eliott Robert Nov 20 '17 at 14:03
  • Yes, it's compiled, I stripped this code from [this file](https://github.com/2much4u/PS4-GTA-V-Native-Caller/blob/master/source/main.c) since it worked when I used that @EliottRobert – Mitch Nov 20 '17 at 14:05
  • probably won't be able to resolve this myself as I'm not talented enough, thanks for marking this as a duplicate Sourav, it doesn't help me any further. – Mitch Nov 20 '17 at 14:10

0 Answers0