Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmake fails to find io2d package #1

Closed
rwxdash opened this issue May 2, 2019 · 74 comments
Closed

cmake fails to find io2d package #1

rwxdash opened this issue May 2, 2019 · 74 comments

Comments

@rwxdash
Copy link

rwxdash commented May 2, 2019

OS: MacOS Mojave 10.14.4
CMake Version: 3.14.3
GNU Make: 3.81


See the full log: https://gist.github.com/aoozdemir/f770ec818bb9dc446722cd05f005b9ea

Error log after running cmake ..:

➜  io2d git:(master) ✗ cmake .
TESTING = notest
-- The C compiler identification is AppleClang 10.0.1.10010046
-- The CXX compiler identification is AppleClang 10.0.1.10010046
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++
-- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at CMakeLists.txt:27 (find_package):
  By not providing "Findio2d.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "io2d", but
  CMake did not find one.

  Could not find a package configuration file provided by "io2d" with any of
  the following names:

    io2dConfig.cmake
    io2d-config.cmake

  Add the installation prefix of "io2d" to CMAKE_PREFIX_PATH or set
  "io2d_DIR" to a directory containing one of the above files.  If "io2d"
  provides a separate development package or SDK, be sure it has been
  installed.


-- Configuring incomplete, errors occurred!
See also "/Users/oz/Desktop/workspace/cpp/io2d/CMakeFiles/CMakeOutput.log".
@rwxdash
Copy link
Author

rwxdash commented May 2, 2019

An update, if anyone sees this. Issue resolved by following the steps here, https://github.com/cpp-io2d/P0267_RefImpl/blob/master/BUILDING.md

Make sure to do this first, https://github.com/cpp-io2d/P0267_RefImpl/blob/master/BUILDING.md#xcode-and-libc

A small trick is to edit the CMakeLists.txt under P0267_RefImpl and comment out the part with samples. Then, using CoreGraphics/Mac on macOS run "ALL_Build" and "install" in XCode.

Thanks to Benjamin H. in our classroom for the detail explanation.

@rwxdash rwxdash closed this as completed May 2, 2019
@jiankang1991
Copy link

@aoozdemir Hi I also meet such problem in Ubuntu. After I built the P0267_RefImpl, what else should I do to let io2d be found? Should I change something in the CMAKE file of CppND-Route-Planning-Project?

@rwxdash
Copy link
Author

rwxdash commented May 3, 2019

@karlTUM hi! I didn't change anything in the CMAKE of this project. But, perhaps after this build, https://github.com/cpp-io2d/P0267_RefImpl/blob/master/BUILDING.md#cairoxlib-on-linux, you can try to run make in the folder where cmake built the io2d.

I'm not sure how to install on ubuntu I'm afraid.

@jiankang1991
Copy link

@aoozdemir Thank you. I installed P0267_RefImpl as root and it worked. But I have come across anoterh problem:

CMake Error at test/CMakeLists.txt:25 (add_executable):
  add_executable called with incorrect number of arguments


CMake Error at test/CMakeLists.txt:28 (target_link_libraries):
  Cannot specify link libraries for target "test" which is not built by this
  project.


-- Configuring incomplete, errors occurred!
See also "/home/kang/Documents/cpp/cpp_eng/CppND-Route-Planning-Project/build/CMakeFiles/CMakeOutput.log".

Did you have this problem?

@rwxdash
Copy link
Author

rwxdash commented May 3, 2019

@karlTUM nice. I didn't get this error, no. Perhaps, ask in the classroom too. It's possible someone already came across to this.

@adreena
Copy link

adreena commented May 24, 2019

I'm trying to follow the instructions what's the next step after opening io2d.xcodeproj? my Xcode throws error on this library "cstddef"

@Horki
Copy link

Horki commented Jul 16, 2019

Any solution for arch linux, besides VM

@lakshman64
Copy link

lakshman64 commented Jul 16, 2019 via email

@bander-saeed94
Copy link

This issue should not be closed. I am trying to setup with an ubuntu container after trying with my mac.
The short solution to upload a Docker image for the project. I am trying but this whole week with no success.

