Author Topic: Linker Problem  (Read 334 times)

Offline Rbt618

  • Single posting newcomer
  • *
  • Posts: 1
Linker Problem
« on: December 14, 2019, 07:12:06 am »
I am assuming I have a linker problem.
I run my program and get an "Undefined" function error.
But if I include the Implementation file on my main.cpp file then it will run. So I am assuming codeblocks is not linking the Header and the implementation files >> that's why I have to include the implementation file on main.cpp.
I use Ubuntu 18.04 and codeblocks 17.04.

Once I do include the implementation file on main.cpp, then my program runs perfectly. That's why I think its a Linker Error

Any Thoughts on resolving this??

Online stahta01

  • Lives here!
  • ****
  • Posts: 6769
    • My Best Post
Re: Linker Problem
« Reply #1 on: December 14, 2019, 07:22:16 am »
Add the files to the CB Project.

Note: If you are not using a CB Project, then I suggest using one.

Edit: If you still have problems post a build log!
http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_%28general%29#Q:_How_do_I_report_a_compilation_problem_on_the_forums.3F

Tim S.
« Last Edit: December 14, 2019, 07:27:43 am by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org