I have been a Delphi user for 8 years and now migrated to C++ and have found the changeover quite taxing indeed.
I am using Visual Studio .NET and have before that used MSVC 3 and MSVC 6 and always had the same problem:
I code my classes and methods etc and they all work perfectly.
I then split them into .h and .cpp files and do the #ifndef thingy on the .h file.
I then include both files into the project using the right click:add:existing item method and in my main file I do #include <myclass.h>
EVEY TIME I call a method from my class I get an UNRESOLVED EXTERNAL SYMBOL error message for every method used in my source file.
Removing the .h (iether/or/and) .cpp file gives the same problem. moving the files to a new dir gives me a 'file not found' error till i return i to my include path so I know it finds the file.
The only way i can get my code to compile without error messages is to includ my header file in my class.cpp file and then to do the following in my source file:
#include <myclass.h>
#include <myclass.cpp>
I've tried turning off preprocessor binding etc but this is the only way i have been able to get my code to work...
Why is this and how do i get this to work properly in VisualStudio.net
I am so frustrated that I want to go back to using Delphi, bu for the purpose of distributing my final program on the Mac as well as on Windows, Delphi is not really an option.
Seeing how I am no a fan of using other people's code and rewriting everything to be my own (the current file in question is a linked list class to remove dependance on the VECTOR and LIST classes), I am considering moving over to Borland C since I have a lot of faith on Borland and believe thier IDE won't give me this problem.
Here is my initial concern though:
Is my problem somehow rlated to C++ or entirely the IDE?
Please help. I've been stuck for months now!
Thanks in advance