- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
LINK : fatal error LNK1104: cannot open file 'LIBC.lib'
I am getting this error when trying to compile. If I use -nodefaultlibs:libc.lib, I get a whole bunch of unresolved errors relating to libcmt.lib.
This is my ifort command.
ifort -nologo $(FFLAGS) $(FPSTOP) $(FL) \\
-thread -dbglibs relap\\relap5.$O -libs:qwin lib\\relap$(NM).lib \\
lib\\scdap$(NM).lib lib\\contmn$(NM).lib lib\\matpro$(NM).lib \\
lib\\envrl$(NM).lib lib\\graphics.lib lib\\filechck.lib \\
lib\\opengl32.lib lib\\glaux.lib lib\\glu32.lib lib\\f90gl.lib \\
lib\\f90glu.lib lib\\f90glut.lib lib\\glut32.lib \\
-exe:bin\\relap5.exe
I am compiling on Win7 using IFC 12.0.4.196 Build 20110427
1 解決策
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
The problem here is the -nodefaultlib - this tells the linker to ignore all the compiler directives on which libraries to use. This program needs the QuickWin libraries so all the sources need to be compiled with /libs:qwin and -nodefaultlib removed. Or, add libifqwin.lib to the library set, but you'll probably need more than that.
コピーされたリンク
14 返答(返信)
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
One of the libraries you are linking to was built with Visual Studio 2003 or earlier. Microsoft dropped libc.lib as of VS2005. You will need to recompile whatever library is making the reference to libc.lib. I will also note that Microsoft dropped glaux.lib as of VS2008.
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
None of the librarys in the ifort command were built with the MSVS2003.
$(f90) -nologo $(FFLAGS) $(FPSTOP) $(FL) -libs:qwin \
-thread -dbglibs relap\relap5.$O lib\relap$(NM).lib \
lib\scdap$(NM).lib lib\contmn$(NM).lib lib\matpro$(NM).lib \
lib\envrl$(NM).lib lib\graphics.lib lib\filechck.lib \
lib\opengl32.lib lib\glu32.lib lib\f90gl.lib lib\f90glu.lib \
lib\f90glut.lib lib\glut32.lib -exe:bin\relap5.exe
These are built when I compile:
lib\scdap$(NM).lib lib\contmn$(NM).lib lib\matpro$(NM).lib lib\envrl$(NM).lib lib\graphics.liblib\relap$(NM).lib
These ones are from the latest f90gl download
lib\f90glut.lib lib\glut32.lib lib\opengl32.lib lib\glu32.lib lib\f90gl.lib lib\f90glu.lib
This one is build using the command: makilib filechck.dll
lib\filechck.lib
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
Not sure if the previous post is showing up.
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
Add at the end of the command that does the linking:
/link /verbose:libs
Do the link (it will probably be a lot of output so redirect it to a file) and attach the output.
/link /verbose:libs
Do the link (it will probably be a lot of output so redirect it to a file) and attach the output.
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
biding my time while waiting for acomplete rebuild of large project (zzzzzz) so took a quick look..
1) you need to fix name relap\relap5.o...is is .obj?
2) your graphics.lib references a number of external procedures, maybe they're are they in relap5??
I'd guess that'syour 'main program' since one of the errors is it can't find you 'main' program...
there's a couple of things to fix
from another brian
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
Quoting bmchenry
1) you need to fix name relap\relap5.o...is is .obj?
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
THe .o is for our optimized version and the .obj is for our debug version. Our code is all built from a command line. We doo not use VS to build our application.
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
relap5 is our main program, any ideas on what to do?
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
If your build procedure is set up to substitute .obj for $O, check why that didn't occur when that one was compiled originally. This is not a common idiom, so you need to investigate your procedure.
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
the $O gets set to either .o or .obj depending on if I am compiling a optimized version or a debug version. I am compiling a optimized version. so the file relap5.$O is changed to .o
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
The problem here is the -nodefaultlib - this tells the linker to ignore all the compiler directives on which libraries to use. This program needs the QuickWin libraries so all the sources need to be compiled with /libs:qwin and -nodefaultlib removed. Or, add libifqwin.lib to the library set, but you'll probably need more than that.
