Did you double check that the files are for the correct architecture (IOW power64 ?)Don't know. libsqlite3.so could by 32bit. How can i check this?
Pass -s and check the generated ppas.sh/.bat and link.res to see what parameters the linker gets.
If you back up some files, you can do various linking attempts by running ppas.bat without rebuilding everything every time
Please try this.
I have uploaded new binutils.
https://github.com/newpascal/fpcupdeluxe/releases/download/wincrossbins_v1.0/powerpc-aix.zip
Just copy them over your existing ones.
program project1; {$L C:\fpclazbydeluxe\trunk\cross\lib\powerpc64-aix\libsqlite3.so} //{$L libsqlite3.so} uses ctypes; var sqlite3_libversion: function(): pansichar; cdecl; s:pansichar; SQLiteLibraryHandle: TLibHandle; procedure LoadAddresses(LibHandle: TLibHandle); begin pointer(sqlite3_libversion) := GetProcedureAddress(LibHandle,'sqlite3_libversion'); end; begin SQLiteLibraryHandle := LoadLibrary('libsqlite3.so'); LoadAddresses(SQLiteLibraryHandle); writeln('hello !'); s:=sqlite3_libversion(); writeln(s); end.
The above does cross-compile. But if it works on AIX you have to test yourself !
Use this one:
{$L libsqlite3.so}
(without the path)
I believe that is what -Xr is for.
Did you do a Clean and Build ?
But I guess you did ... ;-)
Now I am (nearly) out of ideas ! Few remain.
It would be nice if I could get access to an (or yours) AIX server through SSH. Makes testing easier.
Second, I am preparing a new release of fpcupdeluxe. It will build a cross-compiler for AIX. With settings I know about. I would like you to try to use that to install FPC and Lazarus, and the AIX cross-compiler. But please be patient. The release will take another couple of hours. Will inform you !
Ps:
To add linker options, do:
-k-rpath-link -k/usr/lib
New try, with all standard options.
Please add this into the linker options.
-rpath /usr/lib
(see included picture)
The -Xr option is ignored by FPC for AIX ... do not ask why.
If I look at the generated binary, the /usr/lib library searchpatch is added !
I see something different. There is a zero between the path and the library. Meaning two different strings. Its not an absolute path.
See picture.