Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8891149
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T22:39:53+00:00 2026-06-14T22:39:53+00:00

I know many people have asked this before but I haven’t been able to

  • 0

I know many people have asked this before but I haven’t been able to resolve it. I want to debug a makefile project in eclipse, but I can’t. I’m just learning c++ and don’t know how to write makefiles, but my teacher gave me one to use, I have posted it below. How can I fix this error?

Also, if it is of any help to you guys, I only want to debug the DijkstraTest.cpp main function, not any of the other ones.

# first name a variable objects for all object files
# FOR strauss
#CXX = CC

objectsqueue = LinkedList.o

objectstestqueue = QueueTests.o

objectsheap = BinaryHeap.o

objectstestheap = BinaryHeapTest.o

objectsdijkstra = CSV.o Network.o Dijkstra.o

objectstestdijkstra = DijkstraTest.o

# name a variable sources for all source files

sourcesqueue = LinkedList.cpp

sourcestestqueue = QueueTests.cpp

sourcesheap = BinaryHeap.cpp

sourcestestheap = BinaryHeapTest.cpp

sourcesdijkstra = CSV.cpp Network.cpp Dijkstra.cpp

sourcestestdijkstra = DijkstraTest.cpp

# now make default target all exe files
all: testqueue testheap testdijkstra

# list the dependencies for object files - those header files which help build objects
LinkedList.cpp: Collection.h Stack.h Queue.h
QueueTests.o: QueueTests.cpp LinkedList.cpp
BinaryHeap.o: BinaryHeap.h 
BinaryHeapTest.o: BinaryHeap.h 
Dijkstra.o: CSV.h Dijkstra.h Network.h BinaryHeap.h 

# how to build all object files from all dependent source files

$(objectsqueue): $(sourcesqueue)
$(CXX) -c $(sourcesqueue) $(INCLUDES)

$(objectstestqueue): $(sourcestestqueue)
$(CXX) -c $(sourcestestqueue) $(INCLUDES)

$(objectsheap): $(sourcesheap)
$(CXX) -c $(sourcesheap) $(INCLUDES)

$(objectstestheap): $(sourcestestheap)
$(CXX) -c $(sourcestestheap) $(INCLUDES)

$(objectsdijkstra): $(sourcesdijkstra)
$(CXX) -c $(sourcesdijkstra) $(INCLUDES)

$(objectstestdijkstra): $(sourcestestdijkstra)
$(CXX) -c $(sourcestestdijkstra) $(INCLUDES)

clean:
rm -f *.o
rm -f *.exe

testqueue:  $(objectsqueue) $(objectstestqueue)
$(CXX) -o QueueTests.exe $(objectsqueue) $(objectstestqueue)

testheap: $(objectsheap) $(objectstestheap) 
$(CXX) -o BinaryHeapTest.exe $(objectsheap) $(objectstestheap)

testdijkstra: $(objectsheap) $(objectsdijkstra) $(objectstestdijkstra) 
$(CXX) -o DijkstraTest.exe $(objectsheap) $(objectsdijkstra) $(objectstestdijkstra)
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T22:39:54+00:00Added an answer on June 14, 2026 at 10:39 pm

    To be able to debug an application, you need to compile it using the -g (debug) flag:

    CXXFLAGS=-g
    
    $(objectsqueue): $(sourcesqueue)
    $(CXX) $(CXXFLAGS) -c $(sourcesqueue) $(INCLUDES)
    
    ...
    
    testqueue:  $(objectsqueue) $(objectstestqueue)
    $(CXX) $(CXXFLAGS) -o QueueTests.exe $(objectsqueue) $(objectstestqueue)
    
    ....
    

    you need to use this flag for all compilation rules.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I know many people have asked, this question, but despite hardcoding the path to
I know that many people have had this problem... but I am now having
I know questions like this have been asked before, and I've viewed a lot
Many people have asked about Rails hosting on this site, but I'm not familiar
I know that this question has been asked many times before in different guises
I don't know how many people have used this library, but I am using
I know this has been asked before, but I'm still undecided on which PDF
I know many people ask this but all the answers are specific apps so
I know that the question has been asked before , but it's been two
I know a lot of similar questions have been asked, but my case is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.