| officialhopsof (16) | |||||||
|
I have the following file (I did everything in the .h file as I think that is a much cleaner way to do this, I realize my compile times will increase. I am much more familiar with java than I am c++): Panel.h:
And panel derives from container as you see, yet I have the following problems with the file:
The class was obviously included so I am a bit stuck. I imagine this is related to this following issue, I have the following: Container.h:
And if I didn't make the forward declaration to LayoutManager then it was unable to find the class regardless of me including it. I have the following system specs: Windows 7 x64 Eclipse 4.2.x MingW (latest) with SDL (latest) dev libraries and this is an SDL project if that matters also, here is a link to my workspace if that is of any help: https://dl.dropbox.com/u/8241732/workspace.zip Thank you for any help at all you can give me. Brandon | |||||||
|
Last edited on
|
|||||||
| Smac89 (201) | |
| Try to have your your includes above your ifndef statements and see if that makes a difference | |
|
|
|
| officialhopsof (16) | |
| @Amac89 nope, didn't fix the issue, thanks though! | |
|
|
|
| BlackSheep (420) | |
| Did you link to the library that provides all the "component" functions? | |
|
|
|
| officialhopsof (16) | |
| @BlackSheep well, its just a class I created in the same project | |
|
|
|
| TTT (52) | ||
It seems something is wrong, there shouldn't be need for forward declaration, it must work by including LayoutManager.h, I think you have got another mistake in your project, if you give the whole project I think I can help somehow. | ||
|
|
||
| Peter87 (3917) | |
| The error you get is a linker error. The linker can't find the definitions of Component::getWidth(), Component::getHeight(), and the rest of the functions in the list. Make sure you have defined the functions somewhere. If you defined the functions in a source file, make sure that you have added the source files to your project. | |
|
Last edited on
|
|
| officialhopsof (16) | |
|
@TTT Sure thing! https://dl.dropbox.com/u/8241732/workspace.zip Thanks! @Peter87 Yeah, I double checked and they exist. I am beginning to think it is something funky eclipse is doing during the build process, I am thinking I may want to try importing the project into something like codeblocks to see if that makes all the problems disappear. | |
|
|
|