Home Help Center

how to pack a server to a dll

simpleysimpley Member ✭✭
In our environment, we need to pack the server(encapsulated into a class) to .dll, and start the server with a member function of this class--such as start(). But when we debug our program, we find that it can't run over the function--adapter->add(con, Ice::stringToIdentity("conn"))(this function is called in start()) and become dead. additional, the class con is packed in the same dll with the class of server.

so I wonder to know, how to pack a server within one class into dll?

Thanks.

Comments

  • benoitbenoit Rennes, FranceAdministrators, ZeroC Staff Benoit FoucherOrganization: ZeroC, Inc.Project: Ice ZeroC Staff
    Hi,

    I'm not sure why it doesn't work for you. You need to investigate this a little more and provide more information such as the stack trace of your program when it dies, which compiler you're using, which compilation and linker options, etc.

    Also, make sure that your DLL and Ice are compiled with the same runtime library. If you're linking with ice.lib, you should compile your DLL with /MD (release multi-threaded), if you are linking with iced.lib you should compile your DLL with /MDd (debug multi-threaded).

    Hope this helps!

    Benoit.
  • simpleysimpley Member ✭✭
    Hi, benoit
    Thank you for your reply.

    I'm using the compile of vc6.0. When the program run add(con, Ice::stringToIdentity("conn"))(this function is called in start()) , there is no respond, and the stack report "Call stack unavailable while child is running". The following with the compliation and linker options.

    Compliation:
    /nologo /MDd /W3 /Gm /GR /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "BBB_EXPORTS" /D "_UNICODE" /Fp"Debug/bbb.pch" /YX/Fo"Debug" /Fd /GZ /c

    Linker:
    kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib iced.lib iceutiled.lib /nologo /dll/incremental:yes /pdb:"Debug/GDAE_IceServer.pdb" /debug /machine:I386 /out:"Debug/GDAE_IceServer.dll" /implib:"Debug/GDAE_IceServer.lib" /pdbtype:sept /libpath:"F:\ice.1.5\lib" /libpath:"F:\gdae&stl\stlport-lib&dll"

    Also, my DLL and ICE are both compiled by debug multi-thread DLL.

    Thanks.
  • simpleysimpley Member ✭✭
    actually, while debug. the programe stops on this code: " Ice::stringToIdentity("conn") " without any response
  • benoitbenoit Rennes, FranceAdministrators, ZeroC Staff Benoit FoucherOrganization: ZeroC, Inc.Project: Ice ZeroC Staff
    I can't think of any reasons why this would hang :(. Did you try to "break" the execution when your program hangs in this function to see the stack trace? I suspect a problem with your build environment. Please make sure that you're using the latest VC++ service pack and that the Ice test suite works. You can also send me a small self-compiled example demonstrating the problem, I'll take a look and see if I can reproduce it.

    Thanks,

    Benoit.
Sign In or Register to comment.