ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> cpp-sig
cpp-sig
[C++-sig] problem wrapping a c++ function on windows
by Alexandre Gillet other posts by this author
Feb 26 2003 2:36AM messages near this date
Re: [C++-sig] Virtual Methods + default arguments | Re: [C++-sig] problem wrapping a c++ function on windows
Hi,

I am trying to wrappe a library using swig on windows(windows 
2000,swig1.3.11). I am able to build a dll but when I load my module 
videolib,I get the following error:
the dynamic link library libARvideo.dll could not be found

But I did get link  with the library libARvideo.lib

Here is my interface file videolib.i and the command I used to build my 
python module:

%{

int       arVideoOpen( char *config );
%}
int        arVideoOpen( char *config );

##########################################

Here is the swig command I used:
H:\Swig\SWIG-1.3.11\swig.exe -python -dump_tree -shadow -c++ -no_default
  -DSWIG_RELEASE=1.3.11 -DSWIG_TYPE=python -IH:\Python\Python2.1\include 
-IH:\Python\Python2.1\PC -IH:\Python\Python2.1\Include -I..\..\include 
-D_WIN32 -IH:\Swig\SWIG-1.3.11\Lib -IH:\Swig\SWIG-1.3.11\Lib\python 
-module videolib -o videolib.swigout videolib.i >  videolib.swigtree

H:\Python\Python2.1\libplus\bin\pybatch.bat "H:\Python\Python2.1\libplus
;H:\ARToolKit\ARToolKit-DS-2.65b;H:\ARToolKit\ARToolKit-DS-2.65b\python/videopython" 
H:\Python\Python2.1\python21.exe -c "import tool; tool.run()" filter  -i 
videolib.swigout -o videolib.precious.c

H:\ARToolKit\ARToolKit-DS-2.65b\python\videopython> H:\Python\Python2.1\python21.
exe -c "import tool; tool.run()" filter -i videolib.swigout -o 
videolib.precious

Command use to compile:
         CL.EXE -c -nologo -W3 -Gy -Ox -GD -MD  -DSWIG_RELEASE=1.3.11 
-DSWIG_TYPE=python -IH:\Python\Python2.1\include 
-IH:\Python\Python2.1\PC -IH:\Python\Pythn2.1\Include -I..\..\include 
-F -o videolib.obj videolib.precious.c

Link:
link -debug -nologo -warn:3 -map -dll -export:initvideolibc 
-out:videolbc.dll videolib.obj -LIBPATH:..\..\lib libARvideo.lib 
-LIBPATH:H:\Python\Python2.1\libs python21.lib


Any idea what I am doing wrong?
In the Library the function I need to access is define in the .h file by:

int __declspec(ddlexport) arVideoOpen( char *config );


Thanks
-- 
   o Alexandre Gillet               email: gillet@[...].edu
  /  The Scripps Research Institute,
o   Dept. Molecular Biology,  MB-5,
  \  10550  North Torrey Pines Road,
   o La Jolla,  CA 92037-1000,  USA.
  /  tel: (858) 784-2053
o   fax: (858) 784-2860





_______________________________________________
C++-sig mailing list
C++-sig@[...].org
http://mail.python.org/mailman/listinfo/c++-sig
Thread:
Alexandre Gillet
Nicodemus

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved