|
-
May 19th, 2005, 11:02 AM
#1
Inexplanable error
Hi all,
I am trying to a compile a piece of code that is guaranteed to be compiled on a unix OS. It is giving me heart burns when I do it for windows. I am using VC++ 6.0.
There are a bunch of c and h files. Since the code is in C++, I changed the extention of all c files to cpp. One of them named demo1.cpp, appears to be the starting point as indicated by the readme. I just included that file to a newly created project.
When I compile it, I got the following errors:
fatal error C1083: Cannot open include file: 'stream.h': No such file or directory
fatal error C1083: Cannot open include file: 'sys/file.h': No such file or directory
fatal error C1083: Cannot open include file: 'sys/time.h': No such file or directory
The 3rd error could be removed by changing the directory structure from sys/time.h to time.h. For the first two I just commented them out. I don't know what are those files for and where to get them. If I try to compile it again, I run into the following problem:
error C2628: '$S17' followed by 'int' is illegal (did you forget a ';'?)
And the error is pointed to the class definition statement in the following code segment:
Code:
struct ComplexDataType{
void* data;
int descriptor;
};
class AttId{
public:
AttId();
AttId(int l,double* v,int d);
};
Now this is inexplanable. These are valid c++ statements, and it appears that VC++ can smell that the code was actually intended for unix.
Please help
Zeato
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
|