[CONC-174] unable to compile with /MD flag instead of /MT Created: 2016-04-18 Updated: 2016-04-18 |
|
| Status: | Open |
| Project: | MariaDB Connector/C |
| Component/s: | None |
| Affects Version/s: | 2.2.2, 2.2.3 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major |
| Reporter: | Andy Li | Assignee: | Georg Richter |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Description |
|
Since revision 97, the CMake file forced the use of /MT instead of /MD. What's the reason for that? It causes problem when I link the static lib to my program:
According to this SO question, using /MD seems to be the best practice. If you prefer /MT for whatever reason, there should be at least a way for users to change it back to /MD (e.g. add an option(USE_MD ...)). It is currently not easy since the CMakelists.txt uses "set(... FORCE)" which will overwrite any user changes of the CMAKE_C_FLAGS_*. My current solution is to patch the CMakelists.txt manually before compiling it. |