• C++ Programming for Financial Engineering
    Highly recommended by thousands of MFE students. Covers essential C++ topics with applications to financial engineering. Learn more Join!
    Python for Finance with Intro to Data Science
    Gain practical understanding of Python to read, understand, and write professional Python code for your first day on the job. Learn more Join!
    An Intuition-Based Options Primer for FE
    Ideal for entry level positions interviews and graduate studies, specializing in options trading arbitrage and options valuation models. Learn more Join!

Resolving undefined references

Joined
11/5/14
Messages
294
Points
53
Hi,

I am trying to model points in the \({R}^{2}\) in a C++ program - chapter 4 of Introduction to C++ for financial engineers. I am working on Ubuntu - gc++ compiler with Eclipse as the IDE.

While building the project, the compilation works good. The linker throws an undefined reference error.

Building target: PointDemo
Invoking: GCC C++ Linker
g++ -o "PointDemo" ./Point.o ./TestPoint.o
./Point.o: In function `Point:: Point()':
/home/quasar/workspace/PointDemo/Debug/../Point.cpp:14: undefined reference to `vtable for Point'

Do the arguments to g++ -o need to supplied in a specific order?

I apologize that the question is not pertaining to C++ syntax as such, but rather a configuration issue. I googled, but I can't resolve the error.
 
Last edited:
It's a question of knowing the compilation and linking processes.

Code looks like verbatim copy. What happened to author's copyright?
 
Last edited:
No problem.

edit: Anyways, the whole point about programming is to spend as long as it takes to solve compiler problems. You cannot expect others to debug your code for you.

Maybe take a simpler example.
 
Last edited:
Back
Top