Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Mar 24th, 2006, 6:39 AM   #1
Vagabond
Newbie
 
Vagabond's Avatar
 
Join Date: Mar 2006
Posts: 10
Rep Power: 0 Vagabond is on a distinguished road
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();
}
Vagabond is offline   Reply With Quote
Old Mar 24th, 2006, 8:13 AM   #2
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
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
DaWei is offline   Reply With Quote
Old Mar 24th, 2006, 10:14 AM   #3
Vagabond
Newbie
 
Vagabond's Avatar
 
Join Date: Mar 2006
Posts: 10
Rep Power: 0 Vagabond is on a distinguished road
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.CPP
Linker Error: Undefined symbol TApplication:rocessAppMsg(tagMSG far&) in module BASICWND.CPP
Linker Error: Undefined symbol TApplication::MessageLoop() in module BASICWND.CPP
Linker Error: Undefined symbol TApplication:tart() in module BASICWND.CPP
Linker 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.CPP
Linker 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.CPP
Linker 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
Vagabond is offline   Reply With Quote
Old Mar 24th, 2006, 11:56 AM   #4
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
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
DaWei is offline   Reply With Quote
Old Mar 24th, 2006, 3:25 PM   #5
Seif
Hobbyist Programmer
 
Seif's Avatar
 
Join Date: Jan 2006
Location: UK
Posts: 214
Rep Power: 3 Seif is on a distinguished road
bit harsh man :/
Seif is offline   Reply With Quote
Old Mar 24th, 2006, 3:51 PM   #6
Vagabond
Newbie
 
Vagabond's Avatar
 
Join Date: Mar 2006
Posts: 10
Rep Power: 0 Vagabond is on a distinguished road
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.
Vagabond is offline   Reply With Quote
Old Mar 24th, 2006, 4:03 PM   #7
grumpy
Programming Guru
 
grumpy's Avatar
 
Join Date: Jun 2005
Location: Adelaide, South Australia
Posts: 1,207
Rep Power: 5 grumpy is on a distinguished road
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.
grumpy is offline   Reply With Quote
Old Mar 24th, 2006, 5:31 PM   #8
Ooble
I eat cake for breakfast.
 
Ooble's Avatar
 
Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9 Ooble is on a distinguished road
Is there any way you can avoid using Turbo C++? God, that's old...
__________________
Me :: You :: Them
Ooble is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 2:44 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC