![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Newbie
Join Date: Mar 2006
Posts: 10
Rep Power: 0
![]() |
C++ OWL What am I doing wrong
This is my cade - but I get loads of errors. Whats wrong? ( Besides been Old style C++)
#include <owl\applicat.h>
#include <owl\framewin.h>
class TDrawApp: public TApplication
{
public:
TDrawApp():TApplication() {}
void InitMainWindow()
{
SetMainWindow(new TFrameWindow(0, "Sample ObjectWindows Program"));
}
};
int OwlMain(int /* argc */, char* /* argv */ [])
{
return TDrawApp().Run();
} |
|
|
|
|
|
#2 |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
You don't say what your errors are (aside from hinting that you're using ancient stuff that won't usually work on an XP machine). I'm guessing that the green include statements are incompatible with the blue strings. Clashes, don't ya know? My crystal is coming back with new "ball" joints next week, though, so maybe I can do better then.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code. Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers |
|
|
|
|
|
#3 |
|
Newbie
Join Date: Mar 2006
Posts: 10
Rep Power: 0
![]() |
Thanx Oh Great Guru of wisdom!
I'm using Turbo C++ 4.5 (Yeh!Yeh! I Know) on Xp .It compiles with no errors but when I run it I get 23 linker errors like Linking basicwnd.exe: Linker Warning: No module definition file specified: using defaults Linker Error: Undefined symbol TApplication::~TApplication() in module BASICWND.CPP Linker Error: Undefined symbol TApplication::TApplication(const char far*,TModule far*far&,TAppDictionary far*) in module BASICWND.CPP Linker Error: Undefined symbol _Module in module BASICWND.CPP Linker Error: Undefined symbol TApplication::IdleAction(long) in module BASICWND.CPP Linker Error: Undefined symbol TApplication::TermInstance(int) in module BASICWND.CPP Linker Error: Undefined symbol TApplication::InitInstance() in module BASICWND.CPP Linker Error: Undefined symbol TApplication::InitApplication() in module BASICWND.CPP Linker Error: Undefined symbol TApplication: reProcessMenu(const HMENU__ near*) in module BASICWND.CPPLinker Error: Undefined symbol TApplication: rocessAppMsg(tagMSG far&) in module BASICWND.CPPLinker Error: Undefined symbol TApplication::MessageLoop() in module BASICWND.CPP Linker Error: Undefined symbol TApplication: tart() in module BASICWND.CPPLinker Error: Undefined symbol TApplication::Run() in module BASICWND.CPP Linker Error: Undefined symbol TApplication::CanClose() in module BASICWND.CPP Linker Error: Undefined symbol TModule::Error(int) in module BASICWND.CPP Linker Error: Undefined symbol TModule::Error(xmsg far&,unsigned int,unsigned int) in module BASICWND.CPP Linker Error: Undefined symbol TEventHandler: ispatch(TEventHandler::TEventInfo far&,int,long) in module BASICWND.CPPLinker Error: Undefined symbol TApplication::Find(TEventHandler::TEventInfo far&,(*)(TResponseTableEntry<GENERIC>far&,TEventHandler::TEventInfo far&,int)) in module BASICWND.CPP Linker Error: Undefined symbol TApplication: etMainWindow(TFrameWindow far*) in module BASICWND.CPPLinker Error: Undefined symbol TFrameWindow::TFrameWindow(TWindow far*,const char far*,TWindow far*,int,TModule far*) in module BASICWND.CPP Linker Error: Undefined symbol TModule::~TModule() in module BASICWND.CPP Linker Error: Undefined symbol TFrameWindow::~TFrameWindow() in module BASICWND.CPP Linker Error: Undefined symbol TWindow::~TWindow() in module BASICWND.CPP Linker Error: Undefined symbol _main in library file C:\TCWIN45\LIB\cwl.lib in module winmain Now I'm stumped.TApplicatation should be included in owl\applicat.h |
|
|
|
|
|
#4 |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
The Great Guru of Wisdom says to the Smartass Noob who is lucky to be getting this answer:
Those are linker errors. That doesn't mean that they're undefined to the compiler, which definition gets done by the included .h files. That means they're unknown to the linker, which needs more than definition, it needs real live code to attach into the application. The solution is to give the linker a path to where the library files (which contain the actual code) are stored. If there is no such path or if there are no such files, fix it. Your ignorance regarding how to ask a rational question is YOUR fault, not mine, not your mama's. You may still get sugar tits from HER when you whine or misbehave, but not from ME. If you want to get real and play nice, post properly. If you don't want to do that, kiss my ass. Wash your face with disinfectant first.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code. Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers |
|
|
|
|
|
#5 |
|
Hobbyist Programmer
Join Date: Jan 2006
Location: UK
Posts: 214
Rep Power: 3
![]() |
bit harsh man :/
|
|
|
|
|
|
#6 |
|
Newbie
Join Date: Mar 2006
Posts: 10
Rep Power: 0
![]() |
Nah! I probably deserve it! ...... I allways look up to wisdom and respect superiority. My question my be imature and I appologise if it or any of my comments has caused offence.
|
|
|
|
|
|
#7 |
|
Programming Guru
![]() Join Date: Jun 2005
Location: Adelaide, South Australia
Posts: 1,207
Rep Power: 5
![]() |
If someone someone says "I have a problem" but the details of what the problem really is have to be drawn out, the regulars here will either ignore the question or show some irritation when they respond. If the details of the actual problem make it blindingly obvious that the person asking the question has barely even tried (in this case, the person is "stumped" but the problem is blindingly obvious to anyone who has ever taken the trouble to skim documentation for their compiler, linker, or development environment) the natives can be expected to become a little acidic. Some newbies understand that, and take it onboard and learn, and some don't.
Dawei reaches for his poison pen a bit sooner than some other natives but, as in this case, he will give an answer if at all possible. There are actually sticky threads on "How to ask a question" in these forums. Newbies seem to believe they don't need to read them. But reading those threads is actually a good way to learn how to ask questions to increase ones chances of getting a useful response. |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|