I am having a hell of a time getting a simple program to link with a windows dll. I am really sorry for the newbie question but I can't seam to find an answer anywhere and the mailing list archive is not searchable.
Here is what I got: avs2yuv4mpeg.cpp - the main program avisynth_c.h - header for DLL I need to link with avisynth_c.lib - lib " " "
And I want to compile this into an executable avs2yuv4mpeg
I try "winemaker -iavisynth_c ." But when making I get "could not open .def file for avisynth_c"
And I am not sure how to create this .def file.
Please help.
Once again really sorry. But the mailing list is not searchable AND the winlib docs are really confusing and do not specially cover this situation.
On Fri, 12 Sep 2003, Kevin Atkinson wrote:
Here is what I got: avs2yuv4mpeg.cpp - the main program avisynth_c.h - header for DLL I need to link with avisynth_c.lib - lib " " "
And I want to compile this into an executable avs2yuv4mpeg
OK I figured out how to get it to compile. I manually created libavisynth_c.def, it is attached. I know that wasn't the best thing to do but it worked. Why is this necessary? Can't it use the .lib file? Failing that is there a script to create the .def from the .lib?
However, I didn't seam to gain anything from making it a winelib application. It still runs like a windows application and uses wine. Furthermore it is still using windows I/O.
How can I use the native glibc I/O libraries? In particular I want to be able for stdout and stderr to be handles like they would in a linux application so I can send my output to stdout (with out any line conversion) and messages to stderr. Right now when I redirect stdout stderr gets redirected also.
Is it possible to run a winelib application as a native executable, or is wine needed for the loading of windows dlls?
avs2yuv4mpeg.cpp is also attached.
On September 13, 2003 04:03 am, Kevin Atkinson wrote:
OK I figured out how to get it to compile. I manually created libavisynth_c.def, it is attached. I know that wasn't the best thing to do but it worked. Why is this necessary? Can't it use the .lib file? Failing that is there a script to create the .def from the .lib?
Unfortunately we lack compiler support to do all this stuff automatically in Linux. Maybe the gcc guys can do something about it, but I'm not sure if they are aware of the problem.
However, I didn't seam to gain anything from making it a winelib application.
Told you so! :)
Furthermore it is still using windows I/O.
Hmm, can you post the Makefile you used to build the thing?
How can I use the native glibc I/O libraries? In particular I want to be able for stdout and stderr to be handles like they would in a linux application so I can send my output to stdout (with out any line conversion) and messages to stderr. Right now when I redirect stdout stderr gets redirected also.
Yes, you can use glibc, but this stdout/err problem maybe related to something else. Eric is the expert in that area...
Is it possible to run a winelib application as a native executable, or is wine needed for the loading of windows dlls?
Yes, wine is needed I'm afraid.
On Sat, 13 Sep 2003, Dimitrie O. Paun wrote:
On September 13, 2003 04:03 am, Kevin Atkinson wrote:
OK I figured out how to get it to compile. I manually created libavisynth_c.def, it is attached. I know that wasn't the best thing to do but it worked. Why is this necessary? Can't it use the .lib file? Failing that is there a script to create the .def from the .lib?
Unfortunately we lack compiler support to do all this stuff automatically in Linux. Maybe the gcc guys can do something about it, but I'm not sure if they are aware of the problem.
Well I do know that Gcc has the code to do so. In fact I am able to cross compile. Gcc can even do better than VC++ and try to get the information out of the .dll itself without any extra files.
Furthermore it is still using windows I/O.
Hmm, can you post the Makefile you used to build the thing?
Attached is to files. One is for building the application via a cross compiler, the other is with Winelib.
How can I use the native glibc I/O libraries? In particular I want to be able for stdout and stderr to be handles like they would in a linux application so I can send my output to stdout (with out any line conversion) and messages to stderr. Right now when I redirect stdout stderr gets redirected also.
Yes, you can use glibc, but this stdout/err problem maybe related to something else. Eric is the expert in that area...
OK. What about opening files using the unix path name?
On September 13, 2003 08:32 pm, Kevin Atkinson wrote:
Furthermore it is still using windows I/O.
Hmm, can you post the Makefile you used to build the thing?
Attached is to files. One is for building the application via a cross compiler, the other is with Winelib.
OK, I took a look, they don't seem to link with msvcrt, why are you saying it still uses windows I/O?
On Sun, 14 Sep 2003, Dimitrie O. Paun wrote:
On September 13, 2003 08:32 pm, Kevin Atkinson wrote:
Furthermore it is still using windows I/O.
Hmm, can you post the Makefile you used to build the thing?
Attached is to files. One is for building the application via a cross compiler, the other is with Winelib.
OK, I took a look, they don't seem to link with msvcrt, why are you saying it still uses windows I/O?
OK maybe there not. It was just that stderr was going to stdout. So can I safely write binary data to stdout are do I need to somehow turn stdout into binary mode to avoid EOL conversion.
Also how do I open files based on the Unix path?
On September 14, 2003 02:52 am, Kevin Atkinson wrote:
OK maybe there not. It was just that stderr was going to stdout. So can I safely write binary data to stdout are do I need to somehow turn stdout into binary mode to avoid EOL conversion.
Yes, there's no binary mode to enable, things should just work.
Also how do I open files based on the Unix path?
Just try to open them, again they should just work.
It seams that I wasn't using the winlib application at all. Instead there was a left over exe that the launch script was finding and using....
No that I tried to rebuilt it I can't get it working. I am getting: wine: Unhanded exception (thread 0009), starting debugger... err:seh:start_debugger Couldn't start debugger ("debugger/winedbg 8 128") (2) Read the Wine Developers Guide on how to set up winedbg or another debugger
I believe my .def is not working. As it works OK up until the first API call. So can someone tell me how to correctly construct one for a dll?
Yes, you can use glibc, but this stdout/err problem maybe related to something else. Eric is the expert in that area...
the attached patch should fix it A+