[6.10] Always error with C Backend
Posted: Wed Apr 10, 2024 7:48 am
With this code I have an error ;
Error ; Unresolved external symbol ‘scanf’ – referenced from
‘PureBasic.obj’,
POLINK : fatal error : 1 unresolved external(s)
With 6.04 LTS C backend this program is ok
Code: Select all
CompilerIf #PB_Compiler_ExecutableFormat<>#PB_Compiler_Console
CompilerError "Exec-Format must be Console in Compiler-Option"
CompilerEndIf
! int fact(int n) {
! if(n>=1)
! return n*fact(n-1);
! else return 1;
! }
OpenConsole()
! int number;
! printf("Enter a positive integer: ");
! scanf("%d",&number);
! printf("Factorial of %d = %d", number, fact(number));
Input()
CloseConsole()
‘PureBasic.obj’,
POLINK : fatal error : 1 unresolved external(s)
With 6.04 LTS C backend this program is ok