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 2021 - online Python 3 training - see ((here)).

Our plans were to retire in summer 2020 and see the world, but Coronavirus has lead us into a lot of lockdown programming in Python 3 and PHP 7.
We can now offer tailored online training - small groups, real tutors - works really well for groups of 4 to 14 delegates. Anywhere in the world; course language English.

Please ask about private 'maintenance' training for Python 2, Tcl, Perl, PHP, Lua, etc.
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., 2022: 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