[Dev-C++] Re: Undefined reference error
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Napoleon A. <n_a...@ya...> - 2002-10-30 04:31:38
|
Hi,
I have this "Undefined reference error" ...
-------------------------------------------------------------
Building Makefile: "C:\Projects\DocuSort\Makefile.win"
Executing make...
mingw32-make.exe -f "C:\Projects\DocuSort\Makefile.win" all
g++.exe -c Ctrl.cpp -o Ctrl.o -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
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
-----------------------------------------------------------------------
which i posted and was advised to make sure that the file defines the
flaged functions are added to the project. This I have checked and
seems to be okay. In fact the functions in question are defined in
Control.h which in turn is included in Ctrl.h. Below is the content of
Control.h.
#if !defined (CONTROL_H)
#define CONTROL_H
#include <windows.h>
#include "Window.h"
#include "Procedure.h"
namespace Win
{
class Controller
{
friend LRESULT CALLBACK Procedure (HWND hwnd,
UINT message, WPARAM wParam, LPARAM lParam);
void SetWindowHandle (HWND hwnd) { _h = hwnd; }
public:
virtual ~Controller () {}
virtual bool OnCreate (Win::CreateData const * create, bool &
success) throw ();
virtual bool OnDestroy () throw ()
{ return false; }
virtual bool OnMouseMove (int x, int y, KeyState kState) throw ()
{ return false; }
virtual bool OnInitPopup (HMENU menu, int pos) throw ();
protected:
HWND _h;
};
}
#endif
I still however have the same error as above. I'll appreciate your help
please.
Napoleon.
__________________________________________________
Do you Yahoo!?
HotJobs - Search new jobs daily now
http://hotjobs.yahoo.com/
|