Original Post
Hi guys, I am attempting to follow the book "Ray Tracing From The Ground Up" in an attempt to make my own ray tracer and am now in Chapter 3 where we are to make a skeleton ray tracer given some code snippets and utility files. Unfortunately I get the following errors upon attempting to build the project in Visual Studio 2008: 1>------ Build started: Project: RayTracingv2, Configuration: Debug Win32 ------ 1>Compiling... 1>Matrix.cpp 1>Normal.cpp 1>Point3D.cpp 1>RGBColor.cpp 1>c:\users\spacemonkey49\documents\visual studio 2008\projects\raytracingv2\raytracingv2\rgbcolor.h(142) : warning C4244: 'return' : conversion from 'double' to 'float', possible loss of data 1>Tracer.cpp 1>c:\users\spacemonkey49\documents\visual studio 2008\projects\raytracingv2\raytracingv2\rgbcolor.h(142) : warning C4244: 'return' : conversion from 'double' to 'float', possible loss of data 1>c:\users\spacemonkey49\documents\visual studio 2008\projects\raytracingv2\raytracingv2\constants.h(20) : warning C4305: 'initializing' : truncation from 'double' to 'const float' 1>Vector3D.cpp 1>World.cpp 1>c:\users\spacemonkey49\documents\visual studio 2008\projects\raytracingv2\raytracingv2\viewplane.h(80) : warning C4244: '=' : conversion from 'double' to 'float', possible loss of data 1>c:\users\spacemonkey49\documents\visual studio 2008\projects\raytracingv2\raytracingv2\rgbcolor.h(142) : warning C4244: 'return' : conversion from 'double' to 'float', possible loss of data 1>c:\users\spacemonkey49\documents\visual studio 2008\projects\raytracingv2\raytracingv2\constants.h(20) : warning C4305: 'initializing' : truncation from 'double' to 'const float' 1>Generating Code... 1>Compiling manifest to resources... 1>Microsoft (R) Windows (R) Resource Compiler Version 6.1.6723.1 1>Copyright (C) Microsoft Corporation. All rights reserved. 1>Linking... 1>World.obj : error LNK2001: unresolved external symbol "private: static double const Sphere::kEpsilon" (?kEpsilon@Sphere@@0NB) 1>World.obj : error LNK2019: unresolved external symbol "public: void __thiscall Sphere::set_radius(double)" (?set_radius@Sphere@@QAEXN@Z) referenced in function "public: void __thiscall World::build(void)" (?build@World@@QAEXXZ) 1>World.obj : error LNK2019: unresolved external symbol "public: void __thiscall Sphere::set_center(class Point3D const &)" (?set_center@Sphere@@QAEXABVPoint3D@@@Z) referenced in function "public: void __thiscall World::build(void)" (?build@World@@QAEXXZ) 1>World.obj : error LNK2019: unresolved external symbol "public: __thiscall SingleSphere::SingleSphere(class World *)" (??0SingleSphere@@QAE@PAVWorld@@@Z) referenced in function "public: void __thiscall World::build(void)" (?build@World@@QAEXXZ) 1>World.obj : error LNK2019: unresolved external symbol "public: __thiscall Ray::~Ray(void)" (??1Ray@@QAE@XZ) referenced in function "public: void __thiscall World::render_scene(void)const " (?render_scene@World@@QBEXXZ) 1>World.obj : error LNK2019: unresolved external symbol "public: void __thiscall World::display_pixel(int,int,class RGBColor const &)const " (?display_pixel@World@@QBEXHHABVRGBColor@@@Z) referenced in function "public: void __thiscall World::render_scene(void)const " (?render_scene@World@@QBEXXZ) 1>World.obj : error LNK2019: unresolved external symbol "public: void __thiscall World::open_window(int,int)const " (?open_window@World@@QBEXHH@Z) referenced in function "public: void __thiscall World::render_scene(void)const " (?render_scene@World@@QBEXXZ) 1>World.obj : error LNK2019: unresolved external symbol "public: __thiscall Ray::Ray(void)" (??0Ray@@QAE@XZ) referenced in function "public: void __thiscall World::render_scene(void)const " (?render_scene@World@@QBEXXZ) 1>World.obj : error LNK2001: unresolved external symbol "private: static double const Plane::kEpsilon" (?kEpsilon@Plane@@0NB) 1>World.obj : error LNK2019: unresolved external symbol "public: __thiscall World::~World(void)" (??1World@@QAE@XZ) referenced in function _main 1>World.obj : error LNK2019: unresolved external symbol "public: __thiscall World::World(void)" (??0World@@QAE@XZ) referenced in function _main 1>C:\Users\Spacemonkey49\Documents\Visual Studio 2008\Projects\RayTracingv2\Debug\RayTracingv2.exe : fatal error LNK1120: 11 unresolved externals 1>Build log was saved at "file://c:\Users\Spacemonkey49\Documents\Visual Studio 2008\Projects\RayTracingv2\RayTracingv2\Debug\BuildLog.htm" 1>RayTracingv2 - 12 error(s), 6 warning(s) ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ========== And am unsure how to cope with these errors, I've looked in the MSDN knowledge base for what the link errors relate to and don't quite follow how they relate to the program at hand, any insight would be greatly appreciated. I've uploaded the project in RAR form for those would like to see what I am doing (you have to remove SingleSphere.h and Singlesphere.cpp from the project or else you will receive 23 errors). http://rapidshare.com/files/299590189/RayTracingv2.rar