[Cg1] Re: Failed Make Linux 2

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


Sure
Thanks. My bad. Didn't notice the stubs were missing for the interfaces.

Best
Chitra
Quoting Arsène Pérard-Gayot <perard at cg.uni-saarland.de>:

> Hello,
>
> Please read the assignment sheet carefully:
>
> "We are providing merely an interface for the basic framework.
> Your job is to provide an implementation as well as to extend it to  
> your needs."
>
> These undefined references are what you are supposed to implement!
> They are linker errors, meaning the compiler cannot find an  
> implementation for the given function.
> For each of those, you should write an implementation in a .cpp file  
> (e.g. renderer.cpp for the functions defined in renderer.h).
>
> This is basic C++ or C knowledge. The first assignment is relatively  
> easy. If you find it too hard to implement this functionality, you  
> should maybe take a C++ course (or borrow a C++ book) and team up  
> with another student. Remember: groups of two students are allowed  
> (only two).
>
> Best regards,
>   Arsène Pérard-Gayot
>
> Quoting Chitra Singh <s8chsing at stud.uni-saarland.de>:
>
>> 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
>>
>> _______________________________________________
>> Cg1 mailing list
>> Cg1 at cg.uni-saarland.de
>> http://mail.cg.uni-saarland.de/mailman/listinfo/cg1
>
>
>
> _______________________________________________
> Cg1 mailing list
> Cg1 at cg.uni-saarland.de
> http://mail.cg.uni-saarland.de/mailman/listinfo/cg1





More information about the Cg1 mailing list