Home Bug Reports

dynamic link error

Hi

I had the following link error:

firmq.obj : error LNK2019: unresolved external symbol "void __cdecl IceInternal::incRef(class IceProxy::MonkeyOnIce::Floor *)"

I have a client in directory a: "firm" and a server in directory b: "floor".

And in spite of the examples, I felt I did not want to include the floor.cpp file in both applications.

Instead I have a separate dll with the slice generated code which client en server both can link against.

But then the client could not link, becasue incRef (etc) is not exported by the dll - so I added __declspec (dllexport) - TO THE GENERATED CODE (bad idea).

Is not having the export a bug or a feature?

I just felt it is cleaner: instead of having links all over my directories (or have 1 directory), I just link to a dll.

Is there an opinion on this one?

Thanks in advance.

Dirk

Comments

  • marcmarc FloridaAdministrators, ZeroC Staff Marc LaukienOrganization: ZeroC, Inc.Project: The Internet Communications Engine ZeroC Staff
    You must run slice2cpp with the --dll-export SYMBOL option. Have a look at one of the various Ice DLLs included in the source distribution for an example.
  • diddekdiddek Member
    Sorry!!

    (I'll try and read manuals more carefull!)

    Thanks for the reply though.

    Dirk
Sign In or Register to comment.