Reply
HELP! on makefile
Old 04-09-2008, 08:52 PM HELP! on makefile
Novice Talker

Posts: 7
i've created a makefile and solve all the error. but when i execute 'make' again, a statment "*** commands commence before first target. Stop." occured. may i know what it means?
kelly-tan is offline
Reply With Quote
View Public Profile
 
When You Register, These Ads Go Away!
     
Old 04-09-2008, 09:34 PM Re: HELP! on makefile
willcode4beer's Avatar
Webmaster Talker

Posts: 630
Name: Paul Davis
Location: San Francisco
make thinks you left out a target

probably just need to check your tabs
__________________
Paul Davis
willCode4Beer.com (coding for all the right reasons)
willcode4beer is offline
Reply With Quote
View Public Profile
 
Old 04-09-2008, 09:41 PM Re: HELP! on makefile
Novice Talker

Posts: 7
where do i check for the tabs? because i just check and i can't see any extra spaces.. is it ok if i post up my code here and you check it for me?
kelly-tan is offline
Reply With Quote
View Public Profile
 
Old 04-10-2008, 10:13 AM Re: HELP! on makefile
willcode4beer's Avatar
Webmaster Talker

Posts: 630
Name: Paul Davis
Location: San Francisco
try to extract the fragment that causes the error and post that
__________________
Paul Davis
willCode4Beer.com (coding for all the right reasons)
willcode4beer is offline
Reply With Quote
View Public Profile
 
Old 04-10-2008, 09:41 PM Re: HELP! on makefile
Novice Talker

Posts: 7
INCLUDER|DIRS = \
-I/usr/include/gtkmm-2.4\
-I/usr/include/gtk-2.0/gtk\ (this is the error line)
-I/home/manet/cairomm-1.2.0/cairomm\

the error is "*** commands commence before first target. Stop."
kelly-tan is offline
Reply With Quote
View Public Profile
 
Old 04-11-2008, 03:18 PM Re: HELP! on makefile
willcode4beer's Avatar
Webmaster Talker

Posts: 630
Name: Paul Davis
Location: San Francisco
Hard to tell without formatting but, I'm going to guess that you need a space between items.
Code:
INCLUDER|DIRS = \
-I/usr/include/gtkmm-2.4 \
-I/usr/include/gtk-2.0/gtk \
-I/home/manet/cairomm-1.2.0/cairomm \
__________________
Paul Davis
willCode4Beer.com (coding for all the right reasons)

Last edited by willcode4beer : 04-11-2008 at 03:19 PM.
willcode4beer is offline
Reply With Quote
View Public Profile
 
Old 04-13-2008, 09:33 PM Re: HELP! on makefile
Novice Talker

Posts: 7
the same error occur.

let me show u my files, maybe i format the makefile in a wrong way.

main.cc
#include "myarea.h"
#include <gtkmm/main.h>
#include <gtkmm/window.h>
int main (int argc, char** argv)
{
Gtk::Main kit (argc, argv);

Gtk::Window win;
win.set_title("DrawingArea");
MyArea area;
win.add(area);
area.show();

Gtk::Main::run(win);
return 0;
}

myarea.cc
#include "myarea.h"
#include <cairomm/context.h>

MyArea::MyArea()
{
}
MyArea::~MyArea()
{
}
bool MyArea:n_expose_event (GdkEventExpose* event)
{
// This is where we draw on the window
Glib::RefPtr<Gdk::Window> window = get_window();
if(window)
{
Gtk::Allocation allocation = get_allocation();
const int width = allocation.get_width();
const int height = allocation.get_height();
// coordinates for the center of the window
int xc,yc;
xc = width / 2;
yc = height / 2;
Cairo::RefPtr<Cairo::Context> cr = window->create_cairo_context();
cr->set_line_width(10.0);
// clip to the area indicated by the expose event so that we only redraw
// the portion of the window that needs to be redrawn
cr->rectangle(event->area.x, event->area.y, event->area.width, event->area.height);

cr->clip();
//draw blue lines out from the center of the window
cr->set_source_rgb(0.0 , 0.0 , 0.5);
cr->move_to(0, 0);
cr->line_to(xc, yc);
cr->line_to(0, height);
cr->move_to(xc, yc);
cr->line_to(width, yc);
cr->stroke();
}
return true;
}

myarea.h
#ifndef GTKMM_EXAMPLE_MYAREA_H
#define GTKMM_EXAMPLE_MYAREA_H

#include <gtkmm/drawingarea.h>
class MyArea : public Gtk:rawingArea
{
public:
MyArea();
virtual ~MyArea();
protected:
//Override default signal handler:
virtual bool on_expose_event(GdkEventExpose* event);
};
#endif // GTKMM_EXAMPLE_MYAREA_H


makefile
SHELL = home/manet/desktop


SOURCES = main.cc myarea.cc
OBJECTS = main.o myarea.o
CFLAGS = $(INCLUDEDIRS)
CC= g++
INCLUDE = \
-I/usr/include/gtkmm-2.4
#-I/usr/include/gtk-2.0/gtk
#-I/home/manet/cairomm-1.2.0/cairomm
LIB = #\
-L/usr/lib
#-L/home/manet
#lines = main.o myarea.o
#lines : $(lines)
# cc $(lines) -o lines
#main.o: myarea.h
#myarea.o : myarea.h
lines: ${OBJ}
${CXX} ${CFLAGS} ${INCLUDES} -o $@ ${OBJS} ${LIBS}
clean:
-rm -f *.o core *.core
.cc.o:
${CXX} ${CFLAGS} ${INCLUDES} -c $<
kelly-tan is offline
Reply With Quote
View Public Profile
 
Old 04-14-2008, 12:35 PM Re: HELP! on makefile
willcode4beer's Avatar
Webmaster Talker

Posts: 630
Name: Paul Davis
Location: San Francisco
Make is pretty sensitive to whitespace, so it's hard to tell from your post, could wrap it in [code ]code here[/code ] tags?
__________________
Paul Davis
willCode4Beer.com (coding for all the right reasons)
willcode4beer is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to HELP! on makefile
 

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.14861 seconds with 13 queries