Page 1 of 1
C68 Compiling
Posted: Sat Feb 19, 2022 3:16 pm
by Derek_Stewart
Hi,
I seem to of forgotten how to compile a C programme with a .c extension.
I tried to compile the "alter.c" module from SQLite with, which gave this error:

- C68 Compile in Cview
- C68_compile.png (4.95 KiB) Viewed 1350 times
I like to use CVIEW to compile C modules, which up to now has had a "_c " extension and work OK.
My simple solution was to rename the .c to _c but then the compiler can not find the .h file
I seem to have a brain freeze on this, I have read the C68 manual many times bit can not see the solution.
Re: C68 Compiling
Posted: Sat Feb 19, 2022 6:02 pm
by Ruptor
Derek_Stewart wrote:My simple solution was to rename the .c to _c but then the compiler can not find the .h file
This is probably a stupid suggestion but do all the files have to be _ so .h >>_h?
Re: C68 Compiling
Posted: Sat Feb 19, 2022 6:11 pm
by tofro
Solution for industrious guys:
Rename all files from *.c and *.h to *_c and *_h
Lazy guys pack everything on a dos drive on QPC and let its file name translation do the job.
Re: C68 Compiling
Posted: Sat Feb 19, 2022 6:13 pm
by XorA
tofro wrote:Solution for industrious guys:
Rename all files from *.c and *.h to *_c and *_h
Lazy guys pack everything on a dos drive on QPC and let its file name translation do the job.
And really lazy guys use xtc68 to cross compile
But yes, c68 was the reason I added automatic . -> _ translation to sQLux!
Re: C68 Compiling
Posted: Sat Feb 19, 2022 7:16 pm
by Derek_Stewart
Hi
Thanks for the advice, my solution wad to rename all the files with .c or .c to _c or _h
It is strange that C68 header files can be defined as _h or .h in the C programme file. But a header file in the C source code file has to be _h
Maybe using XTC68 is a better option.
Re: C68 Compiling
Posted: Sun Feb 20, 2022 10:18 am
by Derek_Stewart
Hi,
I am sure there is a something that can be supplied to the C68 CC programme to switch off the automatic extension translation.
But in the interim, my solution was to unzip the C source code with infoUNZIP and junk the stored directories, with the -j option, so that only the files are stored with the .c or .h extension changed to a _c or _h extension and C68 converts to the header file calls to QDOS as necessary.
I could use all the automatic file translation that all emulators use now, but the unzip process works as well, even on BBQLs ...
Maybe this is what I used to do.
So, back to reading the manual.