QB64.org Forum

Active Forums => QB64 Discussion => Topic started by: rcamp48 on October 05, 2020, 03:32:11 pm

Title: Importing C Code into QB64?
Post by: rcamp48 on October 05, 2020, 03:32:11 pm
How do I go about importing C code into a program of mine in QB64 32 bit edition? I want to import a block of C Code , and don't have any idea how to do this, can anyone help me with this?

Russ

Transfolio.c is what I want to import,  the code I want to import it to (at the end of my program) is transfolioshell.bas

Title: Re: Importing C Code into QB64?
Post by: Cobalt on October 05, 2020, 05:56:26 pm
You can't.
Title: Re: Importing C Code into QB64?
Post by: +KZ on October 05, 2020, 08:55:00 pm
I knew that you can include .h files, the bad thing is that I don't know how
Title: Re: Importing C Code into QB64?
Post by: Galleon on October 06, 2020, 02:06:39 am
Including/calling C code is fairly easy (see screenshot).
Converting C code to native QB64 code may or may not be possible depending on the nature of the C code, however it will almost certainly involve manual processes specific to the code being converted.
Title: Re: Importing C Code into QB64?
Post by: Cobalt on October 06, 2020, 12:38:32 pm
But you can't just plop the C code into your source. Which is what I thought the original question was.
Title: Re: Importing C Code into QB64?
Post by: TempodiBasic on October 07, 2020, 04:50:57 am
@rcamp48
be careful because your C program included has using an external DLL, so surely you must have also that DLL to get working C program.

About the C program it accesses to parallel port to I/O.. I think that this can be made also by QB64 code if you know How C program manage that port.


@Galleon
Hy Master

about
Quote
Including/calling C code is fairly easy (see screenshot).
Converting C code to native QB64 code may or may not be possible depending on the nature of the C code, however it will almost certainly involve manual processes specific to the code being converted.
Can C code do anything ( also the old 16/32bit work that are emulated into QB64) ? Or just plain 32/64bit work ?

Thanks for feedback