Hi,

I am currently working on a program that compiles fine and runs OK to give some results. However, when I try to split the program into 3 parts, it it gives some weird compilation errors. Initially I had one program, calc.cpp that manipulates polynomials (adds/ subtract/multiply them). However when I split the program into three, polynomial.h, polynomial.cpp and calc.cpp I get complilation errors. Calc.cpp has polynomial.h included. Yet, when I call functions from polynomial.h it gives the following errors like it can't find the functions from polynomial.h. getpoly, add, compare, print are all functions in polynomial.h that I am trying to call. Any help would be appreciated. I can send the code if you would like to see it. I'm really stuck here...help!!

Errors on the compiler and linker output:
C:\DOCUME~1\saffyy\LOCALS~1\Temp\ccgVcaaa.o(.text+0x54f):calc.cpp: undefined reference to `getpoly(basic_string<char, string_char_traits<char>, __default_alloc_template<0, 0> >, list<polyInfo, allocator<polyInfo> > &, bool &)'
C:\DOCUME~1\saffyy\LOCALS~1\Temp\ccgVcaaa.o(.text+0x5c0):calc.cpp: undefined reference to `compare(polyInfo const &, polyInfo const &)'
C:\DOCUME~1\saffyy\LOCALS~1\Temp\ccgVcaaa.o(.text+0x8a6):calc.cpp: undefined reference to `add(list<polyInfo, allocator<polyInfo> > const &, list<polyInfo, allocator<polyInfo> >)'
C:\DOCUME~1\saffyy\LOCALS~1\Temp\ccgVcaaa.o(.text+0xaec):calc.cpp: undefined reference to `print(list<polyInfo, allocator<polyInfo> > const &)'

Have you checked you include statements? Are they appropriately set, spelling and all?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.