Discuss the development of new homebrew software, tools and libraries.
Moderators: cheriff , TyRaNiD
King_Kong
Posts: 4 Joined: Wed Apr 26, 2006 6:43 am
Post
by King_Kong » Wed May 24, 2006 6:23 am
I get this error when i enter 'make' under the projects/helloworld directory:
$ make
Makefile:2: *** missing separator. Stop.
Here is my makefile:
Code: Select all
//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
moonlight
Posts: 567 Joined: Wed Oct 26, 2005 7:46 pm
Post
by moonlight » Wed May 24, 2006 6:50 am
King_Kong wrote: I get this error when i enter 'make' under the projects/helloworld directory:
$ make
Makefile:2: *** missing separator. Stop.
Here is my makefile:
Code: Select all
//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.
King_Kong
Posts: 4 Joined: Wed Apr 26, 2006 6:43 am
Post
by King_Kong » Wed May 24, 2006 7:50 am
This program is in C so therefore the "//" represent a comment line. I think you're talking about C++. Any suggestions?
Jim
Posts: 476 Joined: Sat Jul 02, 2005 10:06 pm
Location: Sydney
Contact:
Post
by Jim » Wed May 24, 2006 8:03 am
# is for comment in makefile, and you have used //
// is comment in C99 or C++ files
Jim
King_Kong
Posts: 4 Joined: Wed Apr 26, 2006 6:43 am
Post
by King_Kong » Wed May 24, 2006 8:25 am
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]
dot_blank
Posts: 498 Joined: Wed Sep 28, 2005 8:47 am
Location: Brasil
Post
by dot_blank » Wed May 24, 2006 10:04 am
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