开发者

How do I use cygwin to cross compile to linux, when I have an application that needs libX11.so, libGL.so, and libGLU.so?

开发者 https://www.devze.com 2022-12-19 03:52 出处:网络
Will I have to use the crosstool that cygwin provides to make the libX11.so, libGL.so, and libGLU.so libraries using their respective source code? Or do you know where I can find them compiled already

Will I have to use the crosstool that cygwin provides to make the libX11.so, libGL.so, and libGLU.so libraries using their respective source code? Or do you know where I can find them compiled already for crosstool (I'm new to this cross compilation)?

Just for clarification: I'm on a windows 7 开发者_运维知识库machine trying to get my application also to compile for linux systems by using cygwin's cross compilation. The application uses OpenGL. Thanks


To cross-compile for Linux you should install the needed development libs and headers on a linux box[1] and then copy /usr/lib and /usr/include your cygwin environment (e.g. /crosscompiler/linux/...). When you build the cross compiler in cygwin, tell it where those native linux headers and libs are so they'll be used when you compile your app.

[1] If you're looking to run on a wide variety of linux boxes make sure you pick an older linux distro (e.g. Red Hat 9) to ensure your app doesn't have dependencies on very new glibc, etc..


Why do you want to use Cygwin?

There is instructions on the OpenGL Wiki about how to use OpenGL on Windows using MinGW.

MinGW use the same GNU tools that are available on Linux (GCC, GDB, GMAKE, etc.) but produce Windows native executables. So, you shouldn't have trouble compiling your source code on both platforms.


I just ended up building on a native Linux machine.

0

精彩评论

暂无评论...
验证码 换一张
取 消