July 03, 2001
.DEF file:

EXETYPE            NT
SUBSYSTEM      WINDOWS,4.0

As I think you want WinMain as program entry point and not main.

You could also try:
link .../ENTRY:WinMainCRTStartup

Jan



Darin Peshev wrote:

> .DLL that I'm trying to use us 32bit library (PE header contains Flags 210E which means - executable bacwards 32bit library. Same application works perfect when compiled and linked with VC++ 6.0). Code that calls functions in the library is CPP source. With this two things as a start point why do I get this error message? (See below). My OS is Windows 2000 and I read carefully through the DM documentation for different options controling compilation and linking. However I was not able to find anything that leads to :
>
> >> >
> >> >C:\dm\bin\..\lib\SNN.lib(constart)
> >> > Error 83: Illegal frame on start address
> >> >OPTLINK : Warning 174: 32-bit Segments Inappropriate for 16-bit
> Segmented
> >> output
> >> >
> >> >main.obj(main)
> >> > Error 116: NEAR call to IMPORT at Relative 00013H  from
> >> > Segment _TEXT
> >> > FRAME  = Frame of Group FLAT 0000
> >> > TARGET = External Symbol ??0QApplication@@QAE@AAHPAPAD@Z (syscall
> >> >QApplication::QApplication(int &,char **))
> >> >00000H
> >> > FIXUPP Type = 32-bit Conditional JMP
>
> Is it clear this time?
> Darin
>
> Walter wrote:
>
> > Near and far calls? Are you working with 16 bit code or 32 bit code? It's beginning to sound like you are attempting to mix 16 and 32 bit code, which will inevitably produce bizarre linker messages.
> >
> > -Walter
> >
> > Darin Peshev wrote in message <3B421415.767E170D@usa.net>...
> > >I don't think I'm trying to do this. I have small example (few lines) that contains few calls to .DLL exported functions. I'm compiling this code with Digital Mars and I'm linking resulting .OBJ file with import library
> > generated
> > >by IMPLIB. Does any of this sound like trying to do JMP to import? My
> > feeling is
> > >that Digital Mars generates near calls (instead of far calls) to functions supplied by the import library. And because import library is quite big,
> > linker
> > >cannot resolve references even by reordering segments. I've been looking
> > for DM
> > >switch to force far calls for functions in other modules(.obj or .lib) but
> > I was
> > >not able to find any. I'll try to add __declspec(dllimport) to .h files
> > supplied
> > >with .dll and this may be will solve the problem but I don't think that
> > explicit
> > >__declspec(dllimport) is needed in other compilers. Does it make sense to
> > add
> > >new switch to the compiler that will presume __declspec(dllimport) for all
> > >unresolved function refernces during compilation?
> > >Darin
> > >
> > >Walter wrote:
> > >
> > >> Looks like you're trying to do a JMP to an import. That doesn't work on Win32 - all imports are done with a layer of indirection. That's why imported symbols have to be declared with __declspec(dllimport).
> > >>
> > >> Darin Peshev wrote in message <3B41E0B9.DC5D3587@usa.net>...
> > >> >Hmm, that's strange because this is import library generated as a result
> > of
> > >> >implib. Does this means that implib is buggy? .DLL for which I'm
> > generating
> > >> >import library is quite big - 2.7mb. Could this be a problem? I tried to generate .DEF file out of .DLL but when I try to link with it I get
> > this:
> > >> >
> > >> >C:\dm\bin\..\lib\SNN.lib(constart)
> > >> > Error 83: Illegal frame on start address
> > >> >OPTLINK : Warning 174: 32-bit Segments Inappropriate for 16-bit
> > Segmented
> > >> output
> > >> >
> > >> >main.obj(main)
> > >> > Error 116: NEAR call to IMPORT at Relative 00013H  from
> > >> > Segment _TEXT
> > >> > FRAME  = Frame of Group FLAT 0000
> > >> > TARGET = External Symbol ??0QApplication@@QAE@AAHPAPAD@Z (syscall
> > >> >QApplication::QApplication(int &,char **))
> > >> >00000H
> > >> > FIXUPP Type = 32-bit Conditional JMP
> > >> >
> > >> >Any ideas?
> > >> >Darin
> > >> >
> > >> >Walter wrote:
> > >> >
> > >> >> Darin Peshev wrote in message <3B4111EB.7BF3DDD2@usa.net>...
> > >> >> >Trying to link some libraries generates:
> > >> >> >
> > >> >> > Warning 140: Library probably needs FIXLIB
> > >> >> >
> > >> >> >Any idea where to find FIXLIB and what does this mean?
> > >> >>
> > >> >> I believe it means that the symbol table in the .LIB file is
> > corrupted.
> > >> What
> > >> >> .LIB file is it?
> > >> >>
> > >> >> >Is there a decent debugger that can debug DigitalMars compiled .EXE?
> > >> >>
> > >> >> The debugger comes on the CD version, available from:
> > >> >>
> > >> >>     www.digitalmars.com/shop.html
> > >> >>
> > >> >> -Walter
> > >> >
> > >

1 2
Next ›   Last »