The same codes compile fine on x86 linux or on windows (x86 or x64).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.
linker error on creation x64 Unicode Shared Library
linker error on creation x64 Unicode Shared Library
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.

Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.

Re: [4.61] linker error on creation x64 Unicode Shared Libra
Source can you found in this package: http://www.realsource.de/index.php/down ... packer-sdk
Subdirectory lib, the file: zBin_UnpackDLL.pb
Subdirectory lib, the file: zBin_UnpackDLL.pb
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.

Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.

Re: [4.61] linker error on creation x64 Unicode Shared Libra
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...
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
@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.
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.
Windows 11, Manjaro, Raspberry Pi OS


Re: [4.61] linker error on creation x64 Unicode Shared Libra
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:
Possibly the same problem that requires me to compile with debugger on to make it work.
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
Re: [4.61] linker error on creation x64 Unicode Shared Libra
Alternatively it may also produce this:
line 2713:
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.
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)
Code: Select all
If Not OpenWindowedScreen(WindowID(0), 0, 0, 640, 480, #True, 0, 0, #PB_Screen_WaitSynchronization)
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
The error is still in PB 5.00 

PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.

Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
