Training, Open Source computer languages
PerlPHPPythonMySQLApache / TomcatTclRubyJavaC and C++LinuxCSS 
Search for:
Home Accessibility Courses Diary The Mouth Forum Resources Site Map About Us Contact
 
For 2023 (and 2024 ...) - we are now fully retired from IT training.
We have made many, many friends over 25 years of teaching about Python, Tcl, Perl, PHP, Lua, Java, C and C++ - and MySQL, Linux and Solaris/SunOS too. Our training notes are now very much out of date, but due to upward compatability most of our examples remain operational and even relevant ad you are welcome to make us if them "as seen" and at your own risk.

Lisa and I (Graham) now live in what was our training centre in Melksham - happy to meet with former delegates here - but do check ahead before coming round. We are far from inactive - rather, enjoying the times that we are retired but still healthy enough in mind and body to be active!

I am also active in many other area and still look after a lot of web sites - you can find an index ((here))
freewrap and swig???

Posted by lanjun (lanjun), 10 August 2006
hello.
i begin to use freewrap two days ago. but i fall across some  trouble with it. can you help me? please....thanks!
my question is:
i write a ipcheck function by ANSI C language and put it into a ipcheck.c file. then i use proc of tcl to write a tcl file which is named ipcheck.tcl. most of important, i use swig tool to connect ipcheck.c and ipcheck.tcl. as a result, i don't know how to use freewrap to wrapp the ipcheck.tcl? if i use the flowing word:
freewrap ipcheck.tcl -w freewrap.exe
the result :can't load ipcheck.so file.....
why??
how to wrapp it??
help me,please. thanks!
the all program is :

1)ipcheck.c file:
#include <sdio.h>
int   IsIP(char   *ip)  
{
 /*ipcheck fuction */
.....
}

2) ipcheck.i file:

%module ipcheck
%{
extern int IsIP (char *ip);
%}

extern int IsIP (char *ip);

3) use check.c file and check.i file to build a check.so file by swig tool.
4) ipcheck.tcl file which loads ipcheck.so file.

#!/usr/bin/wish

#---procedure:from ipcheck.c----#
proc ip {} {
puts "begin"
load ./ipcheck.so ipcheck
set a [IsIP [.e get]]

if { $a == 0 } {
 label .l -text "It is a illogical IP!" -background red
 pack .l -padx 110 -pady 10
 
} else  {
 
  label .la -text "It is a logical IP!" -background green
  pack .la -padx 110 -pady 10
}
puts $a

puts "end"
}



ok. that's all.
i'm looking forward your wonderful answer or suggestion.

Posted by admin (Graham Ellis), 10 August 2006
Loooks like your library path may be wrong, or libraries may be missing - I would start checking there.  

I'm not familiar with freewrap, and I suspect that none of the other regulars here is familiar with it either.   You might well do better looking at the FAQ for the product / posting to product specific boards or even emailing the contacts there;   the best I can offer is general suggestions like the one above.



This page is a thread posted to the opentalk forum at www.opentalk.org.uk and archived here for reference. To jump to the archive index please follow this link.

You can Add a comment or ranking to this page

© WELL HOUSE CONSULTANTS LTD., 2024: Well House Manor • 48 Spa Road • Melksham, Wiltshire • United Kingdom • SN12 7NY
PH: 01144 1225 708225 • FAX: 01144 1225 793803 • EMAIL: info@wellho.net • WEB: http://www.wellho.net • SKYPE: wellho