I am having a problem compiling a simple winelib program which relies on
a dll which uses the stdcall calling convention.  I used pexports on the 
dll avisynth_c.dll to created the spec and then edited the file to removed 
the leading underscore in the names (without that it would not link).  
That file is attached.  Than with only "avisynth_c.h", "avs2yuv.cpp" and 
"libavisynth_c.def" in the current directory. I ran 
  winemaker --console -iavisynth_c --single-target avs2yuv.exe .
  ./configure --with-wine=/opt/wine/
  make
then I copy the required DLL in the current directory and attempt to run 
it.  But I get:

./avs2yuv
err:module:import_dll No implementation for 
avisynth_c.dll.avs_create_script_environment imported from 
L"C:\\WINDOWS\\SYSTEM\\avs2yuv.exe", setting to 0xdeadbeef
err:module:import_dll No implementation for avisynth_c.dll.avs_get_frame 
imported from L"C:\\WINDOWS\\SYSTEM\\avs2yuv.exe", setting to 0xdeadbeef
err:module:import_dll No implementation for 
avisynth_c.dll.avs_get_video_info imported from 
L"C:\\WINDOWS\\SYSTEM\\avs2yuv.exe", setting to 0xdeadbeef
err:module:import_dll No implementation for avisynth_c.dll.avs_invoke 
imported from L"C:\\WINDOWS\\SYSTEM\\avs2yuv.exe", setting to 0xdeadbeef
err:module:import_dll No implementation for 
avisynth_c.dll.avs_release_value imported from 
L"C:\\WINDOWS\\SYSTEM\\avs2yuv.exe", setting to 0xdeadbeef
err:module:import_dll No implementation for 
avisynth_c.dll.avs_release_video_frame imported from 
L"C:\\WINDOWS\\SYSTEM\\avs2yuv.exe", setting to 0xdeadbeef
err:module:import_dll No implementation for avisynth_c.dll.avs_take_clip 
imported from L"C:\\WINDOWS\\SYSTEM\\avs2yuv.exe", setting to 0xdeadbeef
Usage avs2yuv4mpeg <avsfile> <outfile>

Does anyone know what is going on.  Here is the output of make if it will 
help:

sed -e 's,@bindir\@,/usr/local/bin,g' -e 's,@winelibdir\@,.,g' 
./wineapploader.in >wineapploader || rm -f wineapploader
LD_LIBRARY_PATH="/opt/wine//lib:$LD_LIBRARY_PATH" /opt/wine//bin/winebuild 
-o avs2yuv.exe.dbg.c --debug -C.  avs2yuv.cpp
gcc -c  -I.  -I/opt/wine//include/wine/windows -g -O2 -fPIC    
-D_REENTRANT -o avs2yuv.exe.dbg.o avs2yuv.exe.dbg.c
g++ -c  -I.  -I/opt/wine//include/wine/windows -g -O2 -fpermissive 
-fno-for-scope    -D_REENTRANT -o avs2yuv.o avs2yuv.cpp
LD_LIBRARY_PATH="/opt/wine//lib:$LD_LIBRARY_PATH" /opt/wine//bin/winebuild 
-fPIC -o avs2yuv.exe.spec.c --exe avs2yuv.exe -mcui    avs2yuv.o   
-L/opt/wine//lib/wine   -lavisynth_c
gcc -c  -I.  -I/opt/wine//include/wine/windows -g -O2 -fPIC    
-D_REENTRANT -o avs2yuv.exe.spec.o avs2yuv.exe.spec.c
g++ -shared -Wl,-Bsymbolic -o avs2yuv.exe.so  avs2yuv.o  avs2yuv.exe.dbg.o 
avs2yuv.exe.spec.o    -L/opt/wine//lib    -lwine -lwine_unicode 
-lwine_uuid -lm
test -f avs2yuv || install ./wineapploader avs2yuv

I attached the zip file with the source and any files I thought were 
relevant.  If required I can send additional files dll's in a private 
email (such as the required dll's).

Wine version 20031212 built from source on a RedHat System.  I had the 
exact same problem when I used the debs from unstable (also 
version 20031212) on a libranet system.

Is this a bug, or am I doing something wrong?

When I used a a version of avisynth_c.dll which used cdecl on all API
functions -- without changing the .def or header files -- instead of
stdlib I do not have this problem.  Naturally I do not expect it to run
since I didn't recompile my code with the proper header files.  I discovered
this by accident because the previous version used cdecl and I had some
old dll laying around in a place wine was able to find.

Can anyone help me get this working?  Am I doing something wrong or is 
this a bug in wine?

Thanks in advance.
---
http://kevin.atkinson.dhs.org
LIBRARY avisynth_c.dll



EXPORTS

  [EMAIL PROTECTED]     @1

  [EMAIL PROTECTED]     @2

  [EMAIL PROTECTED]             @3

  [EMAIL PROTECTED]             @4

  [EMAIL PROTECTED]     @5

  [EMAIL PROTECTED]     @6

  [EMAIL PROTECTED]             @7

  [EMAIL PROTECTED]             @8

  [EMAIL PROTECTED]     @9

  [EMAIL PROTECTED]     @10

  [EMAIL PROTECTED]     @11

  [EMAIL PROTECTED]             @12

  [EMAIL PROTECTED]     @13

  [EMAIL PROTECTED]             @14

  [EMAIL PROTECTED]             @15

  [EMAIL PROTECTED]             @16

  [EMAIL PROTECTED]             @17

  [EMAIL PROTECTED]     @18

  [EMAIL PROTECTED]             @19

  [EMAIL PROTECTED]     @20

  [EMAIL PROTECTED]     @21

  [EMAIL PROTECTED]     @22

  [EMAIL PROTECTED]             @23

  [EMAIL PROTECTED]     @24

  [EMAIL PROTECTED]     @25

  [EMAIL PROTECTED]             @26

  [EMAIL PROTECTED]     @27

  [EMAIL PROTECTED]     @28

  [EMAIL PROTECTED]     @29

  [EMAIL PROTECTED]             @30

  [EMAIL PROTECTED]             @31

  [EMAIL PROTECTED]     @32

  [EMAIL PROTECTED]             @34

  [EMAIL PROTECTED]             @35

  [EMAIL PROTECTED]             @36

  avs_sprintf                   @33

Attachment: avs2yuv.zip
Description: Zip archive

Reply via email to