c++ - What is the right way to link to a DLL which was linked to a static library and other shared libraries? -



c++ - What is the right way to link to a DLL which was linked to a static library and other shared libraries? -

greetings, hope has patience read this. have setup @ hand, confusing me. have c source code directory generated eiffel compiler. want utilize output java, need dll jni, in i'll implement jni functions. when compile c code, gives me static library, has dependencies other libraries. setup is:

mydll.dll (c++) [depends on --> staticlib.lib [depends on --> (sharedlib1, sharedlib2...)

my c++ project compiled eclipse cdt, , end 1 dll. can utilize dll java without problems needs 1 other dll in path during execution. code static library compiled dll, , java jni calls dll in turn uses code.

i wanted utilize same dll c++ project. however, when link dll, linker complains not finding particular symbol. symbol declared in static library extern, must somewhere in 1 of dependencies of static library.

the way link , compile dll c++ project linking static library, included in dll in first place. end .exe, containing static library twice: 1 in dll, other within exe.

since java code uses dll, know static library compiled dll, can't avoid including twice in c++ app. i'm nervous including same library twice. how things handled during runtime? can bite me in unexpected way?

your recommendations manage setup much appreciated.

best regards

seref

if 'second' dll cannot linked because of symbol declared in static library, seems either sec dll shouldn't see symbol (why it), or depends on static library.

it seems latter unwanted, should seek find out through path linker finds unwanted symbol. through header file compiler sees when including yourdll's headers...

c++ static linker shared

Comments

Popular posts from this blog

java - How to set log4j.defaultInitOverride property to false in jboss server 6 -

c - GStreamer 1.0 1.4.5 RTSP Example Server sends 503 Service unavailable -

Using ajax with sonata admin list view pagination -