This is not a cross-compilation setup at the moment. Just a local C dev environment. Here is the code:
#include <stdio.h>
int main(void){
printf("Hello World\n");
}
I compile with command: vbbcm68k test.c
Output:
>#include <stdio.h>
error 248 in line 1 of "test.c": file 'stdio.h' not found
I've installed vbcc_bin_amigaos68k and vbcc_target_m68k-amigaos
My user-startup looks like this:
;BEGIN vbcc
assign >NIL: vbcc: Hard Disk:vbcc
assign >NIL: C: vbcc:bin vbcc:include ADD
setenv VBCC vbcc:
;END vbcc
My installation root looks like this ( the header files exist in include/ ):
Directories
bin
config
doc
include
lib
Files
test.asm
test.c
vbcc_inst.log
vbcc_version
If I copy the .h file to the root directory it works, but obviously I want them to be detected in vbcc:include. Can anyone help?
First of all, your install doesn't match the layout from the distributed files. I suggest that you just wipe everything and then download and install (using the included installer scripts) in this order: vbcc_bin_amigaos68k.lha vbcc_target_m68k-amigaos.lha.
Neither vc nor vbccm68k looks automatically in vbcc:include
for includes, you have to tell them where to look using the -I
flag. If you use the vc command instead of the "raw" vbccm68k, it can pick up the include files from a script.
The default script for your platform is searched for at ENV:vc.config
, VBCC:vc.config
, or $VBCC/config/vc.config
(from your VBCC environment variable). In your case it should be picked up from the environment, and you should have that file if you look in the config subdirectory.
If you examine vc.config
you will see that it appends -Ivincludeos3:
to the commands. The default installer sets up an assign to the (target-specific) include files, which should look something like this:
assign >NIL: vincludeos3: vbcc:targets/m68k-amigaos/include
In your case I guess it would be:
assign >NIL: vincludeos3: vbcc:include
Besides, this line is a little odd:
assign >NIL: C: vbcc:bin vbcc:include ADD
You should leave vbcc:include
out of there, there are no binaries in the include directory.
For debugging issues where a tool does not find its files, SnoopDOS is invaluable.