|
|
|
|||||
|
Some strange errors from MSVC.net
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. |
|
|||||
|
What Im confused about is that the file, without the Ice code, compiles fine. The demo compiles fine. But when I put the demo code into the other app then it doesnt work. I included Ice/Ice.h and Hello.h and set the libs to Ice.lib and IceUtil.lib... Is there something I am overlooking?
|
|
|||||
|
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. Last edited by aerowyn : 11-02-2004 at 04:00 PM. |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Strange SEGV ... | joel vennin | Help Center | 3 | 08-02-2006 05:10 AM |
| Ice 2.1 and MSVC++ 7.0 | Nis Baggesen | Help Center | 3 | 03-10-2005 10:13 AM |
| how to use ICE in msvc? | W.noon | Help Center | 2 | 11-04-2004 09:28 AM |
| Help! I cannot build Freeze successfully in MSVC 6.0 under windows 2003 | paulling | Help Center | 4 | 02-27-2004 05:48 PM |
| Strange Behaviour | galbe | Help Center | 5 | 10-19-2003 11:45 PM |