Hi all,
after compiling my old program (compiled ok in PB v.4.40) I have error in linker :
POLINK: error: Unresolved external symbol 'SYS_FreeArray'
POLINK: error: Unresolved external symbol 'SYS_AllocateMultiArray'
POLINK: fatal error: 2 unresolved external(s)
Both function are in SystemBase.lib in version 4.40, but in v.4.50 are missing (only visible in compiler.exe)
Any suggestion?
thanks in advance
tom
Linker errors
Re: Linker errors
Do you use some userlibraries?
They often need to be recompiled by the creator to work on newer versions of PureBasic.
They often need to be recompiled by the creator to work on newer versions of PureBasic.
If any of you native English speakers have any suggestions for the above text, please let me know (via PM). Thanks!
Re: Linker errors
Many thanks,
yes, some Gnozal's libraries should be updated
best regards
tom
yes, some Gnozal's libraries should be updated
best regards
tom
registered user
Re: Linker errors
If you are using unicode or threadsafe you have to change the subsystem for the userlibraries as well. Go to "Compiler" -> "Options" -> "Subsystem" and type in "UserlibUnicodeThreadsafe" for example.
Otherwise I can't help you.
Otherwise I can't help you.
If any of you native English speakers have any suggestions for the above text, please let me know (via PM). Thanks!
Re: Linker errors
Hi,
Error Unresolved external symbol 'SYS_FreeArray' is generated by following procedure:
In assembled source generated by PBCompiler function "SYS_FreeArray" is used (only once in all program) in following context in above procedure:
I suppose that error is generated by freeing array declared as local in line : Dim value.f(2)
Function 'SYS_AllocateMultiArray' never occurs in assembler source, but generate POLINK error. Strange.
Any suggestions?
thanks
tom
Error Unresolved external symbol 'SYS_FreeArray' is generated by following procedure:
Code: Select all
Procedure ParamsWrapper(params.s, type)
Protected txt.s, i, j=-1
Dim value.f(2)
txt.s = params.s
While Len(txt.s)>0
For i = 0 To 2
txt.s = Left(params,FindString(params,",",1)-1)
If Len(txt.s)=0
value(i) = ValF(params.s)
Else
params = Trim(Mid(params,Len(txt.s)+2,Len(params)))
value(i) = ValF(txt.s)
EndIf
Next
Select type
Case #Equalizer
If j<0
Presets()\EQualizerOn = value(0)
Else
Presets()\EQPreset\fCenter[j]=value(0)
Presets()\EQPreset\fBandwith[j]=value(1)
Presets()\EQPreset\fGain[j]=value(2)
EndIf
Case #Compressor
If j<0
Presets()\CompressorOn = value(0)
Presets()\CompressorAuto = value(1)
Else
Presets()\ComprPreset\fGain=value(0)
Presets()\ComprPreset\fThreshold=value(1)
Presets()\ComprPreset\fRatio=value(2)
EndIf
EndSelect
j+1
Wend
EndProcedureCode: Select all
;
....
Wend
JMP _While3589
_Wend3589:
; EndProcedure
XOR eax,eax
_EndProcedure563:
PUSH dword [esp]
CALL _SYS_FreeString@4
PUSH dword [esp+4]
CALL _SYS_FreeString@4
PUSH eax
PUSH dword [esp+20]
CALL _SYS_FreeArray@4 !!!!!!!!
POP eax
ADD esp,24
POP ebx
POP ebp
RET 8
}
Function 'SYS_AllocateMultiArray' never occurs in assembler source, but generate POLINK error. Strange.
Any suggestions?
thanks
tom
registered user
Re: Linker errors
I tested this code on 4.50 and it seems work:
Code: Select all
Procedure ParamsWrapper(params.s, type)
Protected txt.s, i, j=-1
Dim value.f(2)
txt.s = params.s
While Len(txt.s)>0
For i = 0 To 2
txt.s = Left(params,FindString(params,",",1)-1)
If Len(txt.s)=0
value(i) = ValF(params.s)
Else
params = Trim(Mid(params,Len(txt.s)+2,Len(params)))
value(i) = ValF(txt.s)
EndIf
Next
Select type
Case 0
If j<0
;Presets()\EQualizerOn = value(0)
Else
;Presets()\EQPreset\fCenter[j]=value(0)
;Presets()\EQPreset\fBandwith[j]=value(1)
;Presets()\EQPreset\fGain[j]=value(2)
EndIf
Case 1
If j<0
;Presets()\CompressorOn = value(0)
;Presets()\CompressorAuto = value(1)
Else
;Presets()\ComprPreset\fGain=value(0)
;Presets()\ComprPreset\fThreshold=value(1)
;Presets()\ComprPreset\fRatio=value(2)
EndIf
EndSelect
j+1
Wend
EndProcedure
ParamsWrapper(params.s, type)Re: Linker errors
Either you still have some old userlibs, or you have to reinstall PB. Maybe not all files got updated correctly.



