Re: [fpc-pascal] represent data string in hex?

2013-09-21 Thread patspiper
On 21/09/13 12:15, wkitt...@windstream.net wrote: On Friday, September 20, 2013 12:47 PM, Bart bartjun...@gmail.com wrote: On 9/20/13, wkitt...@windstream.net wkitt...@windstream.net wrote: a[n] := #255; // works a[n] := $ff; // does not work ideally, there would be multiple bytes...

[fpc-pascal] bridging an C++ shared library statically

2013-09-21 Thread Xiangrong Fang
Hi All, I need to use a C++ so file in FreePascal. I have written a C wrapper for it, which successfully connected to Pascal. Now my question is, can I use the $linklib directive to link the C-Wrapper STATICALLY, which in-turn use the shared so file? I tried to do this but it complained a

Re: [fpc-pascal] bridging an C++ shared library statically

2013-09-21 Thread Michael Van Canneyt
On Sat, 21 Sep 2013, Xiangrong Fang wrote: Hi All, I need to use a C++ so file in FreePascal.   I have written a C wrapper for it, which successfully connected to Pascal. Now my question is, can I use the $linklib directive to link the C-Wrapper STATICALLY, which in-turn use the shared so

Re: [fpc-pascal] bridging an C++ shared library statically

2013-09-21 Thread Xiangrong Fang
Ok, but when I added these: implementation {$linklib libthostintf.a} {$linklib thostmduserapi.so} end. I got: /usr/bin/ld: cannot find -lthostmduserapi All the required .so and .a file are in CURRENT dir. 2013/9/21 Michael Van Canneyt mich...@freepascal.org On Sat, 21 Sep 2013,

Re: [fpc-pascal] bridging an C++ shared library statically

2013-09-21 Thread Michael Van Canneyt
On Sat, 21 Sep 2013, Xiangrong Fang wrote: Ok, but when I added these: implementation {$linklib libthostintf.a} {$linklib thostmduserapi.so} end. I got: /usr/bin/ld: cannot find -lthostmduserapi All the required .so and .a file are in CURRENT dir. 1) Did you give the correct name ? 2)

Re: [fpc-pascal] represent data string in hex?

2013-09-21 Thread wkitty42
On Saturday, September 21, 2013 6:27 AM, patspiper patspi...@gmail.com wrote: On 21/09/13 12:15, wkitt...@windstream.net wrote: [trim] yeah, the singles are bad examples... i'm really wanting the multiple byte format to work... i tried both and was told expected string but found byte

Re: [fpc-pascal] represent data string in hex?

2013-09-21 Thread patspiper
On 21/09/13 18:56, wkitt...@windstream.net wrote: On Saturday, September 21, 2013 6:27 AM, patspiper patspi...@gmail.com wrote: On 21/09/13 12:15, wkitt...@windstream.net wrote: [trim] yeah, the singles are bad examples... i'm really wanting the multiple byte format to work... i tried both

Re: [fpc-pascal] represent data string in hex?

2013-09-21 Thread wkitty42
On Saturday, September 21, 2013 12:03 PM, patspiper patspi...@gmail.com wrote: On 21/09/13 18:56, wkitt...@windstream.net wrote: On Saturday, September 21, 2013 6:27 AM, patspiper patspi...@gmail.com wrote: On 21/09/13 12:15, wkitt...@windstream.net wrote: ... a[n] :=

Re: [fpc-pascal] bridging an C++ shared library statically

2013-09-21 Thread Xiangrong Fang
1) Did you give the correct name ? 2) Is the current dir in the linker search path ? AFAIK the current dir is by default not in the linker search path. I am sure the name is correct. No matter I supply the linker path (-Fl.) or not, it does not work (i.e. ld reported cannot find

[fpc-pascal] Bug in $linklib?

2013-09-21 Thread Xiangrong Fang
Hi All, I use $linklib to link my fpc program with a C++ so file. I found that the $linklib directive does NOT conform with ld specification. This is what I did and found: PURPOSE I want to link to a C library that does NOT start with lib prefix. The library's name is thostmduserapi.so