0

I have a horrible time with C++ programming on Windows.

I can't link to Boost library.

Now, I am thinking about compiling my cpp programs in Ubuntu and run it on Windows.

Despite i586-mingw32msvc-g++ suggested here works for many people. It is not a good solution for me as it is older than C++11 and I cannot use it with boost library.

Is there any alternative method?

Community
  • 1
  • 1
ar2015
  • 5,558
  • 8
  • 53
  • 110
  • How would you test and run your program? You'll need Windows for that... – Basile Starynkevitch Jan 09 '16 at 08:05
  • @BasileStarynkevitch, I will run it on my other laptop which is running windows – ar2015 Jan 09 '16 at 08:06
  • Can't you code for Linux? – Basile Starynkevitch Jan 09 '16 at 08:06
  • 1
    You can use `i686-w64-mingw32-g++`, in Ubuntu trusty it is gcc version 4.8.4, and has quite good support for C++11. In Ubuntu Wily, it has gcc version 4.9.2, which is very good. Many people use this compiler successfully for windows, and you can target both 32 bit windows and 64 bit windows. You can run programs in wine also as preliminary, and then run them on windows later. – Chris Beck Jan 09 '16 at 08:07
  • 2
    You could test it using Wine, too. Still, I'd suggest you fix the linking problems on the native system, it's not like Boost is some kind of seldom-used, obscure backyard-library. – Ulrich Eckhardt Jan 09 '16 at 08:07
  • @BasileStarynkevitch, I wish but my other softwares are limiting me to windows. – ar2015 Jan 09 '16 at 08:07
  • 5
    This seems like a total [XY problem](http://meta.stackexchange.com/a/66378/166663) to me. Just fix your Boost issues on Windows, building Boost is about as trivial as it gets unless you want to do PGO/LTCG. – ildjarn Jan 09 '16 at 08:23
  • @ildjarn It worths trying. However after a few weeks trying, i am under pressure of time – ar2015 Jan 09 '16 at 08:25
  • Why would it simplify things to add an extra complication? – Cheers and hth. - Alf Jan 09 '16 at 08:29
  • @ar2015 Why don't you post a question about your Boost issues? – molbdnilo Jan 09 '16 at 09:03
  • @molbdnilo do you have any idea about this problem? [link](http://stackoverflow.com/questions/34690733/c) – ar2015 Jan 09 '16 at 09:45

1 Answers1

2
sudo apt-get install g++-mingw-w64-i686
sudo apt-get install libc6-dev-i386
ar2015
  • 5,558
  • 8
  • 53
  • 110