[SOLVED] C UserLib isn't working; as static lib it's works
Posted: Tue Apr 11, 2017 5:15 pm
What I want is using my C UserLib but I got a weird error message:
Using the C UserLib alone I get this error:
Interesting is the _ in front of PB_...
So I create a Static lib for checking the mistake and I get another weird error message:
Using ImportC and the C UserLib together I get this error:
Using ImportC and the C UserLib together but renamed FloatReturn to FloatReturn1 => StaticLib part is working:
What is wrong on the C UserLib stuff?
Weird is: PB is searching a _PB_FloatReturn (_ in front of PB) but using as static lib too I got the error the name is the same as a PB command
My assumption: Maybe the LibraryMaker.exe 5.30 is not updated to new stuff on PB5.60?
Here are some more Info from the C UserLib:
Desc:
Here the C Source:
Using the C UserLib alone I get this error:
Interesting is the _ in front of PB_...
POLINK: error: Unresolved external symbol '_PB_FloatReturn'.
Code: Select all
Debug FloatReturn()Using ImportC and the C UserLib together I get this error:
Line 3: Invalid name: same as a command (from library FloatReturn').
Code: Select all
ImportC ".\FloatReturn.lib"
FloatReturn.f() As "?PB_FloatReturn@@YAMXZ"; (float __cdecl PB_FloatReturn(void))
EndImport
Debug FloatReturn()
Code: Select all
ImportC ".\FloatReturn.lib"
FloatReturn1.f() As "?PB_FloatReturn@@YAMXZ"; (float __cdecl PB_FloatReturn(void))
EndImport
Debug FloatReturn1()
@Fred,Debug Output: 15.21000003814697
What is wrong on the C UserLib stuff?
Weird is: PB is searching a _PB_FloatReturn (_ in front of PB) but using as static lib too I got the error the name is the same as a PB command
My assumption: Maybe the LibraryMaker.exe 5.30 is not updated to new stuff on PB5.60?
Here are some more Info from the C UserLib:
Desc:
Code: Select all
; Language used to code the library: ASM or C
C
; Number of windows DLL than the library need
0
; Library type (Can be OBJ or LIB)
LIB
; Number of PureBasic library needed by the library
0
; Help directory name
FloatReturn
;
FloatReturn, () - float PB_FloatReturn()
Float
Code: Select all
float PB_FloatReturn()
{
return 15.21;
}