0

For Linux platform I did the following

git clone https://github.com/compuphase/pawn.git
cd pawn
mk dir build
cd build
cmake ../
make all -j4

At this point I see the files created

amxArgs.so, amxDGram.so, amxFile.so, amxFixed.so, amxFloat.so, amxProcess.so, amxStrimg.so, amxTime.so.

In the project (Qt)

INCLUDEPATH += /home/pi/pawn/build 
INCLUDEPATH += /home/pi/pawn/amx 
INCLUDEPATH += /home/pi/pawn/linux

Now in

#include "amx.h"
#include "amx.h"
int Pawn_Setup(char *file_name) 
{
    AMX amx;
    size_t memsize;
    int err;
    cell ret = 0;
    
     //memsize = aux_ProgramSize(file_name);
     //err = aux_LoadProgram(&amx, argv[1], program);

    err = amx_Exec(&amx, &ret, AMX_EXEC_MAIN);
    return 0;
}

I get an error - "undefined reference to amx_Exec" (although it sees the header files and Goto reference jumps to amx_Exec function). Now I go to the build folder and I see no amx.so and no amaux.so files. It's not included in the make file.

What do I miss?

IS4
  • 11,945
  • 2
  • 47
  • 86
john7
  • 123
  • 1
  • 9
  • Does this answer your question? [What is an undefined reference/unresolved external symbol error and how do I fix it?](https://stackoverflow.com/questions/12573816/what-is-an-undefined-reference-unresolved-external-symbol-error-and-how-do-i-fix) – user7860670 Feb 16 '22 at 08:25
  • I've managed to port it. This should be added to the project LIBS += -ldl INCLUDEPATH += /home/pi/pawn/amx INCLUDEPATH += /home/pi/pawn/linux SOURCES += /home/pi/pawn/amx/amx.c SOURCES += /home/pi/pawn/amx/amxcore.c SOURCES += /home/pi/pawn/amx/amxcons.c SOURCES += /home/pi/pawn/amx/amxaux.c SOURCES += /home/pi/pawn/linux/getch.c SOURCES += /home/pi/pawn/amx/amxexec_gcc.c – john7 Feb 20 '22 at 07:41

0 Answers0