Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Solved] ohNet libs on Debian | Final Link Problem (referenced by DSO)
27-12-2014, 08:43 PM (This post was last modified: 28-12-2014 11:08 PM by ChriD.)
Post: #1
[Solved] ohNet libs on Debian | Final Link Problem (referenced by DSO)
Hi,

Im able to build ohNet on Debian wheezy. But if i want to build some application which uses the ohNet libs the linker gives me following error:

Code:
hidden symbol '_ZNK8OpenHome14NetworkAdapter7AddressEv' in usr/lib/libohNetCore.a(OhNet.o) is referenced by DSO
/usr/bin/ld: final link failed: Bad value

the same thing happens if i use the prebuilt binaries from the homepage.

Im new to linux and im not sure if the problem depends on me or on wrong build of the ohNet libs?

The windows build of my application is ok. There are no errors and the application works.

Does someone have information about this?

Any help would be nice. Thanks! Shy
Find all posts by this user
28-12-2014, 10:11 PM (This post was last modified: 28-12-2014 11:08 PM by ChriD.)
Post: #2
RE: ohNet libs on Debian | Final Link Problem (referenced by DSO)
Okay first linker problem could be solved by not using
Code:
(*subnetList)[subnetListIdx]->Address();
That means if i want to resolve the Address for the network Adapter the Linker doesnt like this.

Ok, i dont really need the ipAddress so i go on and there is the next linker error Dodgy

Code:
hidden symbol '_ZNK8OpenHome3Net11CPDeviceCpp12GetAttributeEPKcRSs in usr/lib/libohNetCore.a(CPDeviceStd.o) is referenced by DSO
/usr/bin/ld: final link failed: Bad value

It seems that all methods i want to call from the ohNet libs are hidden?
Or may this error come from a wrong order linking the libs?

EDIT:
It may be becuase i create and build a shared lib with references to the ohNet libs (no build errors) and then i use this new built lib in an application... It seems I'm doing something wrong...

Ok.. I think ive solved it.

i built my shared lib without including the static ohNetLibs (I've no idea why gcc let me build this lib without any linker errors)
i i link theses lib files to my shared lib, i can use my shared lib in my application
Find all posts by this user


Forum Jump: