Re: Undefined reference to
Re: Undefined reference to
Online compiler also builds. But Code::Blocks 12.11 keeps yelling:
Build messages:
Code:
C:\Users\oniltech\Dropbox\CMS\Molecular Dynamics\Assignment 1\revision 1\BCC_FCC_HCP.o:BCC_FCC_HCP.cpp|| undefined reference to `Atom:: DoBCC(float, int, int, int)'|
||=== Build finished: 1 errors, 0 warnings (0 minutes, 7 seconds) ===|
Build log:
Code:
mingw32-g++.exe -march=athlon64 -Wall -c "C:\Users\oniltech\Dropbox\CMS\Molecular Dynamics\Assignment 1\revision 1\BCC_FCC_HCP.cpp" -o "C:\Users\oniltech\Dropbox\CMS\Molecular Dynamics\Assignment 1\revision 1\BCC_FCC_HCP.o"
mingw32-g++.exe -o "C:\Users\oniltech\Dropbox\CMS\Molecular Dynamics\Assignment 1\revision 1\BCC_FCC_HCP.exe" "C:\Users\oniltech\Dropbox\CMS\Molecular Dynamics\Assignment 1\revision 1\BCC_FCC_HCP.o"
C:\Users\oniltech\Dropbox\CMS\Molecular Dynamics\Assignment 1\revision 1\BCC_FCC_HCP.o:BCC_FCC_HCP.cpp:(.text+0x1b2): undefined reference to `Atom::DoBCC(float, int, int, int)'
collect2.exe: error: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 7 seconds)
1 errors, 0 warnings (0 minutes, 7 seconds)
What might be done to fix this?
Re: Undefined reference to
Did you include Atom.cpp in your project/makefile?
Re: Undefined reference to
Quote:
Originally Posted by
D_Drmmr
Did you include Atom.cpp in your project/makefile?
No, thank you. Initially I did not create a project at all. Now it works fine. Thanks a million!
Quote:
Please put tags around your code to preserve indentation and make it more readable.
Done.