dilevin / computer-graphics-csc317

Course Page for Computer Graphics course
130 stars 26 forks source link

A2 make issue #1

Closed WyattLiu closed 5 years ago

WyattLiu commented 5 years ago

Hi,

We don't have issue button in A2 so please allow me to put it here.

The issue is that we cannot compile without the shared dir and I managed to pull that off using the original repo back in months ago.

It can compile in this fashion. Just added a shared/ please consider fix for the class https://github.com/WyattLiu/CSC418FixA2/tree/master/computer-graphics-ray-casting

ACalza commented 5 years ago

Does your project make? I spent a couple of hours reading up on cmake since Eigen had issues being built. I finally got around to build, but now it doesn't make.

I also had to include the json.hpp from https://github.com/nlohmann/json in /include directory. The cmake used:

project(raycasting)

set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake)

# create executable
include(CheckCXXCompilerFlag)

CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)
CHECK_CXX_COMPILER_FLAG("-std=c++0x" COMPILER_SUPPORTS_CXX0X)
if(COMPILER_SUPPORTS_CXX0X)
    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
elseif(COMPILER_SUPPORTS_CXX11)
    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
else()
        message(STATUS "The compiler ${CMAKE_CXX_COMPILER} has no C++11 support. Please use a different C++ compiler.")
endif()

# Add your project files
include_directories("${CMAKE_CURRENT_SOURCE_DIR}/include/")

find_package(Eigen3 REQUIRED NO_MODULE)

add_executable(${PROJECT_NAME} "main.cpp" ${SRCFILES})
target_link_libraries (${PROJECT_NAME} Eigen3::Eigen)

target_link_libraries(${PROJECT_NAME})
dilevin commented 5 years ago

Please use the exact git command on the A2 repo. This will checkout a branch of the project with the shared directory

dilevin commented 5 years ago

Here’s the command:

git clone --recursive -b fix https://github.com/dilevin/computer-graphics-ray-casting.git

The A2 issues page is open now. Please move all comments about this there. We won’t respond to issues about A2 posted in the main page issues thread any more.