infratec wrote: ↑Fri May 28, 2021 9:41 pm
If you want to program in C, why you don't use a C compiler directly
Hello INFRATEC
For several reason
1/ Because i love PB and C, but C is hard for me to learn, i have try several time without succes
It's the reason why, thanks to the team, i hope PB can help me to use C in part of my codes
At the begining just litlte parts, (just one or two procedure) and with the time more and more
In fact like the ASM in the <6.00, but ASM is also always too hard for me, stronger again than the C, so i never can do my dream since decennary
In first time
PB manage memory (String, Array string, etc.. all what C not can do)
And C the others things
2/Use only one configuration for coding C and PB together, furthermore USB PORTABLE
Because C is not really USB PORTABLE, you must adding path in windows environnement and often reboot
I love PB, because you plug usb key on a new machine, you run "pb.exe" and you can full works immediately, without installing something
3/ Using easilly external DLL C or "C code" found in all the WEB (CodeProject, etc ...)
Keya wrote: being able to use Purebasic + assembly + C in the same source code. Talk about POWER and FLEXIBILITY!!!!!
Like KEYA say
After, ASM surely disappears for the same reason of processor portability FRED create a "BackEnd C"
But what a power coding PB and C hand in hand, nothing can stop it
And surely others reasons that i have not really thinking for the moment
@JUERGENKULOW
Hello juergenkulow and thanks for your example
I have not really all understand
I have create a file.txt in the PB compiler folder with this code
Code: Select all
//essai du code c sous gcc et windows
#include <stdio.h>
#include<stdlib.h>
int main()
{
printf("Test d'un bout de code en C\n");
getchar;
Return 0;
}
I have rename it "Hallo.po"
I have run this sentence in CMD admin windows
Code: Select all
X:\PB\v6.00A_x64\Compilers>pbcompilerc hallo.po /REASM /CONSOLE /LINKER hallo.po
And i have this answer of "Compilerc"
PB wrote:******************************************
PureBasic 6.00 Alpha 1 - C Backend (Windows - x64)
******************************************
Loading 'C' subsystem
Compiling hallo.po
Loading external libraries...
The file 'PureBasic.asm' isn't found or can't be opened !