www.digitalmars.com Home | Search | C & C++ | D | DMDScript | News Groups | index | prev | next
Archives

D Programming
D
D.gnu
digitalmars.D
digitalmars.D.bugs
digitalmars.D.dtl
digitalmars.D.dwt
digitalmars.D.announce
digitalmars.D.learn
digitalmars.D.debugger

C/C++ Programming
c++
c++.announce
c++.atl
c++.beta
c++.chat
c++.command-line
c++.dos
c++.dos.16-bits
c++.dos.32-bits
c++.idde
c++.mfc
c++.rtl
c++.stl
c++.stl.hp
c++.stl.port
c++.stl.sgi
c++.stlsoft
c++.windows
c++.windows.16-bits
c++.windows.32-bits
c++.wxwindows

digitalmars.empire
digitalmars.DMDScript

c++.windows.32-bits - How to compile 32-bit dll with DMC

↑ ↓ ← Janne Naukkarinen <kiviapaja hotmail.com> writes:
How I can compile 32-bit DLL with DMC,
with resources.

There comes many 16/32 bit "dualism" errors
with this line:

dmc -WD exampledll.cpp -w <defines> <libs>

This comes out from compiler:

link gwinsock,,,kernel32+user32+gdi32+comdlg32+wsock32,gwinsock/noi;

OPTLINK (R) for Win32  Release 7.50B1
Copyright (C) Digital Mars 1989 - 2001  All Rights Reserved
   
OPTLINK : Warning 148: USE16/USE32 Mismatch : DGROUP
F:\DM\BIN\..\lib\SNN.lib(dllstart) 
 Error 83: Illegal frame on start address 
OPTLINK : Warning 174: 32-bit Segments Inappropriate for 16-bit Segmented 
output 
gwinsock.obj(gwinsock) 
 Error 116: NEAR call to IMPORT at Relative 00025H  from
 Segment _TEXT
 FRAME  = Frame of Group FLAT 0000
 TARGET = External Symbol _WSAStartup 8 00000H 
 FIXUPP Type = 32-bit Conditional JMP

--- errorlevel 2

What causes this 16/32 bit conflict?

Janne Naukkarinen
kiviapaja hotmail.com
Jan 14 2004
↑ ↓ → "Walter" <walter digitalmars.com> writes:
1. Make sure all components are compiled with a 32 bit memory model.

2. Include a module definition file,
www.digitalmars.com/ctg/ctgDefFiles.html


"Janne Naukkarinen" <kiviapaja hotmail.com> wrote in message
news:bu48kd$23su$2 digitaldaemon.com...
 How I can compile 32-bit DLL with DMC,
 with resources.

 There comes many 16/32 bit "dualism" errors
 with this line:

 dmc -WD exampledll.cpp -w <defines> <libs>

 This comes out from compiler:

 link gwinsock,,,kernel32+user32+gdi32+comdlg32+wsock32,gwinsock/noi;

 OPTLINK (R) for Win32  Release 7.50B1
 Copyright (C) Digital Mars 1989 - 2001  All Rights Reserved

 OPTLINK : Warning 148: USE16/USE32 Mismatch : DGROUP
 F:\DM\BIN\..\lib\SNN.lib(dllstart)
  Error 83: Illegal frame on start address
 OPTLINK : Warning 174: 32-bit Segments Inappropriate for 16-bit Segmented
 output
 gwinsock.obj(gwinsock)
  Error 116: NEAR call to IMPORT at Relative 00025H  from
  Segment _TEXT
  FRAME  = Frame of Group FLAT 0000
  TARGET = External Symbol _WSAStartup 8 00000H
  FIXUPP Type = 32-bit Conditional JMP

 --- errorlevel 2

 What causes this 16/32 bit conflict?

 Janne Naukkarinen
 kiviapaja hotmail.com

Jan 18 2004