Napoleon Ahiable <n_a...@ya...> writes:
> Hello,
>
> I had these error message below after compilation. I will appreciate
> your help, please. Also what is the general solution for the "Undefined
>
> reference error" message?.
>
> Napoleon.
>
> Building Makefile: "C:\Projects\DocuSort\Makefile.win"
> Executing make...
> mingw32-make.exe -f "C:\Projects\DocuSort\Makefile.win" all
> g++.exe Main.o Class.o Maker.o Icon.o Procedure.o Commander.o View.o
> MenuTable.o Cmd.o Menu.o Exception.o Ctrl.o DocuSort_private.res -o
> "DocuSort.exe" -L"C:/MinGW/lib" -L"C:/Dev-Cpp/Lib" -lcomctl32
> -I"C:/MinGW/include" -I"C:/Dev-Cpp/Include" -I"C:/MinGW/include/c++"
> -I"C:/MinGW/include" -I"C:/Dev-Cpp/Include" -D_WIN32_IE=0x0300 -g3
> -DSTRICT -s -mwindows Main.o: In function `ZN4Menu5MakerD2Ev':
> c:/mingw/include/c++/3.2/memory(.data$_ZTVN3Win10ControllerE+0x10):
> undefined reference to `Win::Controller::OnCreate(Win::CreateData
> const*, bool&)'
> Main.o: In function `WinMain':
> C:/Projects/DocuSort/Main.cpp:9: undefined reference to
> `Win::Controller::OnInitPopup(HMENU__*, int)' mingw32-make.exe: ***
> [DocuSort.exe] Error 1 Execution terminated
Where is your Win::Controller class located? It should be in one of
the object files on the command line, like Menu.o and Exception.o.
The general solution is to make sure that on object file or library
that has the implementation of the function is included during the link
stage, such as by adding -lwsock32 (or some other library) or a local
object file.
Anyway, for Dev-C++, make sure that the source file for Win::Controller
has been added to the project (assuming that it is something you wrote
for this particular project).
Elizabeth
|