linker mistakes entry point in dll
From: Robert Oeffner (robertNoJunk_at_oeffner.spam_me_not.net)
Date: 01/28/05
- Next message: Oyvind Sylta: "Re: Fortran90 BIT manipulation ?"
- Previous message: robert.corbett_at_sun.com: "Re: Why is the memory doubled when writing data to files?"
- Next in thread: Steve Lionel: "Re: linker mistakes entry point in dll"
- Reply: Steve Lionel: "Re: linker mistakes entry point in dll"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 28 Jan 2005 08:22:46 GMT
Hi,
I'm using intel fortran version 8 from the command line compiling a project
in a makefile using microsoft nmake utility. The program is supposed to be a
dll but the problem I have is that the linker always gets the wrong entry
point and atempt to compile it as a standalone executable. I believe I have
specified the right flags in the makefile but from the output it seems that
the linker still tries to look for a function MainCRTStartup (rather than
DllMainCRTStartup) and then complains when it can't ind it. I am certain
none of the source code refers to a main program.
If anybody has a clue as which flags to set in my makefile that would be
great.
Here is an excerpt of the output from nmake:
C:\Users\Oeffner\GminAtHome\F77\GminNew>nmake /f makefileDLLIntel
Microsoft (R) Program Maintenance Utility Version 6.00.8168.0
Copyright (C) Microsoft Corp 1988-1998. All rights reserved.
ifort.exe /c -Od -Zi -Oy- /4L132 /4Yportlib /debug:full /pdbfile centre.f
submain.f mcruns.f morse.f
.
.
(more source files)
.
.
Intel(R) Fortran Compiler for 32-bit applications, Version 8.1 Build
20040802Z Package ID: w_fc_p_8.1.018
Copyright (C) 1985-2004 Intel Corporation. All rights reserved.
mind.f(487) : Warning: Because of COMMON, the alignment of object is
inconsistent with its type [PCOM]
DOUBLE PRECISION MFUNC, PCOM, X, XICOM
ifort.exe -DDEFLJ -DDEFLJPB -DDEFLJPS /c -Od -Zi -Oy- /4L132
/4Yportlib /debug:full /pdbfile mc.fpp mylbfgs.fpp io1.fpp k
eyword.fpp ddfpmin.fpp finalio.fpp potential.fpp dftb.fpp cgmin.fpp
Intel(R) Fortran Compiler for 32-bit applications, Version 8.1 Build
20040802Z Package ID: w_fc_p_8.1.018
Copyright (C) 1985-2004 Intel Corporation. All rights reserved.
ifort.exe /FegminIntel.dll centre.obj submain.obj mcruns.obj morse.obj
quench.obj rad.obj dprand.obj report.obj saveit.obj seed.obj
.
.
(more source files)
.
.
lj.obj ljpbin.obj ljpshift.o
bj BLJcluster.obj /link -entry:_CRT_INIT
Intel(R) Fortran Compiler for 32-bit applications, Version 8.1 Build
20040802Z Package ID: w_fc_p_8.1.018
Copyright (C) 1985-2004 Intel Corporation. All rights reserved.
Microsoft (R) Incremental Linker Version 6.00.8447
Copyright (C) Microsoft Corp 1992-1998. All rights reserved.
-out:gminIntel.dll
-subsystem:console
-entry:mainCRTStartup
-entry:_CRT_INIT
centre.obj
submain.obj
.
.
(more objectfiles)
.
.
mcruns.obj
ljpshift.obj
BLJcluster.obj
Creating library gminIntel.lib and object gminIntel.exp
LINK : error LNK2001: unresolved external symbol __CRT_INIT
libifcore.lib(libifcoremain.obj) : error LNK2001: unresolved external symbol
_MAIN__
gminIntel.dll : fatal error LNK1120: 2 unresolved externals
NMAKE : fatal error U1077: 'ifort.exe' : return code '0x460'
Stop.
C:\Users\Oeffner\GminAtHome\F77\GminNew>
thanks
Rob
- Next message: Oyvind Sylta: "Re: Fortran90 BIT manipulation ?"
- Previous message: robert.corbett_at_sun.com: "Re: Why is the memory doubled when writing data to files?"
- Next in thread: Steve Lionel: "Re: linker mistakes entry point in dll"
- Reply: Steve Lionel: "Re: linker mistakes entry point in dll"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|