still saying the same thing
Main Topics
Browse All Topics$ g++ *.o -o calculator
main.o: In function `main':
main.cpp:(.text+0x1ea): undefined reference to `SAMSErrorHandling::Initia
main.cpp:(.text+0x2fa): undefined reference to `SAMSErrorHandling::Handle
main.cpp:(.text+0x322): undefined reference to `SAMSPrompt::UserWantsToCo
collect2: ld returned 1 exit status
also is there any redundancy in my code (ie. I've #included something I didn't need too)?
Thanks
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
The reason ist a different one. You are using symbols in which are declared later so the
order of the *.o file do have a meaning. What you get is a message from the Linker it can not resolve a
the symbo anmes so maybe
g++ main.c sams_error_handler.o -o .... will do or you have to write it the other way.
g++ sams_error_handler.o main.c -o calculator
For that to work you better make use of Makefile in which you layout the rules on what depends on what.
Business Accounts
Answer for Membership
by: trinitrotoluenePosted on 2009-11-03 at 17:20:01ID: 25735615
you have protected the functions in namespaces. The linker is unable to find definitions for your functions.
Try the following in main.cpp
Select allOpen in new window