|
From: <dan...@ya...> - 2000-12-18 21:28:01
|
--- Mattia Barbon <mb...@ds...> wrote: > Hello, > I am writing a Perl module, and I need to get the dll > HMODULE, but my DllMain isn't called. I am using > > gcc -v => gcc version 2.95.2 19991024 (release) > ld -v => GNU ld version 2.10.91 (with BFD 2.10.91) > ( this didn't work with older ld versions, too ) > > dllhelpers works ok, and DllMain is called > whei I compile with VC++5. > Below there is some output from dmake ( I've removed > all -I, -L, -l ) > > Thanks in advance > Mattia > > ---Compilation--- > g++ -c -fvtable-thunks -fno-pcc-struct-return -O2 -fno-rtti > -fno-exceptions -g -O2 -D_X86_=1 -DWIN32 -D_WIN32 > -DWINVER=0x0400 -D__WIN95__ -D__GNUWIN32__ -D__WIN32__ > -D__WXMSW__ -D__WINDOWS__ Wx.c > -----Wx.def------ > EXPORTS > boot_Wx > _boot_Wx = boot_Wx > -------Link------ > dlltool --def Wx.def --output-exp dll.exp > > gcc -o blib\arch\auto\Wx\Wx.dll -Wl,--base-file -Wl,dll.base -mdll > Wx.o -Wl,--image-base,0x3b140000 dll.exp > > dlltool --def Wx.def --base-file dll.base --output-exp dll.exp > > gcc -o blib\arch\auto\Wx\Wx.dll -mdll Wx.o > -Wl,--image-base,0x3b140000 dll.exp > ----Alternate link ( run by hand )--------- > g++ -shared -o blib\arch\auto\Wx\Wx.dll Wx.o This is the way I would do it: g++ -shared -o blib\arch\auto\Wx\Wx.dll -Wl,--out-implib,libWx.dll.a \ -Wl,--image-base,0x3b140000 Wx.def Wx.o Note where Wx.def goes on the command line. If wanted to do it the old, verbose way, I would follow the example in the dllhelpers-0.2.5 readme file. Danny _____________________________________________________________________________ http://au.yahoo.com/shopping/giftguide/christmas/jumppage.html - Yahoo! Gift Guides - Looking for inspiration? |