Welcome, Guest. Please login or register.

Author Topic: Compiler  (Read 13989 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline quiesceTopic starter

  • Jr. Member
  • **
  • Join Date: Feb 2003
  • Posts: 72
    • Show all replies
Compiler
« on: May 30, 2003, 01:10:15 PM »
What is the best, most up to date free C/++ compiler for the amiga? I
can only find gcc... will that do, or are there better ones around?
 

Offline quiesceTopic starter

  • Jr. Member
  • **
  • Join Date: Feb 2003
  • Posts: 72
    • Show all replies
Re: Compiler
« Reply #1 on: May 30, 2003, 01:15:28 PM »
No 040/060 optimization though?

I vaguely remember another good ansi c compiler for the amiga, it used
to be distributed on the Amiga Format CDs... just can't remember its
name!
 

Offline quiesceTopic starter

  • Jr. Member
  • **
  • Join Date: Feb 2003
  • Posts: 72
    • Show all replies
Re: Compiler
« Reply #2 on: May 30, 2003, 01:57:23 PM »
The gcc distribution I downloaded from aminet has files missing and
doesn't work. Does anyone know where I can get a functional
distribution?
 

Offline quiesceTopic starter

  • Jr. Member
  • **
  • Join Date: Feb 2003
  • Posts: 72
    • Show all replies
Re: Compiler
« Reply #3 on: May 30, 2003, 04:06:08 PM »
Yeah that was it, vbcc. Thanks. :)
 

Offline quiesceTopic starter

  • Jr. Member
  • **
  • Join Date: Feb 2003
  • Posts: 72
    • Show all replies
Re: Compiler
« Reply #4 on: May 30, 2003, 07:03:39 PM »
Yes I did all that. The archive did not include the env-archive/ or s/
directories though, even though the readme says they should be in
there.
 

Offline quiesceTopic starter

  • Jr. Member
  • **
  • Join Date: Feb 2003
  • Posts: 72
    • Show all replies
Re: Compiler
« Reply #5 on: May 31, 2003, 01:10:10 AM »
Well i have the gcc files installed now but I need to setup some
assigns I think, as it can`t find the include files. (#include
results in No such file/directory). Does anyone know what
the assigns are?
 

Offline quiesceTopic starter

  • Jr. Member
  • **
  • Join Date: Feb 2003
  • Posts: 72
    • Show all replies
Re: Compiler
« Reply #6 on: May 31, 2003, 01:18:50 AM »
No that wasn`t helpful at all. Besides, I have an old devkit that contains stormc version 3, and it doesn`t work.
 

Offline quiesceTopic starter

  • Jr. Member
  • **
  • Join Date: Feb 2003
  • Posts: 72
    • Show all replies
Re: Compiler
« Reply #7 on: May 31, 2003, 02:58:43 AM »
This is hopeless. I've been trying all day to get a compiler to work. The closest I have come is with vbcc, and I can get some example programs to compile with a load of warnings and which don't function properly when executed. If someone could help me out here i'd much appreciate it.
 

Offline quiesceTopic starter

  • Jr. Member
  • **
  • Join Date: Feb 2003
  • Posts: 72
    • Show all replies
Re: Compiler
« Reply #8 on: May 31, 2003, 03:19:08 AM »
Thanks for mentioning that ndk, I found it on the amiga inc. website. :)
 

Offline quiesceTopic starter

  • Jr. Member
  • **
  • Join Date: Feb 2003
  • Posts: 72
    • Show all replies
Re: Compiler
« Reply #9 on: May 31, 2003, 04:14:19 AM »
Well looks like I finally got stormc working. However, none of the
example code will work. It compiles fine but when it gets to the
linking stage, I get a ton of linker errors saying Symbol "_FOO" is
not defined (it seems to say this for every function...). What might
be going on here?
 

Offline quiesceTopic starter

  • Jr. Member
  • **
  • Join Date: Feb 2003
  • Posts: 72
    • Show all replies
Re: Compiler
« Reply #10 on: May 31, 2003, 05:04:13 PM »
@iamaboringperson: Well I never feel safe in beginning to code until
at least -some- example code works. After copying over the latest libs
and header files from NDK3.9, I tried compiling several of the example
files both from the NDK AND those provided with  StormC. And the
errors they gave didn't seem to have any apparent reason for being
there.

For example, it once complained about a definition of a macro in a
header file, even though it was uniform with the other macro
definitions before and after it (they were function calls). I don't
remember the other details, but now this linking is giving me
problems...

@Varthall: Thanks a lot you found it. :) That should help me get gcc
running.
 

Offline quiesceTopic starter

  • Jr. Member
  • **
  • Join Date: Feb 2003
  • Posts: 72
    • Show all replies
Re: Compiler
« Reply #11 on: May 31, 2003, 06:17:46 PM »
Ok, it should be no surprise by now that I'm STILL having problems. I
tried doing what iamaboringperson suggested and wrote a simple
helloworld program in stormc. Here is the code:

#include

int main()
{
   printf("Hello world.\n");
   return 0;
}

And this is what I get:

Error: Unknown function "printf".
...ram:helloworld.c, Line 5: printf("Hello world\n")

I included the stdio header file and it can't find a printf function!?
That't pretty f***ed up if you ask me.

GCC i'm not having much better luck on... ixemul doesn't like it, when
I compile I get an ixemul window saying "ssystem() is no longer
supported. See the README document for more information. If you are
using gcc, then replace gcc with gccv.".

Well first of all I tried replacing my version of ixemul.library with
the one included in the gcc archive, but that turned out to be the
exact same latest version. I tried gccv and that seemed to `compile'
without problems... but then I tried running it and it wasn't an
executable!...
 

Offline quiesceTopic starter

  • Jr. Member
  • **
  • Join Date: Feb 2003
  • Posts: 72
    • Show all replies
Re: Compiler
« Reply #12 on: May 31, 2003, 07:42:28 PM »
I solved the compiling problem in stormc by copying accross the
includes from my  gcc directory... but now it hickups on the linking
again. Here's what I get:

Linker error: Symbol "_printf" not defined (Hint: "main()").
Ram Disk:hello.o symbol _printf hint main()
Linker error: Aborted.

If no one can help me, can they direct me somewhere like a developers
group that can help?

Also if anyone can find me an old version of ixemul.library or tell me
how to get gcc/gccv to work with a recent version of ixemul.library, i
would be grateful.
 

Offline quiesceTopic starter

  • Jr. Member
  • **
  • Join Date: Feb 2003
  • Posts: 72
    • Show all replies
Re: Compiler
« Reply #13 on: May 31, 2003, 08:03:10 PM »
I stand corrected, it seems the version command doesn`t work properly.

And the latest version of ixemul is 48.2 or 48.3 I think.
 

Offline quiesceTopic starter

  • Jr. Member
  • **
  • Join Date: Feb 2003
  • Posts: 72
    • Show all replies
Re: Compiler
« Reply #14 on: May 31, 2003, 10:45:09 PM »
I've had gcc compile a simple program now, but it doesn't want to link
any libs. For instance, if I type:

c++ -l gcc:os-lib/reaction.lib test1.c -o test

A requester pops up saying:

Please insert volume
/gnu/lib/gcc-lib/mc68020-cbm-a
in any drive

After clicking cancel a few times it then asks for
"/local/lib/gcc-lib/mc68020-cbm" and then "/gnu/lib/libgcc" and then
"/local/lib/libgcc" and finally, in the shell window I get: ld: No
such file or directory for libgcc:lib/reaction.lib.a

Am I doing this right?