Project Home
Project Home
Trackers
Trackers
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - problem with .so files in IDE for windows: (10 Items)
   
problem with .so files in IDE for windows  
Hello,

I'm starting with QNX and IDE.

I'd like to know how to add "extra object files" when I use IDE for windows and the .so files are in QNX target.

Thank you.
Re: problem with .so files in IDE for windows  
Do you have the Momentics development suite installed?

If the .so file is from the QNX Neutrino system library (like libc.so), it is in your "%QNX_TARGET%" folder in your 
Windows development machine.

If the .so file is your own built library, you need to transfer it to your Windows machine in order to link with it. A 
good utility is the "QNX Target File System Navigator" which allows copying files between your Neutrino target machine 
and  your Windows development machine.
Re: problem with .so files in IDE for windows  
Thank you for your reply.

.so file is my own built library. If I do it like you say, the building is ok, but when I run the program I get the 
console message: 

"Could not find library C:/QNX630/workspace/lib/libconfig/so/libconfig.so"

What am I doing wrong?
Re: problem with .so files in IDE for windows  
Just add this libraries into your launch configuration to upload them to 
the target during the session.

Victor Martín wrote:
> Thank you for your reply.
>
> .so file is my own built library. If I do it like you say, the building is
ok, but when I run the program I get the console message: 
>
> "Could not find library C:/QNX630/workspace/lib/libconfig/so/libconfig.so"
>
> What am I doing wrong?
>
> _______________________________________________
> General
> http://community.qnx.com/sf/go/post8678
>
>   

Re: problem with .so files in IDE for windows  
You can put your library in the directory where program would run, by 
default if you launch from IDE it would be /tmp.
It should find it automatically. It is really suspicious that you 
library name has full windows path, loader would not be able to find 
this with this path. Can you open you binary in binary editor and check 
what is written in section NEEDED? Should be like   NEEDED      
libconfig.so.1
If it is the case rename you file on the target to libconfig.so.1.

If you actually developing your library you can ask IDE to upload it 
automatically every time you run the application, you can use Download 
tab of launch configuration for that.

Victor Martín wrote:
> Thank you for your reply.
>
> .so file is my own built library. If I do it like you say, the building is
ok, but when I run the program I get the console message: 
>
> "Could not find library C:/QNX630/workspace/lib/libconfig/so/libconfig.so"
>
> What am I doing wrong?
>
> _______________________________________________
> General
> http://community.qnx.com/sf/go/post8678
>
>   
Re: problem with .so files in IDE for windows  
The library is in  /tmp directory in target, but I still have the error message.

I don't know how to open my binary in binary editor.

Maybe I'm adding extra object files wrong. 
Re: problem with .so files in IDE for windows  
BTW, if you are using QNX project, to add .so to your project you are 
not supposed to use Extra Objects feature. Use this option for extra .o 
files only. If you want to add  extra .a or .so, use Extra Libraries option.

Victor Martín wrote:
> The library is in  /tmp directory in target, but I still have the error
message.
>
> I don't know how to open my binary in binary editor.
>
> Maybe I'm adding extra object files wrong. 
>
> _______________________________________________
> General
> http://community.qnx.com/sf/go/post8688
>
>   

Re: problem with .so files in IDE for windows  
If I use "extra library path" option for adding my library,  I get 8 "undefined reference" errors. 

If I use "extra object files" there's no build errors.

Re: problem with .so files in IDE for windows  
You should  use Extra Libraries insead of Extra Objects. The IDE 
automatically provides Library Path if you use libraries from target or 
from project in your workspace (if no, you should add these pathhs 
manualy)..

Victor Martín wrote:
> If I use "extra library path" option for adding my library,  I get 8
"undefined reference" errors. 
>
> If I use "extra object files" there's no build errors.
>
>
>
> _______________________________________________
> General
> http://community.qnx.com/sf/go/post8697
>
>   

Re: problem with .so files in IDE for windows  
Double click on binary to open in editor. If it does not show meaningful 
data right click select Open With... and select Default Binary Editor.
I still think problem is library should have .so.1 extension on target.

Victor Martín wrote:
> The library is in  /tmp directory in target, but I still have the error
message.
>
> I don't know how to open my binary in binary editor.
>
> Maybe I'm adding extra object files wrong. 
>
> _______________________________________________
> General
> http://community.qnx.com/sf/go/post8688
>
>