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++ - Var and fun with same name, link.exe barf.

↑ ↓ ← Jean-Pierre H. Dumas <dumas.jeanpierre free.fr> writes:
coff2omf works magic, thanks.
(Why not document it ?)

Now compile is going almost smooth,
but linking time comes...

In the SDL_joystick.c file there is something unusual,
a variable and a function with same name. (ANSI ?)
(gcc and VC do not complain about this)
And the DM linker is complaining about it. (See below)
If i say /NOIGNORECASE, then there is no more complaints,
but is the dll OK ?
Testing the dll thus produced with the vc5 compiled test
programs does no work, except for an OpenGL test...

How about that : OPTLINK : Warning 134: No Start Address
What should I do about it?

TIA

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

Definition File: (.def):.\Release\SDL_joystick.obj(SDL_joystick)  Offset 0016DH
Record Type 0091
 Error 1: Previous Definition Different : _SDL_NumJoysticks
OPTLINK : Warning 134: No Start Address
NMAKE : fatal error U1077: 'K:\DM\BIN\link.exe' : return code '0x1'
Stop.

=====================================================
LINK32=link.exe
LINK32_OPTS=/NOLOGO /ECHOINDIRECT /EXETYPE:NT /MACHINE:I386 \
 /DETAILEDMAP /IMPLIB /DELEXECUTABLE /XREF #/NOIGNORECASE
LINK32_OUT="$(OUTDIR)\SDL.dll"
LINK32_MAP="$(OUTDIR)\SDL.map"
LINK32_FLAGS=snd.lib snn.lib winmm.lib dxguid.lib kernel32.lib user32.lib \
 gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib \
 oleaut32.lib uuid.lib

=====================================================
..
Uint8 SDL_numjoysticks = 0;                                 <<<<----
SDL_Joystick **SDL_joysticks = NULL;
static SDL_Joystick *default_joystick = NULL;

..

/*
 * Count the number of joysticks attached to the system
 */
int SDL_NumJoysticks(void)                                  <<<<----
{
	return SDL_numjoysticks;
}
..
=====================================================
Jan 27 2002
→ Jan Knepper <jan smartsoft.cc> writes:
Check the prototype and the implementation of the function.
If there is no prototype add one or check how it is being invoked.
The two SDL_numjoysticks and SDL_NumJoysticks are different because of the use
of
capitals in one. That should not be the problem.



"Jean-Pierre H. Dumas" wrote:

 coff2omf works magic, thanks.
 (Why not document it ?)

 Now compile is going almost smooth,
 but linking time comes...

 In the SDL_joystick.c file there is something unusual,
 a variable and a function with same name. (ANSI ?)
 (gcc and VC do not complain about this)
 And the DM linker is complaining about it. (See below)
 If i say /NOIGNORECASE, then there is no more complaints,
 but is the dll OK ?
 Testing the dll thus produced with the vc5 compiled test
 programs does no work, except for an OpenGL test...

 How about that : OPTLINK : Warning 134: No Start Address
 What should I do about it?

 TIA

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

 Definition File: (.def):.\Release\SDL_joystick.obj(SDL_joystick)  Offset 0016DH
 Record Type 0091
  Error 1: Previous Definition Different : _SDL_NumJoysticks
 OPTLINK : Warning 134: No Start Address
 NMAKE : fatal error U1077: 'K:\DM\BIN\link.exe' : return code '0x1'
 Stop.

 =====================================================
 LINK32=link.exe
 LINK32_OPTS=/NOLOGO /ECHOINDIRECT /EXETYPE:NT /MACHINE:I386 \
  /DETAILEDMAP /IMPLIB /DELEXECUTABLE /XREF #/NOIGNORECASE
 LINK32_OUT="$(OUTDIR)\SDL.dll"
 LINK32_MAP="$(OUTDIR)\SDL.map"
 LINK32_FLAGS=snd.lib snn.lib winmm.lib dxguid.lib kernel32.lib user32.lib \
  gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib \
  oleaut32.lib uuid.lib

 =====================================================
 ..
 Uint8 SDL_numjoysticks = 0;                                 <<<<----
 SDL_Joystick **SDL_joysticks = NULL;
 static SDL_Joystick *default_joystick = NULL;

 ..

 /*
  * Count the number of joysticks attached to the system
  */
 int SDL_NumJoysticks(void)                                  <<<<----
 {
         return SDL_numjoysticks;
 }
 ..
 =====================================================

Jan 27 2002
→ "Walter" <walter digitalmars.com> writes:
You have no DllMain(), which you need to generate a working DLL. -Walter

"Jean-Pierre H. Dumas" <dumas.jeanpierre free.fr> wrote in message
news:1103_1012125288 jeanpierre...
 coff2omf works magic, thanks.
 (Why not document it ?)

 Now compile is going almost smooth,
 but linking time comes...

 In the SDL_joystick.c file there is something unusual,
 a variable and a function with same name. (ANSI ?)
 (gcc and VC do not complain about this)
 And the DM linker is complaining about it. (See below)
 If i say /NOIGNORECASE, then there is no more complaints,
 but is the dll OK ?
 Testing the dll thus produced with the vc5 compiled test
 programs does no work, except for an OpenGL test...

 How about that : OPTLINK : Warning 134: No Start Address
 What should I do about it?

 TIA

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

 Definition File: (.def):.\Release\SDL_joystick.obj(SDL_joystick)  Offset

 Record Type 0091
  Error 1: Previous Definition Different : _SDL_NumJoysticks
 OPTLINK : Warning 134: No Start Address
 NMAKE : fatal error U1077: 'K:\DM\BIN\link.exe' : return code '0x1'
 Stop.

 =====================================================
 LINK32=link.exe
 LINK32_OPTS=/NOLOGO /ECHOINDIRECT /EXETYPE:NT /MACHINE:I386 \
  /DETAILEDMAP /IMPLIB /DELEXECUTABLE /XREF #/NOIGNORECASE
 LINK32_OUT="$(OUTDIR)\SDL.dll"
 LINK32_MAP="$(OUTDIR)\SDL.map"
 LINK32_FLAGS=snd.lib snn.lib winmm.lib dxguid.lib kernel32.lib user32.lib

  gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib \
  oleaut32.lib uuid.lib

 =====================================================
 ..
 Uint8 SDL_numjoysticks = 0;                                 <<<<----
 SDL_Joystick **SDL_joysticks = NULL;
 static SDL_Joystick *default_joystick = NULL;

 ..

 /*
  * Count the number of joysticks attached to the system
  */
 int SDL_NumJoysticks(void)                                  <<<<----
 {
 return SDL_numjoysticks;
 }
 ..
 =====================================================

Jan 27 2002