0

I have a project written in gcc - bison -flex on Linux environment. All the project is implemented into a *.so file and is called from python-tkinter graphic surface. There is a need to run it on windows. However I'd avoid to install all the windows equivalent of gcc - bison -flex programs. Is it possible to force gcc IN LINUX ENVIRONMENT to compile WINDOWS DLL instead of *.so? It could make life easier to use the same technics as I do now: just do calls from python-tkinter graphic surface.

Steve
  • 55
  • 4

1 Answers1

3

You can, of course, cross-compile it. You'll need some packages installed, though. Your normal project would be able to build if you use the MINGW equivalent of GCC for the target architecture. Also, take a look at this: Manual for cross-compiling a C++ application from Linux to Windows? The linking can be kind of troublesome though, since it could come a time where softlinking fails due to versions. In that case you'll need to create some symbolic links to the correct version. The output of the compilation process should be with -o DYNAMIC-LIBRARIE-NAME.dll and of course use the -shared flag. Hope it gives you some pointers.. Regards.

Community
  • 1
  • 1
Debianita
  • 108
  • 1
  • 8