- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I was trying to write a program, where i am using both Intel TBB and ACE(Adaptive Communication Environment). I came across an error, where lot of definitions in winsock.h have found its duplicate in winsock2.h.
Intel TBB includes windows.h in my machine and thereby it includes winsock.h, whereas ACE includes winsock2.h. The only solution, i could find in net is to declare winsock2.h before windows.h.
So i made the change in windows_ia32.h and windows_em64.h(both under tbb/machine), to include winsock2.h before windows.h and the errors were stopped. I think this might be a useful change to incorporate. Since TBB is not concerned with socket calls and winsock2.h is a more advanced version than winsock.h, i think this is a change, which won't cause any harm.
Thanks,
Gokul.
I was trying to write a program, where i am using both Intel TBB and ACE(Adaptive Communication Environment). I came across an error, where lot of definitions in winsock.h have found its duplicate in winsock2.h.
Intel TBB includes windows.h in my machine and thereby it includes winsock.h, whereas ACE includes winsock2.h. The only solution, i could find in net is to declare winsock2.h before windows.h.
So i made the change in windows_ia32.h and windows_em64.h(both under tbb/machine), to include winsock2.h before windows.h and the errors were stopped. I think this might be a useful change to incorporate. Since TBB is not concerned with socket calls and winsock2.h is a more advanced version than winsock.h, i think this is a change, which won't cause any harm.
Thanks,
Gokul.
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I believe defining WIN32_LEAN_AND_MEAN would also have solved your problem. IIRC it prevents windows.h from including winsock.h.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I think you can just include before any TBB headers. Or include ACE headers before TBB headers.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks. The #define WIN32_LEAN_AND_MEAN solved my problem without the need to touch TBB source.
Thanks,
Gokul.
Thanks,
Gokul.
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page