View Single Post
Old Jul 4th, 2007, 5:39 AM   #1
cairo
Newbie
 
Join Date: Dec 2005
Posts: 18
Rep Power: 0 cairo is on a distinguished road
put method, main and member access specifiers separately

is it possible to put methods, main and member access specifiers separately? i mean example like:

a.cpp = methods
test.cpp=main
type.hh=member access specifiers

put whole in one folder to compile, i failed to do so in dev c++ 4.9.9.2
gave me error

Quote:
Compiler: Default compiler
Executing g++.exe...
g++.exe "C:\Documents and Settings\Compaq_Owner\My Documents\SIT\6044-6\Chapter 11\Source Code\Ch11_ClassClock\testClockClass.cpp" -o "C:\Documents and Settings\Compaq_Owner\My Documents\SIT\6044-6\Chapter 11\Source Code\Ch11_ClassClock\testClockClass.exe" -ansi -pedantic -Wall -fexceptions -g3 -I"C:\Dev-Cpp\lib\gcc\mingw32\3.4.2\include" -I"C:\Dev-Cpp\include\c++\3.4.2\backward" -I"C:\Dev-Cpp\include\c++\3.4.2\mingw32" -I"C:\Dev-Cpp\include\c++\3.4.2" -I"C:\Dev-Cpp\include" -L"C:\Dev-Cpp\lib" -g3
C:\DOCUME~1\COMPAQ~1\LOCALS~1\Temp/ccG6baaa.o(.text+0x131): In function `main':

C:/Documents and Settings/Compaq_Owner/My Documents/SIT/6044-6/Chapter 11/Source Code/Ch11_ClassClock/testClockClass.cpp:10: undefined reference to `clockType::clockType()'
C:\DOCUME~1\COMPAQ~1\LOCALS~1\Temp/ccG6baaa.o(.text+0x13c):C:/Documents and Settings/Compaq_Owner/My Documents/SIT/6044-6/Chapter 11/Source Code/Ch11_ClassClock/testClockClass.cpp:11: undefined reference to `clockType::clockType()'
C:\DOCUME~1\COMPAQ~1\LOCALS~1\Temp/ccG6baaa.o(.text+0x15f):C:/Documents and Settings/Compaq_Owner/My Documents/SIT/6044-6/Chapter 11/Source Code/Ch11_ClassClock/testClockClass.cpp:18: undefined reference to `clockType::setTime(int, int, int)'
C:\DOCUME~1\COMPAQ~1\LOCALS~1\Temp/ccG6baaa.o(.text+0x17e):C:/Documents and Settings/Compaq_Owner/My Documents/SIT/6044-6/Chapter 11/Source Code/Ch11_ClassClock/testClockClass.cpp:21: undefined reference to `clockType::printTime() const'
C:\DOCUME~1\COMPAQ~1\LOCALS~1\Temp/ccG6baaa.o(.text+0x1b1):C:/Documents and Settings/Compaq_Owner/My Documents/SIT/6044-6/Chapter 11/Source Code/Ch11_ClassClock/testClockClass.cpp:25: undefined reference to `clockType::printTime() const'
C:\DOCUME~1\COMPAQ~1\LOCALS~1\Temp/ccG6baaa.o(.text+0x1e8):C:/Documents and Settings/Compaq_Owner/My Documents/SIT/6044-6/Chapter 11/Source Code/Ch11_ClassClock/testClockClass.cpp:29: undefined reference to `clockType::setTime(int, int, int)'
C:\DOCUME~1\COMPAQ~1\LOCALS~1\Temp/ccG6baaa.o(.text+0x207):C:/Documents and Settings/Compaq_Owner/My Documents/SIT/6044-6/Chapter 11/Source Code/Ch11_ClassClock/testClockClass.cpp:32: undefined reference to `clockType::printTime() const'
C:\DOCUME~1\COMPAQ~1\LOCALS~1\Temp/ccG6baaa.o(.text+0x22d):C:/Documents and Settings/Compaq_Owner/My Documents/SIT/6044-6/Chapter 11/Source Code/Ch11_ClassClock/testClockClass.cpp:36: undefined reference to `clockType::equalTime(clockType const&) const'
C:\DOCUME~1\COMPAQ~1\LOCALS~1\Temp/ccG6baaa.o(.text+0x308):C:/Documents and Settings/Compaq_Owner/My Documents/SIT/6044-6/Chapter 11/Source Code/Ch11_ClassClock/testClockClass.cpp:50: undefined reference to `clockType::setTime(int, int, int)'
C:\DOCUME~1\COMPAQ~1\LOCALS~1\Temp/ccG6baaa.o(.text+0x327):C:/Documents and Settings/Compaq_Owner/My Documents/SIT/6044-6/Chapter 11/Source Code/Ch11_ClassClock/testClockClass.cpp:53: undefined reference to `clockType::printTime() const'
C:\DOCUME~1\COMPAQ~1\LOCALS~1\Temp/ccG6baaa.o(.text+0x346):C:/Documents and Settings/Compaq_Owner/My Documents/SIT/6044-6/Chapter 11/Source Code/Ch11_ClassClock/testClockClass.cpp:57: undefined reference to `clockType::incrementSeconds()'
C:\DOCUME~1\COMPAQ~1\LOCALS~1\Temp/ccG6baaa.o(.text+0x375):C:/Documents and Settings/Compaq_Owner/My Documents/SIT/6044-6/Chapter 11/Source Code/Ch11_ClassClock/testClockClass.cpp:61: undefined reference to `clockType::printTime() const'
C:\DOCUME~1\COMPAQ~1\LOCALS~1\Temp/ccG6baaa.o(.text+0x3a9):C:/Documents and Settings/Compaq_Owner/My Documents/SIT/6044-6/Chapter 11/Source Code/Ch11_ClassClock/testClockClass.cpp:66: undefined reference to `clockType::getTime(int&, int&, int&) const'
collect2: ld returned 1 exit status

Execution terminated
and it work fine if i put methods and main together in one file.
cairo is offline   Reply With Quote