Closed more10-sundsvall closed 5 years ago
Adding a few compiler options did the trick, adding -O2 was the key:
cmake .. -DHinnantDate_ROOT_DIR=/cygdrive/c/git/sqlpp11/build/../../date -DCMAKE_CXX_FLAGS="${CMAKE_CXX_FLAGS} -Wa,-mbig-obj -O2"
I found the flags in these links on google: http://stackoverflow.com/questions/14125007/gcc-string-table-overflow-error-during-compilation http://stackoverflow.com/questions/16596876/object-file-has-too-many-sections
Thanks for experimenting with that!
So if you omit the -O2
, you get the compile error above? That's a surprise...
Correct. There is a thorough analysis of the error in the first link. From the top of my head there is a limitation in the COFF format. Optimization using -O2 will conserve resources. An option is to split the Select.cpp file into smaller pieces.
Better tests are going onto the wish list I am currently compiling. I would assume they will become smaller and easier to digest for cygwin...
Closing this one.
cmake is pretty new to me. I am not that familiar with gcc either :-)
In git bash:
In cygwin: