functioncalls in DLL's return garbage

uyar uyar@athene.informatik.uni-bonn.de
Thu Jul 10 16:26:00 GMT 1997


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@cygnus.com" with one line of text: "help".


More information about the Cygwin mailing list

AltStyle によって変換されたページ (->オリジナル) /