Archived
This forum has been archived. Please start a new discussion on GitHub.
ICE and Protocol Buufer problem...
ENV:windowsXP + vs2008 + ICE2.4.2 + PB 2.4.1
I download the PB from google. and download the example from ZeroC - Protocol Buffers - Download.
I compiled PB, get libprotobuf.lib(Release), When i complie the example get a error:
1>libprotobuf.lib(coded_stream.obj) : fatal error LNK1103: debugging information corrupt; recompile module
Is there something i`m doing wrong?
If i change the linker config: set linker->Debugging->Generate Debug Info to "NO", the project can be compiled success,but when a run the server.exe and client.exe, when i type t to send a greeting message,there is runtime error at server side.
Thanks in advance.
I download the PB from google. and download the example from ZeroC - Protocol Buffers - Download.
I compiled PB, get libprotobuf.lib(Release), When i complie the example get a error:
1>libprotobuf.lib(coded_stream.obj) : fatal error LNK1103: debugging information corrupt; recompile module
Is there something i`m doing wrong?
If i change the linker config: set linker->Debugging->Generate Debug Info to "NO", the project can be compiled success,but when a run the server.exe and client.exe, when i type t to send a greeting message,there is runtime error at server side.
Thanks in advance.
0
Comments
-
last problem is sloved
The reason is i compiled pb library with vs2008 and compiled ice-pb-demo with vs2005.
I just complied the pb library with vs2005, the issue is solved, but there also has a runtime error:
server config:
...
Hello.Endpoints=tcp -h localhost -p 10000
Ice.Trace.Network=1
Ice.Trace.Protocol=1
...
client config:
...
Hello.Proxy=hello:tcp -h localhost -p 10000
Ice.Trace.Network=1
Ice.Trace.Protocol=1
...
server output:
G:\Study\IceProtobuf-0.2.1\IceProtobuf-0.2.1\demo\cpp>server.exe
-- 09/15/11 22:47:14.109 server.exe: Network: accepting tcp connections at 127.0
.0.1:10000
-- 09/15/11 22:47:14.109 server.exe: Network: published endpoints for object ada
pter `Hello':
tcp -h localhost -p 10000
-- 09/15/11 22:47:17.718 server.exe: Network: accepted tcp connection
local address = 127.0.0.1:10000
remote address = 127.0.0.1:3285
-- 09/15/11 22:47:17.734 server.exe: Protocol: sending validate connection
message type = 3 (validate connection)
compression status = 0 (not compressed; do not compress response, if any)
message size = 14
-- 09/15/11 22:47:17.750 server.exe: Protocol: received request
message type = 0 (request)
compression status = 0 (not compressed; do not compress response, if any)
message size = 56
request id = 1
identity = hello
facet =
operation = ice_isA
mode = 1 (nonmutating)
context =
-- 09/15/11 22:47:17.765 server.exe: Protocol: sending reply
message type = 2 (reply)
compression status = 0 (not compressed; do not compress response, if any)
message size = 26
request id = 1
reply status = 0 (ok)
-- 09/15/11 22:47:22.000 server.exe: Protocol: received request
message type = 0 (request)
compression status = 0 (not compressed; do not compress response, if any)
message size = 74
request id = 2
identity = hello
facet =
operation = sayHello
mode = 2 (idempotent)
context =
client output:
G:\Study\IceProtobuf-0.2.1\IceProtobuf-0.2.1\demo\cpp>client.exe
-- 09/15/11 22:47:17.718 client.exe: Network: tcp connection established
local address = 127.0.0.1:3285
remote address = 127.0.0.1:10000
-- 09/15/11 22:47:17.734 client.exe: Protocol: received validate connection
message type = 3 (validate connection)
compression status = 0 (not compressed; do not compress response, if any)
message size = 14
-- 09/15/11 22:47:17.750 client.exe: Protocol: sending request
message type = 0 (request)
compression status = 0 (not compressed; do not compress response, if any)
message size = 56
request id = 1
identity = hello
facet =
operation = ice_isA
mode = 1 (nonmutating)
context =
-- 09/15/11 22:47:17.765 client.exe: Protocol: received reply
message type = 2 (reply)
compression status = 0 (not compressed; do not compress response, if any)
message size = 26
request id = 1
reply status = 0 (ok)
usage:
t: send greeting
s: shutdown server
x: exit
?: help
==> t
-- 09/15/11 22:47:21.984 client.exe: Protocol: sending request
message type = 0 (request)
compression status = 0 (not compressed; do not compress response, if any)
message size = 74
request id = 2
identity = hello
facet =
operation = sayHello
mode = 2 (idempotent)
context =
-- 09/15/11 22:47:24.171 client.exe: Network: closing tcp connection
local address = 127.0.0.1:3285
remote address = 127.0.0.1:10000
Network.cpp:1387: Ice::ConnectionRefusedException:
connection refused: 远程系统拒绝网络连接。
==>
Look forward to you help, thanks in advance.0 -
Hi Lijun Zhou,
From the traces, it looks like your server crashed. It's hard to tell why.
Since you are using Ice 3.4.2, make sure you compile all your C++ code with Visual Studio 2008 (or with Visual Studio 2010). Ice 3.4.2 does not support Visual Studio 2005 at all.
Cheers,
Bernard0