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

can't build Cairo based samples on Linux #1815

Open
dsowa opened this issue Apr 11, 2017 · 3 comments · May be fixed by #2136
Open

can't build Cairo based samples on Linux #1815

dsowa opened this issue Apr 11, 2017 · 3 comments · May be fixed by #2136
Labels

Comments

@dsowa
Copy link

dsowa commented Apr 11, 2017

I'm new to the Cinder codebase so hopefully I'm not just missing something obvious.
I've built libcinder without any issues and now I'm going through the samples and some work, some don't.

In the case of the Cairo based sample CairoBasic you start with some simple missing include files and if you fix those then eventually you get

/home/blahh/github/Cinder/samples/CairoBasic/src/CairoBasicApp.cpp:115:29: error: no type named 'createWindowSurface' in namespace 'cinder::cairo'
        cairo::Context ctx( cairo::createWindowSurface() );     
                            ~~~~~~~^

and if you look in blocks/Cairo/src/Cairo.cpp you see the definition

#if defined( CINDER_MSW )
cairo::SurfaceGdi createWindowSurface()
{
	return cairo::SurfaceGdi( cinder::app::App::get()->getRenderer()->getDc() );
}
#elif defined( CINDER_MAC )
cairo::SurfaceQuartz createWindowSurface()
{
	auto cgContext = cinder::app::App::get()->getRenderer()->getCgContext();
	auto height = cinder::app::getWindowHeight();
	CGContextTranslateCTM( cgContext, 0.0, height );
	CGContextScaleCTM( cgContext, 1.0, -1.0 );
	return cairo::SurfaceQuartz( cgContext, cinder::app::getWindowWidth(), height );
}
#endif

There is no Linux definition for createWindowSurface()

I see that @ryanbartley has a big Cairo pull in the queue, does that fix this?

@rowet
Copy link

rowet commented Nov 9, 2018

Can confirm that building the samples on linux currently bombs out:

[ 48%] Building CXX object samples/CairoBasic/proj/cmake/CMakeFiles/CairoBasic.dir/__/__/src/CairoBasicApp.cpp.o
cd /var/tmp/CinderBuild/samples/CairoBasic/proj/cmake && /usr/bin/c++  -DCINDER_GL_CORE -DFT2_BUILD_LIBRARY -DFT_DEBUG_LEVEL_TRACE -D_GLFW_X11 -D_GLIBCXX_USE_CXX11_ABI=0 -D_UNIX -isystem /var/tmp/Cinder/include  -std=c++14  -g   -Wfatal-errors -std=c++14 -o CMakeFiles/CairoBasic.dir/__/__/src/CairoBasicApp.cpp.o -c /var/tmp/Cinder/samples/CairoBasic/src/CairoBasicApp.cpp
/var/tmp/Cinder/samples/CairoBasic/src/CairoBasicApp.cpp:6:10: fatal error: cinder/cairo/Cairo.h: No such file or directory
 #include "cinder/cairo/Cairo.h"
          ^~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [samples/CairoBasic/proj/cmake/CMakeFiles/CairoBasic.dir/build.make:66: samples/CairoBasic/proj/cmake/CMakeFiles/CairoBasic.dir/__/__/src/CairoBasicApp.cpp.o] Error 1

@3togo
Copy link

3togo commented Aug 3, 2019

@dsowa ,

after two years, there is still no cairo::SurfaceGdi createWindowSurface() for linux.
What a pity.

Eli

@baelamri
Copy link

Is there a createWindowSurface. Unfortunately, most of the samples I try to compile have an incomplete Linux interface (Capture, Cairo, ...)

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