Archived
This forum has been archived. Please start a new discussion on GitHub.
Some strange errors from MSVC.net
aerowyn
in Help Center
I am very interested in using Ice, but I am having some problems when I tried to put some test Ice code into one of my applications, and I cant track down the problem.. perhaps one of you could help me out a bit...
Here are the errors MSVC.net gives me when I try to compile:
C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\cstdio(17) : error C2143: syntax error : missing '{' before ':'
C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\cstdio(17) : error C2059: syntax error : ':'
C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\cstdio(17) : error C2143: syntax error : missing '{' before ':'
C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\cstdio(17) : error C2059: syntax error : ':'
C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\cstdio(17) : error C2143: syntax error : missing '{' before ':'
It goes on like that to give me about 100 errors, all on the same syntax in both cstdio and cstdlib.
Im sure it is something simple I am over looking, but I cant find it... any help would be appreciated.
Here are the errors MSVC.net gives me when I try to compile:
C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\cstdio(17) : error C2143: syntax error : missing '{' before ':'
C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\cstdio(17) : error C2059: syntax error : ':'
C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\cstdio(17) : error C2143: syntax error : missing '{' before ':'
C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\cstdio(17) : error C2059: syntax error : ':'
C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\cstdio(17) : error C2143: syntax error : missing '{' before ':'
It goes on like that to give me about 100 errors, all on the same syntax in both cstdio and cstdlib.
Im sure it is something simple I am over looking, but I cant find it... any help would be appreciated.
0
Comments
-
Here is the Ice coe I am using:
#include <Ice/Ice.h>
#include "Hello.h"
using namespace std;
and the function:
void cg_IceTest()
{
Ice::PropertiesPtr properties = communicator->getProperties();
const char* proxyProperty = "Hello.Proxy";
string proxy = properties->getProperty(proxyProperty);
if(proxy.empty())
{
cerr << argv[0] << ": property `" << proxyProperty << "' not set" << endl;
return EXIT_FAILURE;
}
Ice::ObjectPrx base = communicator->stringToProxy(proxy);
HelloPrx twoway = HelloPrx::checkedCast(base->ice_twoway()->ice_timeout(-1)->ice_secure(false));
if(!twoway)
{
cerr << argv[0] << ": invalid proxy" << endl;
return EXIT_FAILURE;
}
HelloPrx oneway = HelloPrx::uncheckedCast(twoway->ice_oneway());
HelloPrx batchOneway = HelloPrx::uncheckedCast(twoway->ice_batchOneway());
HelloPrx datagram = HelloPrx::uncheckedCast(twoway->ice_datagram());
HelloPrx batchDatagram = HelloPrx::uncheckedCast(twoway->ice_batchDatagram());
bool secure = false;
int timeout = -1;
twoway->sayHello();
catch(const Ice::Exception& ex)
{
cerr << ex << endl;
}
return EXIT_SUCCESS;
}
If I comment out the function and the includes then I get this error:
cg_buttons.c(10) : error C2061: syntax error : identifier 'namespace'
cg_buttons.c(10) : error C2059: syntax error : ';'
And I have established that the error is from the includes, because just commenting out the function and the namespace definition gives me the same errors.0
