Ld.exe linking error in Windows.

In summary, the user is experiencing a problem with using g77 on Vista and the make process stopping due to an issue with the space character in the path "C:\Program Files\...". The suggested solution is to use quotes around folder names with spaces or to create a separate development folder outside of "C:\Program Files". Alternatively, using Cygwin can also provide a more reasonable shell.
  • #1
zevik
5
0
I think this problem has to do with the space character inside "C:\Program Files\...":

I'm trying to use g77 on Vista.
The makefile I'm using is supplied by the developer (it's for MadGraph), but when I "make", this is what I get:
a bunch of successful "g77 -O -i4 -c <somename>.f" lines, till it comes to:
"g77 -O -i4 -o mg2 <bunch of object files>", where the make process stops with messages:

ld: cannot open C:\Program: No such file or directory
make: *** [mg2] Error 1

Is it because somehow Windows gets confused about the space character in "Program Files"?
Any idea?
 
Technology news on Phys.org
  • #2
zevik said:
I think this problem has to do with the space character inside "C:\Program Files\...":

I'm not sure of the specifics of the problem, but I've had a similar problem in Linux.

To solve it I had to use quotes around any folder names which contained spaces and not the whole path:
Code:
C:\"Program Files"\...

I'm not sure whether or not this would solve your problem but it's worth a try. It's not for all problems, but it does show up every now and then.

Example:

Doesn't work
Code:
"/home/jared/temp directory/..."

Works
Code:
/home/jared/"temp directory"/...
 
  • #3
A lazy and effective way to solve this would be to not put this stuff in C:\Program Files. Make a C:\Development. Or install Cygwin
 

1. What is an Ld.exe linking error in Windows?

An Ld.exe linking error in Windows is an error that occurs during the linking phase of the compilation process. Ld.exe is a linker program that is used to combine and resolve external references between object files, libraries, and other resources to create a single executable or shared library file.

2. What causes an Ld.exe linking error?

There are several possible causes for an Ld.exe linking error, including missing or incompatible libraries, incorrect compiler settings, or errors in the source code. It can also occur if there are unresolved external references or if there are duplicate symbols in the code.

3. How can I fix an Ld.exe linking error?

To fix an Ld.exe linking error, you will need to identify the specific cause of the error. This may involve checking for missing or incompatible libraries, reviewing compiler settings, or debugging any issues in the source code. It may also be helpful to consult with other developers or refer to documentation for the specific libraries or tools being used.

4. Can an Ld.exe linking error be prevented?

An Ld.exe linking error can be prevented by following best practices for coding and compiling, such as keeping track of external dependencies and using correct compiler settings. Regularly testing and debugging code can also help to identify and resolve errors before they occur during the linking phase.

5. Is an Ld.exe linking error specific to Windows?

Yes, an Ld.exe linking error is specific to Windows as it is a linker program used in the Windows operating system. However, similar linking errors may occur in other operating systems that use different linker programs, such as macOS (using ld) or Linux (using ld or gold).

Similar threads

  • Programming and Computer Science
Replies
14
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
878
  • Programming and Computer Science
Replies
8
Views
870
  • Computing and Technology
Replies
7
Views
501
  • Programming and Computer Science
Replies
11
Views
2K
  • Programming and Computer Science
Replies
4
Views
3K
  • Programming and Computer Science
Replies
1
Views
1K
  • Programming and Computer Science
Replies
12
Views
1K
  • Programming and Computer Science
Replies
4
Views
5K
  • Programming and Computer Science
Replies
2
Views
5K
Back
Top