I have an old Visual Studio C++ 6.0 DLL that I am trying to get call in a managed C++/CLI Code.
Here are the project settings that I used:
- Add the additional header directory for the unmanaged code
- Add the additional library directory for the unmanaged code
- Specify the lib file name of the unmanaged code
- Set the CLR option to /clr
- Removed the precompile header
- I am using VS2012 so I tried to lower the tooling to VS2008 \ I had just added the main header of the unmanaged code in the managed C++/CLI code.
The problem is it keeps on getting C2143 error in the struct definition.
The code is as follows
// logs struct
typedef struct FilesLog {
FILE *fpSender ; // <- Error in this line
FILE *fpReceiver ; // <- Error in this line
int SendCount , ReceiveCount ;
} FilesLog_t ;
It gets C2143 on FILE lines also in another FILE line inside a class definition. (which means the error is not just on structs)
I have tried mixing and matching the project settings but it still does not work. Any ideas?
Here is the whole token error as suggested in the comment. Based on my understanding this means it does not recognize FILE that is why it is saying it needs a semicolon before *.
error C2143: syntax error : missing ';' before '*'