1. Reading a book "You can Program in C++" by Francis Glassborow.
2. Installed Microsoft Visual Studio 2008 Express Edition (C++)
3. Started my first CLR Console Application and "Hello Word" program - ok
4. Second program with a custom header file / custom library - error
Error message as follows:
..\playpen2.cpp(3) : fatal error C1083: Cannot open include file: 'playpen.h': No such file or directory
I remember having that same problem. That is because "playpen.h" is a custom header file Francis Glassborow provided. Make sure you copy those working file into VS header file directory. And include the file as "playpen.h" There is somewhere in the project property where you can link the whole directory...I don't know where in VS though. :( gl.
To add a directory to the list of default include directories on VC++, you should go to
Tools > Options > Projects and Solutions > VC++ Directories
Select "Include files" on the combo box under "Show directories for:"
And then you will be able to add directories to look for when typing #include <something.h>
Ok, thank you so much! It was not too obvious for the first time use :-)
Another problem:
Line 44 in the "fgw_text.h" -file
if(c == EOF or c == '\n')break;
will cause an error while compiling:
error C2146: syntax error : missing ')' before identifier 'or'
After dividing the line to two separate lines
if(c == EOF) break;
if(c == '\n') break;
it works but there are several more complex lines with the same problem.
Any thoughs about that? Has syntax changed or what is that?
I usually get Linker errors when I use a non inplemented function
eg:
1 2 3 4 5 6
int MyFunction();
int main()
{
return MyFunction();
}
If you try to compile this, you will get :
LNK2019: unresolved external symbol "int __cdecl MyFunction(void)" (?MyFunction@@YAHXZ) referenced in function _main
Try to check out if you have functions with missing body.