shared library in xenomai ?
hi.
this is my problem :
i write a program which use raw socket and rteth0 NIC card to send data. when i build as application it run well. then i build this program as shared libarary named libctest.so support send() function to send data the command to build shared lib similar to :
gcc -shared -Wl,-soname,libctest.so.1 -o libctest.so.1.0 *.o
mv libctest.so.1.0 /opt/lib
ln -sf /opt/lib/libctest.so.1.0 /opt/lib/libctest.so
ln -sf /opt/lib/libctest.so.1.0 /opt/lib/libctest.so.1 i write a TEST program use the send() function which supported by my library.
the command to build TEST program similar to :
gcc <xenomai options> prog.c -lctest -o TEST
when i execute by command ./TEST
the TEST program still run. the send() function seem to be right but no data sent to network adapter
Luan Dinh
Did you try running ldd on your built library to make sure that the linking is finding all of the dependencies? Or please clarify what does not seem to be working for you...
hth
- Tom
Signature · 7 lines
Thomas Lockhart Supervisor, Distributed and Real-time Group Instrument Software and Science Data Systems Caltech/JPL
Quoted 8 lines · luan dinh
hi.
this is my problem :
i write a program which use raw socket and rteth0 NIC card to send data. when i build as application it run well. then i build this program as shared libarary named libctest.so supportsend()function to send data the command to build shared lib similar to :gcc -shared -Wl,-soname,libctest.so.1 -o libctest.so.1.0 *.o mv libctest.so.1.0 /opt/lib ln -sf /opt/lib/libctest.so.1.0 /opt/lib/libctest.so ln -sf /opt/lib/libctest.so.1.0 /opt/lib/libctest.so.1
Quoted 5 lines
i write a TEST program use the
send()function which supported by my library.
the command to build TEST program similar to :
gcc <xenomai options>prog.c-lctest -o TEST
when i execute by command ./TEST
the TEST program still run. thesend()function seem to be right but no data sent to network adapter
Please post an excerpt of your code exposing this issue (the library part, and the program part).
You should note that compiling libraries or programs for Xenomai usually involves compilation flags obtained with xeno-config.
You should also note that "send()" is a glibc function, so calling a function with the same name is a bad idea.
Signature · 1 line
Gilles.