@pbdevpros
Copy link

I agree. I am having the same issues, after trying to build the project. There's little documentation listed with the CppND-Route-Planning-Project on how to build the project.

I managed to get around the io2d cmake build problem by following the above instructions and then using a load of hacky workarounds, but now I cannot run make as the io2d headers can't be found. It would be helpful to have more guidance here.

@bander-saeed94
Copy link

@aoozdemir
Please open the issue since it is not yet resolved.

@rwxdash rwxdash reopened this Aug 10, 2019
@suljaxm
Copy link

suljaxm commented Aug 13, 2019

install IO2D

sudo apt update
sudo apt install build-essential
sudo apt install cmake
sudo apt install libcairo2-dev
sudo apt install libgraphicsmagick1-dev
sudo apt install libpng-dev

git clone --recurse-submodules https://github.com/cpp-io2d/P0267_RefImpl
cd P0267_RefImpl
mkdir Debug
cd Debug
cmake --config Debug "-DCMAKE_BUILD_TYPE=Debug" ..
cmake --build .
sudo make install

@baoqger
Copy link

baoqger commented Aug 25, 2019

I am using windows system. If a docker image for this project is provided, it will be great.

@baoqger
Copy link

baoqger commented Aug 29, 2019

@aoozdemir Hi I also meet such problem in Ubuntu. After I built the P0267_RefImpl, what else should I do to let io2d be found? Should I change something in the CMAKE file of CppND-Route-Planning-Project?

I used a ubuntu docker image, but fail to build. Can you share more information? Or just follow the doc working for you.

@baoqger
Copy link

baoqger commented Aug 29, 2019

An update, if anyone sees this. Issue resolved by following the steps here, https://github.com/cpp-io2d/P0267_RefImpl/blob/master/BUILDING.md

Make sure to do this first, https://github.com/cpp-io2d/P0267_RefImpl/blob/master/BUILDING.md#xcode-and-libc

A small trick is to edit the CMakeLists.txt under P0267_RefImpl and comment out the part with samples. Then, using CoreGraphics/Mac on macOS run "ALL_Build" and "install" in XCode.

Thanks to Benjamin H. in our classroom for the detail explanation.

"comment out the part with samples", this means what? Can you give more details. Thank you

@rwxdash
Copy link
Author

rwxdash commented Aug 29, 2019

An update, if anyone sees this. Issue resolved by following the steps here, https://github.com/cpp-io2d/P0267_RefImpl/blob/master/BUILDING.md
Make sure to do this first, https://github.com/cpp-io2d/P0267_RefImpl/blob/master/BUILDING.md#xcode-and-libc
A small trick is to edit the CMakeLists.txt under P0267_RefImpl and comment out the part with samples. Then, using CoreGraphics/Mac on macOS run "ALL_Build" and "install" in XCode.
Thanks to Benjamin H. in our classroom for the detail explanation.

"comment out the part with samples", this means what? Can you give more details. Thank you

If I recall correctly, I meant this.
under P0267_RefImpl comment out the part with samples
https://github.com/cpp-io2d/P0267_RefImpl/blob/master/CMakeLists.txt#L38-L40

@AGistinger
Copy link

Does anyone have a workaround for windows I am also getting the errors where IO2D is missing header files and cannot be found within the project?

@z1yuan
Copy link

z1yuan commented Oct 22, 2019

I just met the exactly the same error on my ubuntu.

Could not find a package configuration file provided by "io2d" with any of
the following names:

io2dConfig.cmake
io2d-config.cmake

and after some experiments i find out that it is because the CMake find_package will not be able to find "io2d". So just we need to git clone io2d into /opt/c++ for example, and follow the install instruction. After this everything goes well in my case.

@Shivam-Bhardwaj
Copy link

After
cmake --build . during installation of IO2D
add
sudo make install

this will copy the necessary files at places where Cmake can find them.

@AbdSam94
Copy link

AbdSam94 commented Jan 8, 2020

