Mail Archives: cygwin/1997/07/10/20:09:00
I'm writing a console App which uses a dll.
But it does not work correctly !.
The compilation terminates without errors but the called functions in
foo.DLL
return only Garbage !
To be more precise :
If I call a Function in Foo.DLL from my Program like
foodll_Func ( char * strText);
The provided Pointer contains only garbage;
and a following ,,for-loop" goes crazy :
for ( i=0 ; i < 6500 ; i++)
printf ("%c" strText[i]);
it terminates immadiatly at i==0
but this should not be the correct behaviour.
Only the DLL is available so I have created a library with the command
dlltool --def foo.def --dllname foo.dll --ouput-lib foo.o
Is there a commandline-option to pass to gcc or to the linker which I've
forgotten.
My makefile looks like this:
# Makefile -- BEGIN --
all=GnuTest
LIBS= -lcygwin -lapodll32
GnuTest:GnuTest.cc
gcc -g GnuTest.cc $(LIBS) -o GnuTest.exe
clean:
rm -f GnuTest.exe
#Makefile -- END --
The same sort of behaviour I found in emxgcc port.
Has anyone an idea
Thanks in advance!
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".
- Raw text -