c++ - Compiling from Visual Studio 2012 to g++? -


i have c++ program compiled in visual studio 2012. contains boost library. now, want compile using g++ compiler. things must aware of? things silently break code in random places.

for example assuming long 4 bytes buy g++ treats 8 bytes. alone need changes.

and version of gcc use, 4.7.3, 4.6.4 or 4.8.2?

some of things have keep in mind. list not comprehensive things on top of mind when read question.

  1. pragma once : when using g++, should gaurd file inclusion using #ifndef, #define , #endif guards.

  2. header inclusion : vs 2012 lenient , not make fuss of forward or backward slash while including headers. g++ strict in enforcing them.

  3. if using win32 threads / mutex, best shift std::thread. if using boost threads, ok.

the version of gcc can use , away depends on usage of c++11 features. gcc ahead of microsoft in implementing c++11 features , should ok older version of gcc too. cannot answer question unless understand c++11 features using in code. safe more recent version of gcc surely support available in vs 2012.


Comments

Popular posts from this blog

java - WrongTypeOfReturnValue exception thrown when unit testing using mockito -

php - Magento - Deleted Base url key -

android - How to disable Button if EditText is empty ? -