|
From: Frank K. <fmf...@mi...> - 2002-08-22 23:54:22
|
Good day,
My Problem
I'm attempting to create a Program on a Linux System that will be able
to be run on a Windows System. This program uses the CURSES feature and
I'm having problems in generating a successfull load Module.
My Environment
Development Computer
Pentium 4
Linux 2.4.18
Caldera 2.3
Mingw 1.1
PDCurses 2.4
Production Computer
Compaq i486
Windows 95
Setup
I generated MINGW on Linux as a Cross Compiler for creating Windows
formated Object Modules using the procedure described by Reinhard
Jessich at his site:- members.telering.at/jessich/mingw.
Errors
When I use Mingw to create a Load module it assembles fine but when I bring
it over to the Windows System to run it, I get the following message:
A required DLL file, PDCURSES.DLL, was not found.
Sample
The following is a Script that creates two Load modules, firstly with GCC
and then with mingw32-gcc.
cat > Sample-gcc.c << EOF
#include <curses.h>
int main(int argc, char** argv)
{
initscr();
wclear(stdscr);
waddstr(stdscr, "hello world");
wrefresh(stdscr);
getch();
endwin();
}
EOF
gcc Sample-gcc.c -lncurses -o Sample-module
file Sample-module
ldd Sample-module
ls -l Sample-module
cat > Sample-mingw.c << EOF
#include </~/~/PDC/curses.h>
int main(int argc, char** argv)
{
initscr();
wclear(stdscr);
waddstr(stdscr, "hello world");
wrefresh(stdscr);
getch();
endwin();
}
EOF
mingw32-gcc Sample-mingw.c -lpdcurses -o Sample.exe
file Sample.exe
ldd Sample.exe
ls -l Sample.exe
END of the Script
The output of the above script.
Sample-module: ELF 32-bit LSB executable, Intel 80386, version 1,
dynamically linked (uses shared libs), not stripped
libc.so.6 => /lib/libc.so.6 (0x4001e000)
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
-rwxr-xr-x 1 name group 110339 Aug 22 19:06 Sample-module
Sample.exe: MS Windows PE Intel 80386 console executable not relocatable
not a dynamic executable
-rwxr-xr-x 1 fkrauss users 257237 Aug 22 19:06 Sample.exe
The above shows that the GCC version is smaller because it is dynamicaly
linked while the MINGW version is larger because it was staticly linked.
This is what I assumed it should be.
Testng
1. When I run the GCC created module on my Linux System it runs perfect.
2. When I dump to a diskette the MINGW created module and transfer it
to the Windows System I get the Error message.
Summary
It seems to me that even though the MINGW created module is a static module
something in it is telling Windows that it is a dynamicly linked module
which is then triggering the call for a DLL.
I assumed that since it was staticly linked it has everything it needs
to execute and wouldn't need any type of DLL.
Is there perhaps a option that I have to specify when building the module
to make it not call for the DLL?
Any assistance in helping me to get PDCurses to run with Mingw will be
greatly appreciated.
Yours truly,
Frank Krauss
|