Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

Coding Forum


You are currently viewing our Coding Forum as a guest. Please register to participate.
Login



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

Posts: 7
Trades: 0
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
 
 
Register now for full access!
Old 04-09-2008, 10:34 PM Re: HELP! on makefile
willcode4beer's Avatar
Super Moderator

Posts: 1,533
Name: Paul Davis
Location: San Francisco
Trades: 1
make thinks you left out a target

probably just need to check your tabs
__________________

Please login or register to view this content. Registration is FREE

willcode4beer is offline
Reply With Quote
View Public Profile
 
Old 04-09-2008, 10:41 PM Re: HELP! on makefile
Novice Talker

Posts: 7
Trades: 0
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, 11:13 AM Re: HELP! on makefile
willcode4beer's Avatar
Super Moderator

Posts: 1,533
Name: Paul Davis
Location: San Francisco
Trades: 1
try to extract the fragment that causes the error and post that
__________________

Please login or register to view this content. Registration is FREE

willcode4beer is offline
Reply With Quote
View Public Profile
 
Old 04-10-2008, 10:41 PM Re: HELP! on makefile
Novice Talker

Posts: 7
Trades: 0
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, 04:18 PM Re: HELP! on makefile
willcode4beer's Avatar
Super Moderator

Posts: 1,533
Name: Paul Davis
Location: San Francisco
Trades: 1
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 \
__________________

Please login or register to view this content. Registration is FREE


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

Posts: 7
Trades: 0
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, 01:35 PM Re: HELP! on makefile
willcode4beer's Avatar
Super Moderator

Posts: 1,533
Name: Paul Davis
Location: San Francisco
Trades: 1
Make is pretty sensitive to whitespace, so it's hard to tell from your post, could wrap it in [code ]code here[/code ] tags?
__________________

Please login or register to view this content. Registration is FREE

willcode4beer is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to HELP! on makefile
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

BB 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.67333 seconds with 12 queries