I have made a working program that generated an image given a certain string. It is fully working on my Slackware 32bit distro and others distros also 32bit.
Now i need to implement it on the client machine, which is an AIX powerpc. It compiled without any problem, and seems to work (every other function works and gives correct results), except when i call these 2 functions "QRcode_encodeString" and "QRcode_encodeData". It keeps giving me Segmentation fault.
You can assume my main() only line is that function call:
#include <stdio.h>
#include <qrencode.h>
int main(void)
{
QRcode* pQRC = QRcode_encodeString("abc", 0, QR_ECLEVEL_L, QR_MODE_8, 0);
return 0;
}
I don't have gdb on the client machine and no root priv. It works with "QRcode_encodeStringMQR()" which generates a micro QRcode, but that isn't a solution for me. It generates a dump file by the name "core" which I can't use it since that machine doesn't have gdb... And I'm assuming I can't open it on another machine since they don't share the same architecture. I have literaly no clue on how to troubleshoot this one...
Again, this code works on my Slackware distro.
My knowledge about powerpc and AIX is limited to this experience only, unfortunately.
I forgot to mention, only cc is available and I'm compiling like this:
cc qrgen.c -lqrencode -L/usr/local/lib -I/usr/local/include