dotgnu-general
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[DotGNU]Windows specifica


From: Tobias Oberstein
Subject: [DotGNU]Windows specifica
Date: Sun, 16 Feb 2003 01:52:21 +0100

I'd like to build a DLL under Windows using VC++ and statically
link Portable.NET.

I had little problems building pnet using MingW + Cygwin (small
wrinkles see at the end).

I guess I need to have "*.def" files to produce correct Import Libs
for use with VC++.

The MingW FAQ says (they show how to build and use a shared library)

<cite>

  gcc -shared -o testdll.dll testdll.c \
      -Wl, \
      --output-def,testdll.def, \
      --out-implib,libtestdll.a

  to produce the DLL and DEF files. MSVC cannot use the MinGW library,
  but since you have already the DEF file you may easily produce
  one by the Microsoft LIB tool:

  lib /machine:i386 /def:testdll.def

</cite>

So here's my question: How can I tell the build process to spit
out those *.def files?


One more question .. under pure Cygwin, I link my pnet test-driver
program with:

libILEngine.a
libILDumpAsm.a
libILImage.a
libILSupport.a

libffi.a
libgc.a

-lm -lpthread

which works just fine. Under MingW32 + Cygwin, I noticed that e.g.
"ilrun.exe"
is built by linking

-lwsock32

instead of "-lm -lpthread". I suppose, native Win32 threading headers are
used then? E.g. does Pnet use the native Win32 thread API for e.g. it's
Metadata Mutex?

Also, I'd like to reduce the set of linked in libraries as much as possible,
to reduce problems (I'm embedding into a server app, which will get complex
enough) especially the dynamics. That is: what is "-lwsock32"? Is it
essential?
How to avoid? What is /can I avoid "libffi.a" and "libgc.a"?

Thanks alot,
Tobias



********************** wrinkles: MingW + Cygwin *************************

gcc -mno-cygwin -DHAVE_CONFIG_H -I. -I. -I../include    -I../libgc/include -
I../
include                         -DCSCC_LIB_PREFIX=\"/usr/local/lib\"        
-DCS
CC_BIN_PREFIX=\"/usr/local/bin\" -g -O2 -Wall -c dns.c
gcc -mno-cygwin -DHAVE_CONFIG_H -I. -I. -I../include    -I../libgc/include -
I../
include                         -DCSCC_LIB_PREFIX=\"/usr/local/lib\"        
-DCS
CC_BIN_PREFIX=\"/usr/local/bin\" -g -O2 -Wall -c dynlib.c
/bin/sh ./gen_errno.sh ../include/il_errno.h \

    gcc -mno-cygwin -DHAVE_CONFIG_H -I. -I. -I../include    -I../libgc/inclu
de -I../include                         -DCSCC_LIB_PREFIX=\"/usr/local/lib\"
 -DCSCC_BIN_PREFIX=\"/usr/local/bin\" -g -O2 -Wall >./errno_map.c
gcc.exe: /tmp/gerr2100.c: No such file or directory
gcc.exe: no input files
make[1]: *** [errno_map.c] Error 1
make[1]: Leaving directory
`/home/Administrator/Portable.NET-MinGW/pnet-0.5.2/su
pport'
make: *** [all-recursive] Error 1

address@hidden ~/Portable.NET-MinGW/pnet-0.5.2
$


Now, the contents of "errno_map.c" looks like this:

./gen_errno.sh: cannot locate the errno.h file for the target platform


I worked around it by copying "errno_map.c" from my non-MingW (that is
pure Cygwin) built over. After that, everything rolled.


Finally, a "make check" showed up 4 errors (everything else was fine):

Suite: Main Thread Properties
-----------------------------

thread_main_nonnull ... ok
thread_main_object ... ok
thread_main_running ... ok
thread_main_foreground ... ok

Suite: Thread Creation
----------------------

thread_create_arg ... ok
thread_create_suspended ... ok
thread_create_state ... ok
thread_create_destroy ... ok
thread_create_foreground ... ok

Suite: Thread Suspend
---------------------

thread_suspend ... thread did not end in the `stopped' state
thread_suspend_self ... ok
thread_suspend_destroy ... ok
thread_suspend_mutex ... ok
thread_suspend_rdlock ... ok
thread_suspend_wrlock ... ok
thread_suspend_main ... ok
thread_suspend_main_self ... ok

Suite: Thread Sleep
-------------------

thread_sleep ... sleep did not end when expected
thread_sleep_interrupt ... ok
thread_sleep_suspend ... thread did not resume
thread_sleep_suspend_ignore ... resume was not ignored

Suite: Misc Thread Tests
------------------------

thread_other_object ... ok
thread_counts ... ok

Suite: Wait Mutex Tests
-----------------------

mutex_create ... ok

24 tests run, 4 tests failed
FAIL: test_thread



reply via email to

[Prev in Thread] Current Thread [Next in Thread]