|
VC++ API Anonymous [29 posts] |
15 year
|
why when i include RR_API.h and RR_API.cpp int my program, it will say
RR_API.cpp(1893) : fatal error C1010: unexpected end of file while looking for precompiled header. Did you forget to add '#include "stdafx.h"' to your source?
can anyone help...maybe i do wrong..but i dont know where.
i attach also the program, but not complete yet testing.zip
|
|
|
from United States [60 posts] |
15 year
|
VC expects all compilation units to use the same precompiled headers by default. If you add stdafx.h to the top of the RR_API.cpp file it may<i/> compile without errors. The other option is to not use precompiled headers. I say may<i/> because I don't do C++ in .NET framework so I may be missing something else.
|
|
|
Anonymous [29 posts] |
15 year
|
but when im include "stdafx.h" into RR_API.cpp it still have an error..
|
|
|
Anonymous [29 posts] |
15 year
|
now i'm using VC++ 2008 to do the API.
i'm use basic window form application in c++
but when i include the RR_API it occurs error. please anyone can help me
i include my program in zip file cam2.zip
|
|
|
Anonymous [29 posts] |
15 year
|
|
|
Anonymous [29 posts] |
15 year
|
is it really must use VC++ win32 or VC MFC to do the API in VC++
|
|
|
Anonymous |
15 year
|
mohd,
You can get rid of that error by switching off using precompiled headers.
In vc 2005 Project->Properties->Configuration Prop->C/C++->Precompiled Headers. Just set Create/Use Precompiled Header to Not Using ...
STeven.
|
|
|
Anonymous [29 posts] |
15 year
|
thanks....
the API is going well, but when i'm use the setvariable function, nothing happen to the roborealm program.
i make it when push button, it will creat the variable at the roborealm program. but nothing happen
void CSample_API_AppDlg::OnBnClickedTestModule()
{
RR_API rr;
rr.open("c:\\Program File\\RoboRealm\\RoboRealm.exe",6060);
if (!rr.connect("localhost"))
{
exit(0);
}
rr.setVariable("task","1");
rr.disconnect();
}
|
|
|
Anonymous [29 posts] |
15 year
|
sorry...now i know why it cannot been. the problem solved. by the way thanks
|
|