I'm having a hard time building CppND-Route-Planning-Project as it can't find the IO2dconfig.cmake files.
I tried to add the command make install after the build (in the debug directory) but apperently it didn't find a makefile.

@ChangZhu1997
Copy link

After
cmake --build . during installation of IO2D
add
sudo make install

this will copy the necessary files at places where Cmake can find them.

This is a solution for Ubuntu Linux. I have successfully tried it.

@AbdSam94
Copy link

AbdSam94 commented Jan 9, 2020

unfortunately I'm working on wndiows

@ChangZhu1997
Copy link

unfortunately I'm working on wndiows

Why use windows such a broken OS, come to use Linux :)

@AbdSam94
Copy link

unfortunately I'm working on wndiows

Why use windows such a broken OS, come to use Linux :)

I will eventually ;)

@toaderandrei
Copy link

toaderandrei commented Mar 3, 2020

An update, if anyone sees this. Issue resolved by following the steps here, https://github.com/cpp-io2d/P0267_RefImpl/blob/master/BUILDING.md
Make sure to do this first, https://github.com/cpp-io2d/P0267_RefImpl/blob/master/BUILDING.md#xcode-and-libc
A small trick is to edit the CMakeLists.txt under P0267_RefImpl and comment out the part with samples. Then, using CoreGraphics/Mac on macOS run "ALL_Build" and "install" in XCode.
Thanks to Benjamin H. in our classroom for the detail explanation.

"comment out the part with samples", this means what? Can you give more details. Thank you

If I recall correctly, I meant this.
under P0267_RefImpl comment out the part with samples
https://github.com/cpp-io2d/P0267_RefImpl/blob/master/CMakeLists.txt#L38-L40

For one that does not have enough exp in working with cmake/make building this thing it is not easy. I think a bit more help and documentation is required.

@ssvaddiparthy
Copy link

Hello Anyone from the future: Here is a detailed wiki for fixing the same:
https://t.co/CljjTK2aws?amp=1

@Horki
Copy link

Horki commented Mar 18, 2020

Hello Anyone from the future: Here is a detailed wiki for fixing the same:
https://t.co/CljjTK2aws?amp=1

Nice post, you could also install GTest and pugiXML via Conan
Also you could see my solution

@ssvaddiparthy
Copy link

@Horki thanks for introducing Conan to me. I did not hear of it till now. Will surely take a look.

@nishinkvasu
Copy link

Hi @azzamshaikh ,

I installed the io2d through the vcpkg and used the following command so that it is identified by cmake.
cmake -DCMAKE_TOOLCHAIN_FILE=path to buildsystems\vcpkg.cmake ..

Was able to create a MSVC project this way.

@Banacial
Copy link

So what now about solving this on Windows ?
I don't know at all what i should do now, as of now i do not even know whether this magical io2d thing is P0267_Reflmpl by any chance. I went through the installation guidline outlined in BUILDING.md but cannot make sense of the General Notes (just followed the Cairo/win32 ) and am now stuck on the ususal:

Could not find a package configuration file provided by "io2d" with any of
the following names:

io2dConfig.cmake
io2d-config.cmake 

error. Additionally i dont know how to make sense of this instruction:

I kind of got it running in windows.. vcpkg can install io2d, it compiles the other libraries as x86 and then used CMAKE_PREFIX_TOOLCHAIN to point to the vcpkg cmake script.. it created a MSVC project.. but I think that is not what they expect... was not able to build io2d myself such that CMake finds it

or this:

I installed the io2d through the vcpkg and used the following command so that it is identified by cmake.
cmake -DCMAKE_TOOLCHAIN_FILE=path to buildsystems\vcpkg.cmake ..

since doesn't seem to exist.

@PavanproJack
Copy link

I am using a mac and got it up and running locally yesterday.

I documented the steps here if that is any use to anyone.

Next step, get it up and running in Xcode so that I can see what the OSM data looks like when loaded. Wish me luck!

Many Thanks. This helped a lot saving my time. Perfect documentation in fact.

@SchneiderJs
Copy link

After
cmake --build . during installation of IO2D
add
sudo make install

this will copy the necessary files at places where Cmake can find them.

