Page 1 of 1
linker error on creation x64 Unicode Shared Library
Posted: Sat Jun 09, 2012 7:12 pm
by ts-soft
PureBasic - Linker error wrote:/usr/bin/ld: /home/thomas/purebasic/compilers/unicodefunctions.a(wcsdub.o):relocation R_X86_64_PC32 against undefined symbol 'malloc@@GLICC_2.2.5' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Bad value
collect2: ld gab 1 als Ende-Statur zurück.
The same codes compile fine on x86 linux or on windows (x86 or x64).
Re: [4.61] linker error on creation x64 Unicode Shared Libra
Posted: Sun Jun 10, 2012 12:43 pm
by ts-soft
Source can you found in this package:
http://www.realsource.de/index.php/down ... packer-sdk
Subdirectory lib, the file: zBin_UnpackDLL.pb
Re: [4.61] linker error on creation x64 Unicode Shared Libra
Posted: Sat Jul 14, 2012 12:28 am
by Grunz
I CAN compile this file with pbcompiler -u zBin_UnpackDLL.pb.
I am using Ubuntu 64 (11.10) .
What is this program supposed to do? Does nothing visible for me...
Are you actually able to make PB use unicode strings?
For me , I can compile programs with -u flag, but that only makes Print() produce garbage and DrawText() still only can do latin1.
edit:
I take that back.. does all work!
BUT only if the file has those control codes as first bytes...
Re: [4.61] linker error on creation x64 Unicode Shared Libra
Posted: Sat Jul 14, 2012 4:19 am
by idle
@Grunz
Are you sure you set the compiler option for the zBin_UnpackDLL.pb to that of shared object?
It will compile as an executable no problem but it won't compile as a shared object no matter what you do
The problem is with the wcsdub function in PB's unicode string lib, which hasn't been compiled with the -fPIC flag
without it the object can only be used in an executable or linked statically.
Re: [4.61] linker error on creation x64 Unicode Shared Libra
Posted: Sat Jul 14, 2012 2:25 pm
by Grunz
Yes, you are correct. I get the same error if I try with -so .
And I also have to add: unicode does NOT work properly.
Only short programs do.
For my project I get:
Code: Select all
88723 lines processed.
Creating the executable.
Segmentation fault
Error: Assembler
Possibly the same problem that requires me to compile with debugger on to make it work.
Re: [4.61] linker error on creation x64 Unicode Shared Libra
Posted: Sun Jul 22, 2012 11:56 pm
by Grunz
Alternatively it may also produce this:
Code: Select all
Fatal error in __driConfigOptions line 1, column 0: unknown encoding.
[Debugger Error] Program aborted. (by external library)
[Debugger Error] File: ulaby.pb (Line: 2713)
line 2713:
Code: Select all
If Not OpenWindowedScreen(WindowID(0), 0, 0, 640, 480, #True, 0, 0, #PB_Screen_WaitSynchronization)
No surprise here..
Still strange, that the same code does work if only program is shorter or something else is different, whatever that is.
Program won't run if not compiled with debugger on either, so might be a correlated problems.
Re: [4.61] linker error on creation x64 Unicode Shared Libra
Posted: Sun Nov 25, 2012 7:16 am
by ts-soft
The error is still in PB 5.00
