18 October 2014, 13:17 | #1 |
(2b)||!(2b)
Join Date: Mar 2007
Location: Cranbrook, Devon, UK
Age: 50
Posts: 241
|
Compile problems with VBCC
Hi, been wanting to learn some variant of C on the Amiga for years, finally decided to and hit a problem.
Something like this: Code:
#include <stdio.h> int main() { printf("Hello world\n"); } The problem comes when I try to use anything in proto/ instead of stdio.h This program: Code:
#include <proto/exec.h> #include <proto/dos.h> struct DosLibrary *DOSBase; int main() { if (DOSBase=(struct DosLibrary *)OpenLibrary("dos.library",0)) { Write(Output(),"Hello world!\n",14); CloseLibrary((struct Library *)DOSBase); } return 0; } The error messages I get are contained within the attachment. I've got the NDK3.9 includes installed. |
18 October 2014, 13:34 | #2 |
Registered User
Join Date: Jan 2002
Location: Germany
Posts: 6,987
|
Must be something wrong with your installation. For me it compiles without any errors.
Code:
2> ed helloworld.c Work:Entwicklung/Sources 2> vc -sc -sd -O2 vbcc:targets/m68k-amigaos/lib/minstart.o helloworld.c -o helloworld -nostdlib Work:Entwicklung/Sources 2> helloworld Hello world! Work:Entwicklung/Sources 2> |
18 October 2014, 13:57 | #3 |
(2b)||!(2b)
Join Date: Mar 2007
Location: Cranbrook, Devon, UK
Age: 50
Posts: 241
|
I installed the package using the installer and installed the update which was just a case of copying two files over.
I tried compiling a program and it failed. I installed the 68mamigaos target and it compiled fine. Should I have done somethign different? Attachment is my directory structure. |
18 October 2014, 14:19 | #4 |
(2b)||!(2b)
Join Date: Mar 2007
Location: Cranbrook, Devon, UK
Age: 50
Posts: 241
|
I've fixed it!
Turned out to be an assign that was defined when SAS/C was installed. When I installed VBCC an assign it added into my bootup was this: Code:
assign >NIL: vincludeos3: "include:" add Code:
assign >nil: vincludeos3: Coding:NDK_3.9/Include/include_h add |
18 October 2014, 15:47 | #5 |
Registered User
Join Date: Jan 2002
Location: Germany
Posts: 6,987
|
NEVER install in Novice mode!! Nothing!
|
18 October 2014, 16:44 | #6 |
(2b)||!(2b)
Join Date: Mar 2007
Location: Cranbrook, Devon, UK
Age: 50
Posts: 241
|
I didn't.
|
18 October 2014, 17:59 | #7 |
Registered User
Join Date: Jan 2002
Location: Germany
Posts: 6,987
|
Then you didn't read the text when it asked you where the OS includes are.
|
18 October 2014, 23:04 | #8 |
(2b)||!(2b)
Join Date: Mar 2007
Location: Cranbrook, Devon, UK
Age: 50
Posts: 241
|
There was no default - nothing would compile. I had to install the target.
|
18 October 2014, 23:23 | #9 |
Registered User
Join Date: Jan 2002
Location: Germany
Posts: 6,987
|
Sure. You have to install a binary and at least one target. During installation of the 68k target you were asked where the OS includes are. You should have pointed it to NDK_3.9/include/include_h, not to include: .
Anyway, if you install the 68k binary, the default target is aos68k. If you install the OS4 PPC binary, the default target is aosppc. And so on. If you didn't install the respective target you'll get a "no config file" error unless you select another target (one that is installed) by the +target option. |
18 October 2014, 23:38 | #10 |
(2b)||!(2b)
Join Date: Mar 2007
Location: Cranbrook, Devon, UK
Age: 50
Posts: 241
|
Ah!
When installing softwar via the installer I always go for expert mode |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Help with compile | JimDrew | Coders. Language | 23 | 30 October 2014 22:42 |
How compile WinUAE... | WCoder | support.WinUAE | 57 | 17 April 2014 17:42 |
GFA compile | xc8 | Coders. General | 31 | 19 May 2009 18:21 |
VBCC 0.8j for Windows | hitchhikr | Coders. General | 11 | 09 October 2008 00:58 |
Compile WinUAE ????? | Myriel | support.WinUAE | 14 | 10 January 2004 17:06 |
|
|