|
-
December 24th, 2006, 08:16 PM
#1
Question about Ezwindow
Hi there, I'm pretty new to C++ and I'm not sure why my ezwindow code would not work, would be nice if someone point out the problem. I'm currently using Visual Studio 2005 and I read something about setting the path of my include folder in preprocessor under project settings(not in VS2005).
The code:
#include <iostream>
#include <string>
#include "ezwin.h"
using namespace std;
int main() {
string name;
cout << "what is ur name? ";
cin >> name;
cout << "Die scum!" << name << endl;
SimpleWindow W;
W.Open();
return 0;
}
and the error:
1>------ Build started: Project: test2, Configuration: Debug Win32 ------
1>Compiling...
1>test2.cpp
1>Linking...
1>test2.obj : error LNK2019: unresolved external symbol "public: __thiscall SimpleWindow::~SimpleWindow(void)" (??1SimpleWindow@@QAE@XZ) referenced in function _main
1>test2.obj : error LNK2019: unresolved external symbol "public: enum WindowStatus __thiscall SimpleWindow::Open(void)" (?Open@SimpleWindow@@QAE?AW4WindowStatus@@XZ) referenced in function _main
1>test2.obj : error LNK2019: unresolved external symbol "public: __thiscall SimpleWindow::SimpleWindow(char const *,float,float,class Position const &)" (??0SimpleWindow@@QAE@PBDMMABVPosition@@@Z) referenced in function _main
1>test2.obj : error LNK2019: unresolved external symbol "public: __thiscall Position::Position(float,float)" (??0Position@@QAE@MM@Z) referenced in function _main
1>C:\Documents and Settings\Julius\My Documents\Visual Studio 2005\Projects\test2\Debug\test2.exe : fatal error LNK1120: 4 unresolved externals
1>Build log was saved at "file://c:\Documents and Settings\Julius\My Documents\Visual Studio 2005\Projects\test2\Debug\BuildLog.htm"
1>test2 - 5 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped
-
December 25th, 2006, 12:45 AM
#2
Re: Question about Ezwindow
The errors show that you have not linked with the library.
Right click on the solution->Properties->Linker, in Additional Dependencies enter the name of the library.
"I rather not play football than wear Nerrazzuri shirt" - Paolo Maldini
FORZA MILAN!!!
-
December 25th, 2006, 06:45 AM
#3
Re: Question about Ezwindow
Where did you got this SimpleWindow library? Is that the one which comes with one of the C++ book?
Regards,
Ramkrishna Pawar
-
December 25th, 2006, 06:46 AM
#4
Re: Question about Ezwindow
 Originally Posted by logan
The errors show that you have not linked with the library.
Right click on the solution->Properties->Linker, in Additional Dependencies enter the name of the library.
Or this class could be in form of CPP file, you will need o include it in your project in that case.
Regards,
Ramkrishna Pawar
-
December 25th, 2006, 04:25 PM
#5
Re: Question about Ezwindow
Ok I've put Ezwinvc50.lib at the "Additional Dependencies" but it generates another error:
1>------ Build started: Project: test2, Configuration: Debug Win32 ------
1>Compiling...
1>test2.cpp
1>Linking...
1>Ezwinvc50.lib(ezwin.obj) : error LNK2005: _main already defined in test2.obj
1>LINK : fatal error LNK1104: cannot open file 'libcpd.lib'
1>Build log was saved at "file://c:\Documents and Settings\Julius\My Documents\Visual Studio 2005\Projects\test2\Debug\BuildLog.htm"
1>test2 - 2 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
And yes the library is from a C++ book, is there a better source for the lib?
-
December 26th, 2006, 01:45 AM
#6
Re: Question about Ezwindow
Is that lib file supposed to be used as library? Are you sure that the book says you can use EzWindows like this?
Why there is main function defined inside ezWindows.lib file? This directly means that it is not a library of functions, instead it is a LIB file produced with the program(like exe etc.)
Regards,
Ramkrishna Pawar
-
December 26th, 2006, 03:20 AM
#7
Re: Question about Ezwindow
Oh ok, I'm not sure what to do now, hint please =D
-
December 26th, 2006, 03:46 AM
#8
Re: Question about Ezwindow
I would first see what the book says on how to use that library.
Regards,
Ramkrishna Pawar
-
December 26th, 2006, 07:15 PM
#9
Re: Question about Ezwindow
This is kinda silly, the book doesn't seem to say how to use it. Is there another source for ezwindow, or am I screwed?
-
December 27th, 2006, 01:01 AM
#10
Re: Question about Ezwindow
Why do you need ezWindows anyway? I haven't seen/heard anyone using it. Isn't win32 API or MFC enough?
Regards,
Ramkrishna Pawar
-
December 27th, 2006, 05:55 AM
#11
Re: Question about Ezwindow
 Originally Posted by NightBladeN
This is kinda silly, the book doesn't seem to say how to use it. Is there another source for ezwindow, or am I screwed?
So far, no one knows what this "ezwindows" is or has ever used it. My advice is to learn to program Windows the correct way, i.e. Win32 API, MFC, ATL, or other well-known technologies.
Then after learning how to program using Windows, then you don't need "ezwindows".
Regards,
Paul McKenzie
-
December 27th, 2006, 04:06 PM
#12
Re: Question about Ezwindow
Ah ok, I'm pretty new so I didn't know this is not a common thing, I'll try google ways to make windows properly then thanks for the help!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|