External library doesn't like me!

and a general question about OO design.

Page 1 of 1

2 Replies - 832 Views - Last Post: 21 February 2008 - 10:56 AM Rate Topic: -----

#1 ShotokanDeity  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 96
  • Joined: 13-September 07

External library doesn't like me!

Posted 19 February 2008 - 04:06 PM

Hi everyone,

I am using MS Visual Studio 2005. I have manually included the library files for a compilation called EZ-Windows. According to my text book, I should be able to run the attached .cpp file with no problem, but it won't even compile for me. So, if anyone could help me out here I would greatly appreciate it.

I will attach the powerpoint slide that I followed to include the library, as well as the EZ-Windows files and my SimpleWindow file (as a .txt).



Now as a general question about OO design, my teacher had mentioned having a separate .cpp file for every object. So let's say for example I have to make a Tee game (like at Cracker Barrel) that draws a triangle 'board' and tees and stuff and obviously the game functions similarly. So since the tee's are an object, the board is an object, and then you have the basic game object, should I be using three separate .cpp files (one per object)?

But please help me with this EZ-Windows thing, because I have to use it for the rest of my semester! And it goes without saying I will need to know how to do this on my own eventually.

Thanks all!

:bananaman:

ok, well it won't attach. But I'll check back in soon to try to re-attach.

edit: apparently DIC doesn't like me anymore either...I can't attach anything :(

This post has been edited by ShotokanDeity: 19 February 2008 - 06:15 PM


Is This A Good Question/Topic? 0
  • +

Replies To: External library doesn't like me!

#2 KYA  Icon User is offline

  • su wtf -am -i /doing/with/my/life
  • member icon

Reputation: 2979
  • View blog
  • Posts: 19,032
  • Joined: 14-September 07

Re: External library doesn't like me!

Posted 19 February 2008 - 04:23 PM

View PostShotokanDeity, on 19 Feb, 2008 - 05:06 PM, said:

Hi everyone,

I am using MS Visual Studio 2005. I have manually included the library files for a compilation called EZ-Windows. According to my text book, I should be able to run the attached .cpp file with no problem, but it won't even compile for me. So, if anyone could help me out here I would greatly appreciate it.

I will attach the powerpoint slide that I followed to include the library, as well as the EZ-Windows files and my SimpleWindow file (as a .txt).



Now as a general question about OO design, my teacher had mentioned having a separate .cpp file for every object. So let's say for example I have to make a Tee game (like at Cracker Barrel) that draws a triangle 'board' and tees and stuff and obviously the game functions similarly. So since the tee's are an object, the board is an object, and then you have the basic game object, should I be using three separate .cpp files (one per object)?

But please help me with this EZ-Windows thing, because I have to use it for the rest of my semester! And it goes without saying I will need to know how to do this on my own eventually.

Thanks all!

:bananaman:

ok, well it won't attach. But I'll check back in soon to try to re-attach.



You would have each class definition in seperate header files, then the actual methods/functions in their own seperate cpp files and then you would have a 'main' cpp file that would utilize all the information in the other files.

For linking libraries, MSVS supports the use of:

#pragma comment (lib, "libraryname.lib")



If project setting's linker isn't cutting it.

Hope that helps

--kya
Was This Post Helpful? 0
  • +
  • -

#3 ShotokanDeity  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 96
  • Joined: 13-September 07

Re: External library doesn't like me!

Posted 21 February 2008 - 10:56 AM

OK I looked it up some but I am still unsure of what #pragma actually does. Now for my example, would I use this:
#pragma comment (lib, "Ezwinvc50.lib")


Thanks,

:bananaman:

This post has been edited by ShotokanDeity: 21 February 2008 - 10:57 AM

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1