15 мая 2023 года "Исходники.РУ" отмечают своё 23-летие!
Поздравляем всех причастных и неравнодушных с этим событием!
И огромное спасибо всем, кто был и остаётся с нами все эти годы!

Главная Форум Журнал Wiki DRKB Discuz!ML Помощь проекту


MSVC/Fortran Powerstation conflict

5279-70@arup.com
Tuesday, July 09, 1996


Env: Environment: VC++ 4.0 / NT 3.51 / Fortran Powerstation 1.0

I have a mixed language program (MSVC main program and FORTRAN
number-crunching). When I link my program, I get the following
warning:

libcmtd.lib(chkstk.obj) : Warning LNK4006: __chkstk already defined in
libfmt.lib(chkstk.obj); second definition ignored.

I am currently using the /FORCE option but would like to get rid of
that warning. I have tried the following:

1) Swap round the order of fortran and cpp libraries (include Fortran
before cpp),- this results in a large number of error messages, because
the cpp libraries are newer than the Fortran.

2) Use lib32.exe to /remove chkstk.obj form libfmt.lib, this results in
undefined symbols.

Any ideas anybody?

Ravi Sikka



Jim Tannenbaum -- jimt1@voicenet.com
Saturday, July 13, 1996

[Mini-digest: 2 responses]

        Use the /NOE option in the linker.  This option prevents the use of
extended libraries.  In brief, you have a library function defined for use
with both the C and Fortran compilers.  This option should stop/fix the problem.

                Jet

>
>Env: Environment: VC++ 4.0 / NT 3.51 / Fortran Powerstation 1.0
>
>I have a mixed language program (MSVC main program and FORTRAN
>number-crunching). When I link my program, I get the following
>warning:
>
>libcmtd.lib(chkstk.obj) : Warning LNK4006: __chkstk already defined in
>libfmt.lib(chkstk.obj); second definition ignored.
>
>I am currently using the /FORCE option but would like to get rid of
>that warning. I have tried the following:
>
>1) Swap round the order of fortran and cpp libraries (include Fortran
>before cpp),- this results in a large number of error messages, because
>the cpp libraries are newer than the Fortran.
>
>2) Use lib32.exe to /remove chkstk.obj form libfmt.lib, this results in
>undefined symbols.
>
>Any ideas anybody?
>
>Ravi Sikka
>
>

JJM Systems, Inc                 Phone: (215) 672-3660
1 Ivybrook Blvd, Suite 190       Fax:   (215) 672-5702
Ivyland, PA  19874               Net:   jimt1@voicenet.com


-----From: Serge Lalonde 

Hi There!

> Env: Environment: VC++ 4.0 / NT 3.51 / Fortran Powerstation 1.0
> 
We've done the same. First of all, you should know that Microsoft doesn't
support mixing Visual C++ 4.x and Fortran 1.0. They recommend 4.x for both.
Also, they don't guarantee that it will work with Win32s, but so far it
seems ok.

Here's how to do it (it worked for us). Link to the following libraries and
object files (we were using build scripts, not the MS make):

c:\msdev\lib\kernel32.lib
c:\msdev\lib\user32.lib
c:\msdev\lib\gdi32.lib
c:\msdev\lib\winspool.lib
c:\msdev\lib\comdlg32.lib
c:\msdev\lib\wsock32.lib
c:\msdev\lib\libcmt.lib
c:\fpsnt\lib\matherr.obj
c:\fpsnt\lib\libfmt.lib

You'll have to extract the matherr.obj directly from libfmt.lib (if I
remember correctly).

I don't recall any special compilation flags (-4Ya -MT).

Good luck.
--
Have a tremendous day!
    _/_/_/_/ _/_/_/_/ _/_/_/    _/_/_/  _/_/_/_//  300 Leo Parizeau, Suite 2222
   _/       _/       _/    _/ _/       _/      /  Montreal, PQ, Canada H2W 2P4
  _/_/_/_/ _/_/_/   _/_/_/_/ _/  _/_/ _/_/_/  /  Voice: (514) 849-8752 x236
       _/ _/       _/  _/   _/    _/ _/      /__Fax: (514) 849-4239__
_/_/_/_/ _/_/_/_/ _/    _/   _/_/_/ _/_/_/_/ Lalonde, Infolytica Corp.




| Вернуться в корень Архива |