How to print out from DLL
Mishel
bymi@pactcorp.com
Tue Feb 17 12:12:00 GMT 2004
Hi,
I have a problem with printing to the standart output from DLL.
1. I create simple DLL(aaaDll.dll) in the MVS 6.0. This DLL has only one
function(fnAaaDll()), which prints some strings.
2. I create another console application project(aaaTestDll.cpp) in MVS 6.0
which has only main function. In this function I call function from DLL(befor a
link the interface library for DLL). In this case I have all printings in the
console!
3. I cleate the interface library for this DLL in the Cygwin:
cd ./Release
echo EXPORTS > aaaDll.def
echo fnAaaDll >> aaaDll.def
dlltool --def aaaDll.def --dllname aaaDll.dll --output-lib libAaa.a
cp libAaa.a /usr/local/lib/libAaa.a
cd ..
and I compile my test programm in the Cygwin(see makefile):
AAALDPATH = -L/usr/local/lib
CC = g++ -pipe -Wno-deprecated
LN = g++ -static
LIBS = -lAaa
LDPATH = $(AAALDPATH)
WARN = -Wall -Wbad-function-cast -Wcast-qual \
-Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes \
# -Wcast-align -Wredundant-decls -Winline
CFLAGS = $(WARN)
APPNAME = aaa
APPOBJS = aaaTestDll.o
$(APPNAME) :$(APPOBJS)
$(LN) -o $@ $(APPOBJS) $(LDPATH) $(LIBS)
strip $@.exe
%.o: %.c
$(CC) -c -g -Wall $(DEF) $(INCL) $< -o $@
clean:
rm -f *.o
rm -f .depend
rm -f $(APPNAME).exe
make -f makefile .depend
.depend:
$(CC) $(DEF) $(INCL) -E -M -MG $(shell ls *.c*) > .depend
include .depend
I run result and no printings on the console!
Question: How I can print from the DLL under Cygwin?
Best regards,
Mishel.
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
More information about the Cygwin
mailing list