{"action":"created","issue":{"url":"https://api.github.com/repos/davisking/dlib/issues/1536","repository_url":"https://api.github.com/repos/davisking/dlib","labels_url":"https://api.github.com/repos/davisking/dlib/issues/1536/labels{/name}","comments_url":"https://api.github.com/repos/davisking/dlib/issues/1536/comments","events_url":"https://api.github.com/repos/davisking/dlib/issues/1536/events","html_url":"https://github.com/davisking/dlib/issues/1536","id":376573255,"node_id":"MDU6SXNzdWUzNzY1NzMyNTU=","number":1536,"title":"Can't get dlib to build with cpprestsdk","user":{"login":"xbukovcikova","id":6137873,"node_id":"MDQ6VXNlcjYxMzc4NzM=","avatar_url":"https://avatars1.githubusercontent.com/u/6137873?v=4","gravatar_id":"","url":"https://api.github.com/users/xbukovcikova","html_url":"https://github.com/xbukovcikova","followers_url":"https://api.github.com/users/xbukovcikova/followers","following_url":"https://api.github.com/users/xbukovcikova/following{/other_user}","gists_url":"https://api.github.com/users/xbukovcikova/gists{/gist_id}","starred_url":"https://api.github.com/users/xbukovcikova/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xbukovcikova/subscriptions","organizations_url":"https://api.github.com/users/xbukovcikova/orgs","repos_url":"https://api.github.com/users/xbukovcikova/repos","events_url":"https://api.github.com/users/xbukovcikova/events{/privacy}","received_events_url":"https://api.github.com/users/xbukovcikova/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-11-01T21:13:34Z","updated_at":"2018-12-02T09:00:10Z","closed_at":null,"author_association":"NONE","body":"Hello, \r\nI have been using the library with no problems until now, however recently I tried to add [cpprestsdk](https://github.com/Microsoft/cpprestsdk) to the project, because I need to build a REST service on top of some image processing and I am having troubles building the project - when \r\n`#include <dlib/image_io.h>`\r\nisn't included first, I get the following error:\r\n\r\n> 1>c:\\dlib-19.7\\dlib\\matrix/matrix.h(1218): error C2061: syntax error: identifier 'L'\r\n> 1>  c:\\dlib-19.7\\dlib\\matrix/matrix.h(1829): note: see reference to class template instantiation 'dlib::matrix<T,NR,NC,mm,l>' being compiled\r\n> 1>c:\\dlib-19.7\\dlib\\matrix/matrix.h(1218): error C2059: syntax error: ')'\r\n> 1>c:\\dlib-19.7\\dlib\\matrix/matrix.h(1218): error C2988: unrecognizable template declaration/definition\r\n> 1>c:\\dlib-19.7\\dlib\\matrix/matrix.h(1232): error C2143: syntax error: missing ')' before '<end Parse>'\r\n> 1>c:\\dlib-19.7\\dlib\\matrix/matrix.h(1435): error C2061: syntax error: identifier 'L'\r\n> 1>c:\\dlib-19.7\\dlib\\matrix/matrix.h(1436): error C2059: syntax error: ')'\r\n> 1>c:\\dlib-19.7\\dlib\\matrix/matrix.h(1449): error C2988: unrecognizable template declaration/definition\r\n> 1>c:\\dlib-19.7\\dlib\\matrix/matrix.h(1449): error C2143: syntax error: missing ')' before '<end Parse>'\r\n> 1>c:\\dlib-19.7\\dlib\\matrix/matrix.h(1449): error C2805: binary 'operator =' has too few parameters\r\n> ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========\r\n\r\nNow I can build it if I include dlib first, however then certain functionality from cpprestsdk won't work (specifically web::http::experimental won't be recognised as a namespace). I found similar question [here](https://sourceforge.net/p/dclib/discussion/442518/thread/a2a79132/), however that didn't help me, since I did not define any macros in my project. \r\n\r\nAny help on how to solve this would be greatly appreciated, I don't have a clue on how to solve the issue. Thank you very much.\r\n\r\nI am using Visual Studio 2015 on Windows 10.\r\n\r\n\r\n\r\n**Update on 11/5/2018**\r\nafter commenting out the lines:\r\n```\r\n#if _WIN32_WINNT < 0x0500  \r\n#undef _WIN32_WINNT  \r\n#define _WIN32_WINNT 0x0500  \r\n#endif\r\n```\r\nin _dlib\\windows_magic.h_\r\n\r\nI was able to build if dlib is included first - however I don't quite understand why those lines were even executed, since the check \r\n\r\n`_WIN32_WINNT >= 0x0600` \r\n\r\nreturns true if the other lib is included first"},"comment":{"url":"https://api.github.com/repos/davisking/dlib/issues/comments/443492140","html_url":"https://github.com/davisking/dlib/issues/1536#issuecomment-443492140","issue_url":"https://api.github.com/repos/davisking/dlib/issues/1536","id":443492140,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0MzQ5MjE0MA==","user":{"login":"dlib-issue-bot","id":42975700,"node_id":"MDQ6VXNlcjQyOTc1NzAw","avatar_url":"https://avatars3.githubusercontent.com/u/42975700?v=4","gravatar_id":"","url":"https://api.github.com/users/dlib-issue-bot","html_url":"https://github.com/dlib-issue-bot","followers_url":"https://api.github.com/users/dlib-issue-bot/followers","following_url":"https://api.github.com/users/dlib-issue-bot/following{/other_user}","gists_url":"https://api.github.com/users/dlib-issue-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/dlib-issue-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dlib-issue-bot/subscriptions","organizations_url":"https://api.github.com/users/dlib-issue-bot/orgs","repos_url":"https://api.github.com/users/dlib-issue-bot/repos","events_url":"https://api.github.com/users/dlib-issue-bot/events{/privacy}","received_events_url":"https://api.github.com/users/dlib-issue-bot/received_events","type":"User","site_admin":false},"created_at":"2018-12-02T09:00:10Z","updated_at":"2018-12-02T09:00:10Z","author_association":"COLLABORATOR","body":"Warning: this issue has been inactive for 30 days and will be automatically closed on 2018-12-06 if there is no further activity.\n\nIf you are waiting for a response but haven't received one it's likely your question is somehow inappropriate.  E.g. you didn't follow the issue submission instructions, or your question is easily answerable by reading the FAQ, dlib's documentation, or a Google search.\n"}}
{"actor":{"display_login":"dlib-issue-bot"}}