|
|
|
|||||
|
Problem when use ice 2.1 and ace on vc6.0! help!
My program use ICE and ACE(Adaptive Communication Environment) in some place. when I built it in vc6.0,i get the errors below:
C:\Ice-2.1.0-VC60\include\Ice/Application.h(33) : error C2487: 'ace_os_main_i' : member of dll interface class may not be declared with dll interface C:\Ice-2.1.0-VC60\include\Ice/Application.h(33) : error C2838: illegal qualified name in member declaration C:\Ice-2.1.0-VC60\include\Ice/Application.h(33) : error C2059: syntax error : 'return' C:\Ice-2.1.0-VC60\include\Ice/Application.h(33) : error C2238: unexpected token(s) preceding ';' C:\Ice-2.1.0-VC60\include\Ice/Application.h(33) : error C2628: 'Application' followed by 'int' is illegal (did you forget a ';'?) C:\Ice-2.1.0-VC60\include\Ice/Application.h(33) : error C2065: 'ACE_Main' : undeclared identifier C:\Ice-2.1.0-VC60\include\Ice/Application.h(33) : error C2146: syntax error : missing ';' before identifier 'm' C:\Ice-2.1.0-VC60\include\Ice/Application.h(33) : error C2065: 'm' : undeclared identifier C:\Ice-2.1.0-VC60\include\Ice/Application.h(33) : error C2065: 'ace_os_main_i' : undeclared identifier C:\Ice-2.1.0-VC60\include\Ice/Application.h(34) : error C2575: 'run' : only member functions and bases can be virtual C:\Ice-2.1.0-VC60\include\Ice/Application.h(34) : error C2072: 'run' : initialization of a function C:\Ice-2.1.0-VC60\include\Ice/Application.h(90) : error C2143: syntax error : missing ';' before '}' C:\Ice-2.1.0-VC60\include\Ice/Application.h(90) : error C2143: syntax error : missing ';' before '}' C:\Ice-2.1.0-VC60\include\Ice/Application.h(90) : error C2143: syntax error : missing ';' before '}' C:\Ice-2.1.0-VC60\include\Ice/Connection.h(40) : error C2143: syntax error : missing ';' before '{' C:\Ice-2.1.0-VC60\include\Ice/Connection.h(40) : error C2447: missing function header (old-style formal list?) what is the problem?? I think maybe ICE use stlport 4.6 and ACE use the vc6.0 stl , so they confict. what should i do? use vc7.1?? |
|
||||||
|
the ace main problem
within the ace headers (i think it is ace.h)
the symbole main is redefined to ace_os_main_i advise to ge around it: change the order of includes - let ace.h be the last this is extraced from my mind - i no longer have ace sources available to check. hope this helps, tom PS: an you should really make sure there is only one stl implementation in use! two different versions blow your code and can cause troubles. Last edited by DeepDiver : 03-17-2005 at 10:59 AM. |
|
||||||
|
See this thread as well:
Application.h compiler error on int main(int, char*[], const char* = 0); Cheers, Bernard |
|
||||||
|
This code wouldn't be a problem, as nobody is forced to use ACE_MAIN (it's still not "nice", but this is then more a matter of style). However, I had the impression that ACE actually #defines "main" as "ace_os_main_i".
|
|
||||||
|
Marc,
there is more code within this header, which finally causes the described troubles. i just wanted to show you the piece of code. regards, tom |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|