I installed pgCC and use trial license successfully.
But, when I compile the simple program (like"hello world")
pgcc -g hello.o
error message is showing as follow:
ld: warning: directory not found for option ‘-L/Volumes/Xcode/Xcode.app/Contents/Developer/usr/lib/llvm-gcc/4.2.1’
ld: warning: directory not found for option ‘-L/Volumes/Xcode/Xcode.app/Contents/Developer/usr/lib/llvm-gcc/4.2.1’
ld: library not found for -lgcc
I try to set LD_LIBRARY_PATH to find library but I failed…
Now, I use pgcc 13.10 version and OS X 10.9.1.
Of course, I compile same code with gcc successfully…
(gcc -v test.c → success
pgcc -v test.c → linking error!!)
On OS X, pgCC is the same as pgcc, and the PGI C++ compiler is called pgcpp.
So, let’s begin this experiment by compiling a hello program from source, and see what is wrong. If hello.o was created by a C++ compiler and now is linked
with a C compiler, you will see problems.
hello.c #include <stdio.h>
int main()
{printf(“Hello!\n”);}
But I think the problem is your Xcode installation.
Make sure you have Xcode 4.6 or greater, and that if you
Go to Finder-> Applications → Xcode
Xcode bar → preferences → Components
you will probably see that IOS Simulators are installed,
but the ‘Command Line Tools’ is not installed. Install it.
I check the Xcode → version 5.0, command line tool has been installed
I re-install PGI 10.13 workstation
After that, I try to compile and link ‘hello.c’ using this command again
→ pgcc -v -Wl,-t hello.c -m64 -o hello_c_64
And, I see different error message as follow:
→
Undefined symbols for architecture x86_64:
“_print”, referenced from:
_main in hello.o
ld: symbol(s) not found for architecture x86_64
pgcc-Fatal-linker completed with exit code 1
When I change -m64 to -m32, I also see following error message
Undefined symbols for architecture i386:
“_print”, referenced from:
_main in hello.o
ld: symbol(s) not found for inferred architecture i386
pgcc-Fatal-linker completed with exit code 1
Please let me know how to I solve this.
Thanks in advance.