| View previous topic :: View next topic |
| Author |
Message |
King_Kong
Joined: 26 Apr 2006 Posts: 4
|
Posted: Wed May 24, 2006 6:23 am Post subject: makefile |
|
|
I get this error when i enter 'make' under the projects/helloworld directory:
| Quote: | $ make
Makefile:2: *** missing separator. Stop.
|
Here is my makefile:
| Code: |
//Makefile for Hello World!!
TARGET = hello
OBJS = main.o
CFLAGS = -O2 -G0 -Wall
CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti
ASFLAGS = $(CFLAGS)
EXTRA_TARGETS = EBOOT.PBP
PSP_EBOOT_TITLE = Hello World
PSPSDK=$(shell psp-config --pspsdk-path)
include $(PSPSDK)/lib/build.mak
|
Any ideas what's wrong? I presume the source code is fine as it doesnt say any other errors.
Thanks |
|
| Back to top |
|
 |
moonlight
Joined: 26 Oct 2005 Posts: 567
|
Posted: Wed May 24, 2006 6:50 am Post subject: Re: makefile |
|
|
| King_Kong wrote: | I get this error when i enter 'make' under the projects/helloworld directory:
| Quote: | $ make
Makefile:2: *** missing separator. Stop.
|
Here is my makefile:
| Code: |
//Makefile for Hello World!!
TARGET = hello
OBJS = main.o
CFLAGS = -O2 -G0 -Wall
CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti
ASFLAGS = $(CFLAGS)
EXTRA_TARGETS = EBOOT.PBP
PSP_EBOOT_TITLE = Hello World
PSPSDK=$(shell psp-config --pspsdk-path)
include $(PSPSDK)/lib/build.mak
|
Any ideas what's wrong? I presume the source code is fine as it doesnt say any other errors.
Thanks |
USe '#' for the comments.
| Code: |
//Makefile for Hello World!!
|
| Code: |
#Makefile for Hello World!!
|
|
|
| Back to top |
|
 |
King_Kong
Joined: 26 Apr 2006 Posts: 4
|
Posted: Wed May 24, 2006 7:50 am Post subject: |
|
|
| This program is in C so therefore the "//" represent a comment line. I think you're talking about C++. Any suggestions? |
|
| Back to top |
|
 |
Jim

Joined: 02 Jul 2005 Posts: 487 Location: Sydney
|
Posted: Wed May 24, 2006 8:03 am Post subject: |
|
|
# is for comment in makefile, and you have used //
// is comment in C99 or C++ files
Jim _________________ http://www.dbfinteractive.com |
|
| Back to top |
|
 |
King_Kong
Joined: 26 Apr 2006 Posts: 4
|
Posted: Wed May 24, 2006 8:25 am Post subject: |
|
|
| Thanks a lot. Although now there are loads of errors in my 'main.c'. This could take a while. By the way, isnt it ok to comment using '//' and /* */ in my 'main.c' (source code)?[/img] |
|
| Back to top |
|
 |
dot_blank

Joined: 28 Sep 2005 Posts: 498 Location: Brasil
|
Posted: Wed May 24, 2006 10:04 am Post subject: |
|
|
like jim has just told you
// was introduced to work in C source with C99
and /* */ has always been used, so you can
decide what style of commenting youd like but remember
only one thing that // comments out a entire line so you
cannot insert that between any normal C source and
should always be on its own line
ex. Good
//my how commenting is great
char* comment[] = "really great";
ex. BAD
//this is not good commenting char* badComment; _________________ 10011011 00101010 11010111 10001001 10111010 |
|
| Back to top |
|
 |
|