Thanks, that worked for me!

@charity1475
Copy link

When i reach this step i get an error.
cmake --build .

            from /home/charity/UAD/P0267_RefImpl/P0267_RefImpl/Samples/svg/svg.cpp:5:

/home/charity/UAD/P0267_RefImpl/P0267_RefImpl/Samples/svg/external/svgpp/include/svgpp/policy/value_events.hpp:23:5: note: candidate expects 2 arguments, 3 provided
23 | context.set(tag, args...);
| ^~~~~~~
make[2]: *** [P0267_RefImpl/Samples/svg/CMakeFiles/svg.dir/build.make:76: P0267_RefImpl/Samples/svg/CMakeFiles/svg.dir/svg.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:677: P0267_RefImpl/Samples/svg/CMakeFiles/svg.dir/all] Error 2
make: *** [Makefile:141: all] Error 2

@yyccphus
Copy link

yyccphus commented Apr 7, 2021

install IO2D

sudo apt update
sudo apt install build-essential
sudo apt install cmake
sudo apt install libcairo2-dev
sudo apt install libgraphicsmagick1-dev
sudo apt install libpng-dev

git clone --recurse-submodules https://github.com/cpp-io2d/P0267_RefImpl
cd P0267_RefImpl
mkdir Debug
cd Debug
cmake --config Debug "-DCMAKE_BUILD_TYPE=Debug" ..
cmake --build .
sudo make install

"cmake --config Debug "-DCMAKE_BUILD_TYPE=Debug" .. " seems doesn't work, since it tells me "CMake Error: Unknown argument --config"

@charity1475
Copy link

I changed something and it worked for me
cmake --config Debug "-DCMAKE_BUILD_TYPE=Debug" ..
cmake ..
make
sudo make install

@yyccphus
Copy link

yyccphus commented Apr 7, 2021

I changed something and it worked for me
cmake --config Debug "-DCMAKE_BUILD_TYPE=Debug" ..
cmake ..
make
sudo make install

Thanks, it worked for me, too.

@timgrein
Copy link

install IO2D

sudo apt update
sudo apt install build-essential
sudo apt install cmake
sudo apt install libcairo2-dev
sudo apt install libgraphicsmagick1-dev
sudo apt install libpng-dev

git clone --recurse-submodules https://github.com/cpp-io2d/P0267_RefImpl
cd P0267_RefImpl
mkdir Debug
cd Debug
cmake --config Debug "-DCMAKE_BUILD_TYPE=Debug" ..
cmake --build .
sudo make install

I managed to get it working under windows with the following steps:

@aaronespasa
Copy link

aaronespasa commented May 27, 2021

I have followed the steps of this tutorial: Readme for the installation of IO2d in MacOS

At the time of running the command ./OSM_A_star_search, I get the following error:
Assertion failed: (back_buffer_size.width >= 1. && back_buffer_size.height >= 1. && display_buffer_size.width >= 1. && display_buffer_size.height >= 1.), function _ScaledBackBufferRect, file /Users/aaron/Documents/github/CppND-Route-Planning-Project/thirdparty/P0267_RefImpl/P0267_RefImpl/P0267_RefImpl/coregraphics/xio2d_cg_display.cpp, line 9.

The line 9 of that file is:
assert(back_buffer_size.width >= 1. && back_buffer_size.height >= 1. && display_buffer_size.width >= 1. && display_buffer_size.height >= 1. );

And the problem is that both display_buffer_size.width and display_buffer_size.height are 1.

If I comment those lines, IO2D executes a blank window:
Screenshot 2021-05-27 at 12 25 32

I'm currently using macOS Big Sur with the chip M1.

@tensory
Copy link

tensory commented Jul 22, 2021

I got IO2D installed on OSX using Xcode and MacPorts. I'm going to leave my environment variables here. Hope it helps someone.

