LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
LinkBack Search this Thread
Old 06-09-2010, 07:56 AM   #1
miamagoo
Member
 
Registered: Jun 2010
Posts: 32

Rep: Reputation: 15
Question Developing SW library of routines


Hello,

I need to create a software library with two copy file routines in it. This library will be used in a TCL script. I know how to write the routines, but I have never created a library before. How do I do this?

Thanks

Miamagoo
 
Old 06-09-2010, 09:23 AM   #2
JohnGraham
Member
 
Registered: Oct 2009
Posts: 467

Rep: Reputation: 138Reputation: 138
You have several options. For a large library, you might want to look up an autotools tutorial and go that way.

For a small library, a few entries of my blog cover this quite well (I think, anyway - if it's not, suggestions are always welcome!) starting with this post. [/blow-own-trumpet]

Last edited by JohnGraham; 06-09-2010 at 09:33 AM.
 
Old 06-09-2010, 10:05 AM   #3
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2013.07, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,186

Rep: Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367
Libraries :
http://tldp.org/HOWTO/Program-Librar...libraries.html
http://www-pnp.physics.ox.ac.uk/~wes...l/node119.html


May be I'm wrong, but I don't think, you can include a library
in a tcl script ?
I.e. a tcl script is to be run by an interpreter, e.g. wish.
......

Last edited by knudfl; 06-10-2010 at 03:16 AM.
 
Old 06-09-2010, 10:07 AM   #4
miamagoo
Member
 
Registered: Jun 2010
Posts: 32

Original Poster
Rep: Reputation: 15
Need for TCL

Your blog entry is great for C, but I need to do this in TCL
 
Old 06-09-2010, 02:59 PM   #5
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2013.07, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,186

Rep: Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367
Tcl script : text.

The definition of a library isn't really just plain text.

I think, you will have to provide some very accurate details,
then somebody may have a chance to help you.
..
 
Old 06-10-2010, 06:19 AM   #6
miamagoo
Member
 
Registered: Jun 2010
Posts: 32

Original Poster
Rep: Reputation: 15
Problem is, I don't know. I am regularly a java programmer but my boss (scientist) wants this "library" of routines in TCL. I will need to talk to him and find out more.

Thank you,

Lana
 
Old 06-11-2010, 01:32 AM   #7
paulsm4
Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
The TCL equivalent of a "library" is a "package".

You create it just as you would any other TCL script or procedure - you simply put code in a text file. Easy!

Here's more information:
http://www.tcl.tk/man/tcl/tutorial/Tcl31.html

'Hope that helps .. PSM
 
1 members found this post helpful.
  


Reply

Tags
tcl


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
IDE Routines ashlesha Linux - Software 0 08-09-2006 12:29 PM
gcc compile error with X11 library routines jrbrearley Programming 2 07-26-2006 01:50 PM
ARP routines.... shrishailnk Linux - Networking 2 04-29-2006 11:21 AM
error:25066067:DSO support routines :DLFCN_LOAD:could not load the shared library berserker-ky Linux - Wireless Networking 1 02-20-2006 10:20 PM
Can't active Library routines CRC32 in fedora 4 smashhead Linux - Wireless Networking 0 08-07-2005 12:20 AM


All times are GMT -5. The time now is 03:29 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration