Sockets, Threads, xHarbour and Linux
- xProgrammer
- Posts: 464
- Joined: Tue May 16, 2006 7:47 am
- Location: Australia
Sockets, Threads, xHarbour and Linux
Hi all
I wanted to do some socket programming and was glad to see that the INet....() functions appear to be implemented in the Linux version of xHarbour. I tried to start with the examples given under the INetServer() function in the xHarbour documentation but note that StartThread() and WaitForThreads() are either not implemented or are in some library that I'm not linking or whatever.
Can anyone tell me how to manage threads under Linux with xHarbour?
Thanks
xProgrammer
I wanted to do some socket programming and was glad to see that the INet....() functions appear to be implemented in the Linux version of xHarbour. I tried to start with the examples given under the INetServer() function in the xHarbour documentation but note that StartThread() and WaitForThreads() are either not implemented or are in some library that I'm not linking or whatever.
Can anyone tell me how to manage threads under Linux with xHarbour?
Thanks
xProgrammer
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Doug,
These are the examples provided with xharbour:
http://www.mediafire.com/?sharekey=395f ... c67cfa0fb8
These are the examples provided with xharbour:
http://www.mediafire.com/?sharekey=395f ... c67cfa0fb8
- xProgrammer
- Posts: 464
- Joined: Tue May 16, 2006 7:47 am
- Location: Australia
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Doug,
First of all you need to create a checkout.sh file with these contents:
checkout.sh
Give it execution permissions: chmod +x ./checkout.sh
Then simply do: ./checkout.sh
xHarbour will start downloading to your computer, in the same folder where checkout.sh is
You may need to install CVS: sudo apt-get install cvs
First of all you need to create a checkout.sh file with these contents:
checkout.sh
Code: Select all
cvs -d:pserver:anonymous@xharbour.cvs.sourceforge.net:/cvsroot/xharbour login
cvs -z3 -d:pserver:anonymous@xharbour.cvs.sourceforge.net:/cvsroot/xharbour co -P xharbour
Then simply do: ./checkout.sh
xHarbour will start downloading to your computer, in the same folder where checkout.sh is
You may need to install CVS: sudo apt-get install cvs
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Doug,
Once you have done the checkout, go to the created folder xharbour and change permissions of make_gnu.sh:
chmod +x ./make_gnu.sh
then simply do:
./make_gnu.sh
BTW, you need to have bison installed:
sudo apt-get install bison
Once you have done the checkout, go to the created folder xharbour and change permissions of make_gnu.sh:
chmod +x ./make_gnu.sh
then simply do:
./make_gnu.sh
BTW, you need to have bison installed:
sudo apt-get install bison
Last edited by Antonio Linares on Wed Aug 06, 2008 12:53 pm, edited 1 time in total.
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Doug,
In the meantime, here you have again the thread examples, this time using rapidshare:
http://rapidshare.com/files/135266411/examples.zip.html
In the meantime, here you have again the thread examples, this time using rapidshare:
http://rapidshare.com/files/135266411/examples.zip.html
- xProgrammer
- Posts: 464
- Joined: Tue May 16, 2006 7:47 am
- Location: Australia
Didn't quite work
Hi Antonio
installed cvs
installed bison
created checkout.sh
it seemed to run fine
ran make_gnu.sh
Lots happened but got a series of errors with messge:
Any suggestions?
Regards
Doug
installed cvs
installed bison
created checkout.sh
it seemed to run fine
ran make_gnu.sh
Lots happened but got a series of errors with messge:
Code: Select all
/usr/bin/ld: cannot find -lrtl
collect2: ld returned 1 exit status
Regards
Doug
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
- xProgrammer
- Posts: 464
- Joined: Tue May 16, 2006 7:47 am
- Location: Australia
- xProgrammer
- Posts: 464
- Joined: Tue May 16, 2006 7:47 am
- Location: Australia
Hi Antonio
This is from one of your early posts on this forum
Is that it?
This is from one of your early posts on this forum
Code: Select all
sudo apt-get install unixODBC-dev
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
- xProgrammer
- Posts: 464
- Joined: Tue May 16, 2006 7:47 am
- Location: Australia
Some Progress
Hi Antonio
I made some progress.
Installed unicODBC-dev. That automatically installed unixodbc also (amongst other things)
Reran make_gnu.sh but it falls over when in xharbour/source/rtl/linux/gcc and it tries to compile (gcc) strmatch.c with the following output:
So something is still not quite right
Thanks
Doug
(xProgrammer)
I made some progress.
Installed unicODBC-dev. That automatically installed unixodbc also (amongst other things)
Reran make_gnu.sh but it falls over when in xharbour/source/rtl/linux/gcc and it tries to compile (gcc) strmatch.c with the following output:
Code: Select all
In file included from ../../strmatch.c:55:
../../../../include/hbapi.h:330: Warning: type qualifier ignored on function return type
../../strmatch.c: In function 'hb_strMatchFile':
../../strmatch.c:354 warning: implicit declaration of function 'fnmatch'
../../strmatch.c:354 error 'FNM_PERIOD' undeclared (first use in this function)
../../strmatch.c:354 error 'FNM_PATHNAME' undeclared (first use in this function)
make[3] *** [strmatch.o] Error 1
Thanks
Doug
(xProgrammer)
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
- xProgrammer
- Posts: 464
- Joined: Tue May 16, 2006 7:47 am
- Location: Australia
Only possibly slight progress
Hi Antonio
downloaded fnmatch.h but didn't fix problem.
added #include "fnmatch.h" to strmatch.c
mak_gnu.sh falls over having entered utils/hbrun.
Regards
Doug
downloaded fnmatch.h but didn't fix problem.
added #include "fnmatch.h" to strmatch.c
mak_gnu.sh falls over having entered utils/hbrun.
Regards
Doug