Details:

  1. Name the variable CXXFLAGS, not CPPFLAGS
  2. The -nostdinc++ flag is from this part of the IO2D Readme.
  3. The -I/Applications/Xcode-12.4.app/... flag resolves a problem where Cmake cannot find X11 headers: 'X11/Xlib.h' file not found
    If you aren't getting that error, you might not need this flag. Note the -I before the path. That Xcode path is specific to my machine; your path will be different. Xcode is in Xcode.app/ unless you've renamed it. I got the idea from this GitHub issue.
  4. The -isystem/opt/X11/include and related flags are from IO2D Readme. See where they concatenated the flags to a prior $CXXFLAGS? I chose to put it all in one CXXFLAGS value.
  5. Don't forget to also define $LDFLAGS, also in the IO2D Readme.
~/Development/cppnano/P0267_RefImpl/Debug % echo $CXXFLAGS
-nostdinc++ -isystem/Users/ari.lacenski/Development/cppnano/RoutePlanningProject-Dependencies/clang+llvm-6.0.0-x86_64-apple-darwin/include/c++/v1 -I/Applications/Xcode-12.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers/X11 -isystem/opt/X11/include -isystem/opt/local/include -isystem/usr/local/include

~/Development/cppnano/P0267_RefImpl/Debug % echo $LDFLAGS
-L/Users/ari.lacenski/Development/cppnano/RoutePlanningProject-Dependencies/clang+llvm-6.0.0-x86_64-apple-darwin/lib -Wl,-rpath,/Users/ari.lacenski/Development/cppnano/RoutePlanningProject-Dependencies/clang+llvm-6.0.0-x86_64-apple-darwin/lib

@bhavikmk
Copy link

install IO2D

sudo apt update
sudo apt install build-essential
sudo apt install cmake
sudo apt install libcairo2-dev
sudo apt install libgraphicsmagick1-dev
sudo apt install libpng-dev

git clone --recurse-submodules https://github.com/cpp-io2d/P0267_RefImpl
cd P0267_RefImpl
mkdir Debug
cd Debug
cmake --config Debug "-DCMAKE_BUILD_TYPE=Debug" ..
cmake --build .

In which directory to clone ?

@Rank-N-Tensor
Copy link

@bhavikkasundra55 did you install it in the cloned route planner folder or separately?

@Rank-N-Tensor
Copy link

I changed something and it worked for me
cmake --config Debug "-DCMAKE_BUILD_TYPE=Debug" ..
cmake ..
make
sudo make install

@charity1475 , i tried this , make throws the same error again? do you have a workaround? also, did you install this in the route planner folder or separately?

@bhavikmk
Copy link

@bhavikkasundra55 did you install it in the cloned route planner folder or separately?

I did it separately,
Did i have to clone io2D repository in cpp-route-planner directory?

@Rank-N-Tensor
Copy link

No , you didn't. The issue on linux has to do with the version of the svgpp submodule. Check issue #136 for more information.

@nstucki
Copy link

nstucki commented Oct 23, 2021

I have followed the steps of this tutorial: Readme for the installation of IO2d in MacOS

At the time of running the command ./OSM_A_star_search, I get the following error: Assertion failed: (back_buffer_size.width >= 1. && back_buffer_size.height >= 1. && display_buffer_size.width >= 1. && display_buffer_size.height >= 1.), function _ScaledBackBufferRect, file /Users/aaron/Documents/github/CppND-Route-Planning-Project/thirdparty/P0267_RefImpl/P0267_RefImpl/P0267_RefImpl/coregraphics/xio2d_cg_display.cpp, line 9.

The line 9 of that file is: assert(back_buffer_size.width >= 1. && back_buffer_size.height >= 1. && display_buffer_size.width >= 1. && display_buffer_size.height >= 1. );

And the problem is that both display_buffer_size.width and display_buffer_size.height are 1.

If I comment those lines, IO2D executes a blank window: Screenshot 2021-05-27 at 12 25 32

I'm currently using macOS Big Sur with the chip M1.

I encountered the same issue. Have you been able to solve it? @aaronespasa

@kaipomauli
Copy link

