Linking Errors while porting

Initially I had errors that said:

[color=red]2 undefined reference to PxConfigDeleteEntryCx' 2 undefined reference to PxConfigDeleteSectionCx’
2 undefined reference to PxConfigForceEmptySectionCx' 2 undefined reference to PxConfigGetCx’
2 undefined reference to PxConfigNextSectionCx' 2 undefined reference to PxConfigNextStringCx’
2 undefined reference to PxConfigReadBoolCx' 2 undefined reference to PxConfigReadIntCx’

Solved this by adding -lphexlib to the other linker options. Now I am faced with a new set of undefined errors:

[color=red]libphexlib.so: undefined reference to wctoutf8' libphexlib.so: undefined reference to PtTerminalDefaultCharsets’
libphexlib.so: undefined reference to PtSetResources' libphexlib.so: undefined reference to utf8towc’
libphexlib.so: undefined reference to PtSpawn' libphexlib.so: undefined reference to PtConnectionFindName’
libphexlib.so: undefined reference to PtConnectionSend' libphexlib.so: undefined reference to PiDuplicateImage’

Can anyone please help me? I tried deciphering this but…nothing.

Thanks

What version of QNX ?

A similar problem was discussed here:
http://www.openqnx.com/index.php?name=PNphpBB2&file=viewtopic&t=6215

As the gnu-linker is a one pass linker you need to add your libs in the right order.