User forums > Using Code::Blocks

C::B adds options to lib.exe (-r ; ranlib ) that i can not remove.

<< < (2/3) > >>

stahta01:
I am downloading pgi-community-windows-x64 of the compiler; I will see if it installs.
Be about 6 hours just to do the download of the 1 1/2 gig installer.

I think this is the second person with this issue; that I have replied to the post.
But, it was a long time ago with the last one. Did not see a free download on the last one.

Edit: I am still several hours from finishing download; I had to restart from the beginning.
Edit2: Installer refused to install; likely a corrupted download.
Edit3: I have gotten a good download of PGI; but, need to install Win10 SDK and MSVS before PGI will install.
Edit3b: https://www.pgroup.com/support/windows-coinstall.htm

Tim S.

stahta01:
I am now working on figuring out how to use the FORTRAN library that I am creating.
Sorry, it took so long; but, my internet is very slow to download 3GB of installers.

Edit: The problem looks hard for a FORTRAN newbie to figure out.
Two clear paths use static linker of "link.exe" or use "pgfortran.exe" to call the linker.
I already decided that using "lib.exe" was not correct.
Edit2: Found a third option using "ar" command.

Tim S.

stahta01:
The problem does not seem to be in CB setting to do the static linking; but, I do think adding option "v" for verbose will be very helpful.

The real problem seems to be a PATH issue to find Microsoft's linker command of "link.exe"; my computer was finding the wrong "link.exe" and others might have the same issue.

Tim S.

stahta01:
Patch to enable verbose output; that should show the wrong path or missing path to Microsoft link.exe command. Tim S.

Edit: ranlib is just a dummy program for this compiler; so, it can removed.


--- Code: ---From ba3dcbab18fdaf062452488ca4b5abfefb964833 Mon Sep 17 00:00:00 2001
From: Tim S <stahta01@gmail.com>
Date: Fri, 22 Feb 2019 17:29:19 -0500
Subject: compiler: Add verbose to PGI static link command. Thanks stahta01

---
 .../compilergcc/resources/compilers/options_pgifortran.xml      | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/plugins/compilergcc/resources/compilers/options_pgifortran.xml b/src/plugins/compilergcc/resources/compilers/options_pgifortran.xml
index 6e428398b..5ad554875 100644
--- a/src/plugins/compilergcc/resources/compilers/options_pgifortran.xml
+++ b/src/plugins/compilergcc/resources/compilers/options_pgifortran.xml
@@ -202,7 +202,7 @@
     <Command name="LinkDynamic"
              value="$linker -shared $libdirs $link_objects $link_resobjects -o $exe_output $link_options $libs"/>
     <Command name="LinkStatic"
-             value="$lib_linker -r $static_output $link_objects&#38;#xA;&#38;#x9;ranlib $exe_output"/>
+             value="$lib_linker -vr $static_output $link_objects&#38;#xA;&#38;#x9;ranlib $exe_output"/>
     <Command name="LinkNative"
              value="$linker $libdirs -o $exe_output $link_objects $link_resobjects $link_options $libs"/>
 
--
2.19.1.windows.1

--- End code ---

BlueHazzard:
I am not sure if i can follow?
The conclusion?:
1) Codeblocks does nothing wrong (but it could be improved see 4) )
2) There are two programs called link.exe, and if the path is wrong pgfortran will call the wrong program (can we do something against this?)
3) You can you detect pgfortran is using the wrong path?
4) Is the output of the command if we add this verbose flag cluttered a lot? Can it be added in the normal compiler options, or has it to be added in the "extended" options?

thank you for testing!

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version