Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jun 22nd, 2012  |  syntax: None  |  size: 0.33 KB  |  hits: 12  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Undefined reference to 'main' error in crt1.o function _start
  2. CC := gcc
  3. CXX := g++
  4. LINK := g++ -Wall
  5. CFLAGS := -g
  6. CXXFLAGS := -g
  7.  
  8. TARGET = program
  9.  
  10. $(TARGET): modules.o main.o
  11.    $(LINK) -o $@ $< -lpcap
  12.  
  13. clean:
  14.    rm *.o $(TARGET)
  15.  
  16. modules.o:
  17.    $(CC) $(CFLAGS) -c modules.c -o $@ $<
  18.  
  19. main.o:
  20.    $(CXX) $(CXXFLAGS) -c main.cpp -o $@ $<