[Cg1] Failed Make Linux 2

Chitra Singh s8chsing at stud.uni-saarland.de
Fri Oct 28 14:11:12 CEST 2016


Hi
I am on OS X Yosemite.
I am getting an error which should be thrown by a Windows machine?  
"Undefined symbols for architecture x86_64"
Not sure what it's about, hence pasting the (huge)error message.  
Anyone else facing this?

This is my compiler version:
$ g++ -v
Configured with: --prefix=/Library/Developer/CommandLineTools/usr  
--with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 7.0.2 (clang-700.1.81)
Target: x86_64-apple-darwin14.5.0
Thread model: posix

@Oliver, even I got the same error message, was resolved by installing libpng.

$ make debug
g++ -I. -c -std=c++0x -g core/image.cpp -o build/debug/core/image.o
g++ -I. -c -std=c++0x -g core/julia.cpp -o build/debug/core/julia.o
g++ -I. -c -std=c++0x -g core/scalar.cpp -o build/debug/core/scalar.o
g++ -I. -c -std=c++0x -g main/a_cameras.cpp -o build/debug/main/a_cameras.o
g++ -I. -c -std=c++0x -g main/a_julia.cpp -o build/debug/main/a_julia.o
g++ -I. -c -std=c++0x -g main/main.cpp -o build/debug/main/main.o
g++ build/debug/core/image.o build/debug/core/julia.o  
build/debug/core/scalar.o build/debug/main/a_cameras.o  
build/debug/main/a_julia.o build/debug/main/main.o  -lpng -o cgrayd
Undefined symbols for architecture x86_64:
   "rt::PerspectiveCamera::PerspectiveCamera(rt::Point const&,  
rt::Vector const&, rt::Vector const&, float, float)", referenced from:
       a_cameras() in a_cameras.o
   "rt::OrthographicCamera::OrthographicCamera(rt::Point const&,  
rt::Vector const&, rt::Vector const&, float, float)", referenced from:
       a_cameras() in a_cameras.o
   "rt::dot(rt::Vector const&, rt::Vector const&)", referenced from:
       rt::julia(rt::Point const&, rt::Point const&) in julia.o
   "rt::cross(rt::Vector const&, rt::Vector const&)", referenced from:
       rt::julia(rt::Point const&, rt::Point const&) in julia.o
   "rt::Renderer::test_render1(rt::Image&)", referenced from:
       a_julia() in a_julia.o
   "rt::Renderer::test_render2(rt::Image&)", referenced from:
       a_cameras() in a_cameras.o
   "rt::Renderer::Renderer(rt::Camera*, rt::Integrator*)", referenced from:
       a_cameras() in a_cameras.o
       a_julia() in a_julia.o
   "rt::operator-(rt::Point const&, rt::Vector const&)", referenced from:
       a1computeWeight(float, float, rt::Point const&, float) in a_julia.o
   "rt::operator*(rt::Point const&, float)", referenced from:
       a1computeWeight(float, float, rt::Point const&, float) in a_julia.o
   "rt::operator*(rt::RGBColor const&, float)", referenced from:
       a2computeColor(rt::Ray const&) in a_cameras.o
   "rt::operator*(float, rt::RGBColor const&)", referenced from:
       a2computeColor(rt::Ray const&) in a_cameras.o
       a1computeColor(unsigned int, unsigned int, unsigned int,  
unsigned int) in a_julia.o
   "rt::operator+(rt::Vector const&, rt::Point const&)", referenced from:
       rt::julia(rt::Point const&, rt::Point const&) in julia.o
   "rt::Point::operator-(rt::Point const&) const", referenced from:
       rt::julia(rt::Point const&, rt::Point const&) in julia.o
   "rt::Vector::lensqr() const", referenced from:
       rt::julia(rt::Point const&, rt::Point const&) in julia.o
   "rt::RGBColor::clamp() const", referenced from:
       rt::Image::writePNG(std::__1::basic_string<char,  
std::__1::char_traits<char>, std::__1::allocator<char> > const&) in  
image.o
   "rt::RGBColor::operator-(rt::RGBColor const&) const", referenced from:
       a2computeColor(rt::Ray const&) in a_cameras.o
       a1computeColor(unsigned int, unsigned int, unsigned int,  
unsigned int) in a_julia.o
   "rt::RGBColor::operator+(rt::RGBColor const&) const", referenced from:
       a2computeColor(rt::Ray const&) in a_cameras.o
       a1computeColor(unsigned int, unsigned int, unsigned int,  
unsigned int) in a_julia.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see  
invocation)
make: *** [cgrayd] Error 1



More information about the Cg1 mailing list