Question About - Issue Number 12, March 2006

tolga.tunatolga.tuna Member Tolga TUNAOrganization: SAVRONIKProject: QT File Transfer
Hi I have been tryed to run Integration ice with a gui hello world application in the Issue Number 12 newslatter. Here is the issues: ZeroC - Newsletter Archive - Issue Index

Firstly, "initializeWithProperties(argc, argv, properties);" has been removed and i changed here is as:

Ice::InitializationData *datainitialize = new Ice::InitializationData();
Ice::PropertiesPtr properties = Ice::createProperties();
properties->load("config");
datainitialize->properties = properties;
communicator = Ice::initialize(argc,argv,*datainitialize);


When i run the code, gives no error but directly close. here is:

Starting C:\Users\ttuna\Desktop\Client-build-desktop-Qt_4_8_5__4_8_5__Release\release\client.exe...
The program has unexpectedly finished.
C:\Users\ttuna\Desktop\Client-build-desktop-Qt_4_8_5__4_8_5__Release\release\client.exe exited with code -1073741511



What is the matter? I copied the dll files also for run app.

Comments

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

    You don't need to allocate the initialization data on the heap.

    How do you set argc/argv? In your other post, it seems you set argc to 32 but provide an argv argument with only one string... If you don't need argc/argv (arguments passed to command line tools through the main() function), you should instead initialize your communicator with:
    Ice::InitializationData initData;
    initData.properties = Ice::createProperties();
    initData.properties->load("config");
    communicator = Ice::initialize(initData);
    

    Cheers,
    Benoit.
  • tolga.tunatolga.tuna Member Tolga TUNAOrganization: SAVRONIKProject: QT File Transfer
    benoit wrote: »
    Hi,

    You don't need to allocate the initialization data on the heap.

    How do you set argc/argv? In your other post, it seems you set argc to 32 but provide an argv argument with only one string... If you don't need argc/argv (arguments passed to command line tools through the main() function), you should instead initialize your communicator with:
    Ice::InitializationData initData;
    initData.properties = Ice::createProperties();
    initData.properties->load("config");
    communicator = Ice::initialize(initData);
    

    Cheers,
    Benoit.

    I initialize like that but still gives same error. I take this code from there: http://www.zeroc.com/newsletter/issue12/qt1.zip

    What is the matter i can't understand. How can it works? What i need to do?
  • benoitbenoit Rennes, FranceAdministrators, ZeroC Staff Benoit FoucherOrganization: ZeroC, Inc.Project: Ice ZeroC Staff
    It's difficult to say without more information. Can you get the stack trace of the crash with the debugger? Can you provide the link command used to link your program?

    One frequent cause for such errors on Windows is a C++ runtime library mismatch. If you are building your program with debug information (/MDd), you should ensure to link with the iced.lib library. If you are linking with with /MD you should link with the ice.lib library.

    Cheers,
    Benoit.
Sign In or Register to comment.