Wow, what a journey to get the test and empty project build locally on my Windows machine. But that's why we are taking this course right, to learn about those kind of headaches and come away stronger! :P
So for those having the issue in windows, after building the io2d in visual studio, build the "install" project.
The neccessary library and include files will be saved in C/Program Files x86/io2d.
Inside the library folder, there will be cmake files which you can refer to when asked for the io2d directory in CMake.
However, the installation of IO2D with CMake is messy and keeps the same names and target folder for debug and release libraries. I wanted both so I built with each configuration successively then moved into release and debug folders. I then modified the .cmake config files to refer to the new structure.
Please find attached my new install structure I use in my successfully built project.
The next issue I encountered was the fact that my gtest_main was being built statically while the rest of the project is built dynamically. You need to set the option 'gtest_force_shared_crt' or something option ON in CMAKE, then the test can be built without an issue.
Now the real programming fun start
io2d.zip
s!

@Seim2k17
Copy link

Seim2k17 commented Nov 3, 2021

something and

Hey charity1475 / yyccphus ,
what exactly did you change ?

@Seim2k17
Copy link

Seim2k17 commented Nov 3, 2021

i redid the whole process and it worked for me with the following steps:

  1. removed the whole local copy of the repository
    sudo rm -fr P0267_RefImpl/

  2. clone the repo again
    git clone --recurse-submodules https://github.com/cpp-io2d/P0267_RefImpl

  3. make debug dir
    mkdir Debug

  4. goto dir
    cd Debug

  5. i have cmake 3.2x and the --config option is no more available so i only did
    cmake ..

  6. then build the project
    cmake --build .

@Seim2k17
Copy link

Seim2k17 commented Nov 3, 2021

what confuses me and i didn't looked at it exactly - there are two repositories!

  1. the io2d library
  2. the routerplannerproject
    So after doing the stuff from my last command one still need to compile the project and then we have an executable.
    also see here carefully: https://gist.github.com/wAuner/68ee426b87d297340826660f5ac62b79

@lederle
Copy link

lederle commented Jan 25, 2022

No , you didn't. The issue on linux has to do with the version of the svgpp submodule. Check issue #136 for more information.

I can confirm this, on Ubuntu 20.04 I had to update svgpp to the 1.3.0 tag in the svgpp submodule to get io2d to build. Issue #136 refers to the io2d issue where this was raised.

For some reason the HEAD in the svgpp submodule is detached at commit a33934a, which is prior to the v1.3.0 fix. Once you checkout the fix, io2d will build (assuming you were stuck on the svgpp issue).

Do:
cd P0267_RefImpl/P0267_RefImpl/Samples/svg/external/svgpp
git checkout tags/v1.3.0

You can git checkout master as well, it is a few commits ahead of v1.3.0.

@Aadi775
Copy link

Aadi775 commented Feb 24, 2022

Whenever i reach 66% in cmake .. i get these errors

/home/aadi/P0267_RefImpl/P0267_RefImpl/Samples/svg/svg.cpp:231:10: note: candidate expects 2 arguments, 3 provided make[2]: *** [P0267_RefImpl/Samples/svg/CMakeFiles/svg.dir/build.make:90: P0267_RefImpl/Samples/svg/CMakeFiles/svg.dir/svg.cpp.o] Error 1 make[1]: *** [CMakeFiles/Makefile2:631: P0267_RefImpl/Samples/svg/CMakeFiles/svg.dir/all] Error 2 make: *** [Makefile:146: all] Error 2

@jonna-t1
Copy link

Where do you clone io2d or does it not matter?
"clone --recurse-submodules https://github.com/cpp-io2d/P0267_RefImpl"

@stevendae
Copy link

Commenting out Line 38 to 30 in the CMakeLists.txt file gets rid of the errors in installing the sample and lets you proceed with the rest of the build.

This is on Ubuntu 20.04.

@Shyam-NR
Copy link

Where do you clone io2d or does it not matter? "clone --recurse-submodules https://github.com/cpp-io2d/P0267_RefImpl"

Yeah it does matter and clone it into the third-party folder

tmambrose added a commit to tmambrose/CppND-Route-Planning-Project that referenced this issue Sep 30, 2023
Add simple solution for TODO udacity#1
@PatrickGono
Copy link

