Hello all & woof.
I am learning C - a beginner.
Compiler in use: gcc - as supplied in uPupBB32.
Reference manual on hand: The GNU C programming manual. (The text is informative, but the encoding does not allow me to ctrl+f 'search' so it's a bit of a dog to find specific info.
BTW - the C source is (probably from) source forge. I didn't write the code.
It is an assembler, written in C.
Maybe I am biting off more than I can chew, but there is no better way to learn than to bash one's head against a wall.
The error message: as68_tst.c:11:7: error: conflicting types for ‘malloc’
Code: Select all
#include "as68.h"
char *malloc(),*strcpy(),*strcat(); <--<< this is line #11 in as68_tst.c
#define MAXOPTIM 2000
In 'err-list' (the error file) I read: In file included from as68_tst.c:8:0:
/usr/include/stdlib.h:539:14: note: previous declaration of ‘malloc’ was here
extern void *malloc (size_t __size) __THROW __attribute_malloc__ __wur;
and in /usr/include/stdlib.h on line 539 I see:
Code: Select all
/* Allocate SIZE bytes of memory. */
extern void *malloc (size_t __size) __THROW __attribute_malloc__ __wur;
/* Allocate NMEMB elements of SIZE bytes each, all initialized to 0. */
extern void *calloc (size_t __nmemb, size_t __size)
__THROW __attribute_malloc__ __wur;
My guess: I am declaring the pointer twice, yes?
Another guess The syntax demanded by the original source has a few differences from the syntax demanded by the gcc compiler.
Help!
cobaka.