PatrickGono commented Oct 11, 2023

I managed to finally get it running* on windows.

  1. Install vcpkg and the required packaged as per the instructions here
  2. To install io2d, follow the rest of the instructions, but instead of the listed command:
    cmake -G "Visual Studio 15 2017 Win64" --config Debug "-DCMAKE_BUILD_TYPE=Debug" "-DCMAKE_TOOLCHAIN_FILE=c:/tools/vcpkg/scripts/buildsystems/vcpkg.cmake" "-DVCPKG_TARGET_TRIPLET=x64-windows" ../.
    you should run:
    cmake.exe -G "Visual Studio 17 2022" "-DCMAKE_BUILD_TYPE=Debug" "-DCMAKE_TOOLCHAIN_FILE=C:\tools\vcpkg\scripts\buildsystems\vcpkg.cmake" "-DVCPKG_TARGET_TRIPLET=x64-windows" "-DCHARSET_LIB=C:\tools\vcpkg\installed\x64-windows\debug\lib\charset.lib" "-DEXPAT_LIB=C:\tools\vcpkg\packages\expat_x64-windows\debug\lib\libexpat.lib" "-DICONV_LIB=C:\tools\vcpkg\installed\x64-windows\debug\lib\iconv.lib" ../. (i.e. remove --config Debug and manually set paths to the relevant packages).
  3. This should create a io2d.sln file in the current folder. Open it with Visual Studio with admin privileges (if your Program Files (x86) folder is protected), and select Build->Build solution
  4. Once built, rightlick on the INSTALL project in the solution explorer (in the side panel, usually), and click Build.
  5. You should now have an io2d folder in your Program Files (x86).
  6. Go to the CppND-Route-Planning-Project folder, create a Build folder, enter it.
  7. Run
    cmake ../. -DCMAKE_TOOLCHAIN_FILE=C:/tools/vcpkg/scripts/buildsystems/vcpkg.cmake -DPKG_CONFIG_EXECUTABLE=C:/tools/vcpkg/packages/pkgconf_x64-windows/tools/pkgconf/pkgconf.exe -DCAIRO_LIBRARIES=C:/tools/vcpkg/installed/x64-windows/lib -DGRAPHICSMAGICK_LIBRARIES=C:/tools/vcpkg/installed/x64-windows/lib -DCAIRO_INCLUDE_DIRS=C:/tools/vcpkg/installed/x64-windows/include/cairo -DGRAPHICSMAGICK_INCLUDE_DIRS=C:/tools/vcpkg/installed/x64-windows/include/magick
  8. Open the built OSM_A_star_search.sln file in Visual Studio. When you build this project, it should fail with code-relevant errors, such as functions not returning the specified value
  9. *For me it didn't (still missing some path to a lib), so I gave up, and decided to finish this one in the web workspace udacity provides

@akshaypatel774
Copy link

I am using windows system. If a docker image for this project is provided, it will be great.

Did you get it working in windows or not?

@felixhoernle
Copy link

I have followed the steps of this tutorial: Readme for the installation of IO2d in MacOS

At the time of running the command ./OSM_A_star_search, I get the following error: Assertion failed: (back_buffer_size.width >= 1. && back_buffer_size.height >= 1. && display_buffer_size.width >= 1. && display_buffer_size.height >= 1.), function _ScaledBackBufferRect, file /Users/aaron/Documents/github/CppND-Route-Planning-Project/thirdparty/P0267_RefImpl/P0267_RefImpl/P0267_RefImpl/coregraphics/xio2d_cg_display.cpp, line 9.

The line 9 of that file is: assert(back_buffer_size.width >= 1. && back_buffer_size.height >= 1. && display_buffer_size.width >= 1. && display_buffer_size.height >= 1. );

And the problem is that both display_buffer_size.width and display_buffer_size.height are 1.

If I comment those lines, IO2D executes a blank window: Screenshot 2021-05-27 at 12 25 32

I'm currently using macOS Big Sur with the chip M1.

I have the same issue using macOS Sonoma with M2 chip and not been able to solve it so far.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests