Opened 17 years ago
Closed 17 years ago
#87 closed enhancement (fixed)
WIN32 support
Reported by: | Alpar Juttner | Owned by: | Balazs Dezso |
---|---|---|---|
Priority: | major | Milestone: | LEMON 1.0 release |
Component: | build system | Version: | hg main |
Keywords: | Cc: | Akos Ladanyi | |
Revision id: |
Description (last modified by )
Akos has worked out a CMAKE build environment which - in theory - makes it possible to use LEMON with MSVC. However there are several compilations errors with MSVC.
The uploaded patches contains the cmake environment and several fixes. They fix almost all errors but one related to Paths are still unfixed.
Attachments (8)
Change History (19)
Changed 17 years ago by
Attachment: | cmake.patch added |
---|
Changed 17 years ago by
Attachment: | cmake-2.patch added |
---|
Changed 17 years ago by
Attachment: | time_measure.patch added |
---|
Changed 17 years ago by
Attachment: | hgignore.patch added |
---|
Changed 17 years ago by
Attachment: | cmake-3.patch added |
---|
Changed 17 years ago by
Attachment: | msvc-fixes.patch added |
---|
comment:1 follow-up: 2 Changed 17 years ago by
Cc: | Akos Ladanyi added |
---|
comment:2 Changed 17 years ago by
Description: | modified (diff) |
---|
Replying to ladanyi:
What version of MSVC are you using? I'm asking this because with the attached patches everything compiles using MSVC 15.00.21022.08 (the one included in Visual Studio 2008).
I tried it with VS 2005, but I don't know how to check the exact version number. You must be aware of my complete ignorance related to the M$ world.
comment:3 Changed 17 years ago by
Here is the error message I get compiling dfs_test and bfs_test:
C:\Work\lemon\cmake\lemon/path.h(971) : error C2752: 'lemon::_path_bits::PathCopySelector<Target,Source>' : more than one partial specialization matches the template argument list with [ Target=lemon::Path<Digraph>, Source=lemon::PredMapPath<lemon::concepts::Digraph,lemon::concepts::Digraph::NodeMap<lemon::concepts::Digraph::Arc>> ] C:\Work\lemon\cmake\lemon/path.h(960): could be 'lemon::_path_bits::PathCopySelector<Target,Source,enable_if<Target::BuildTag,void>::type,enable_if<Source::RevPathTag,void>::type>' C:\Work\lemon\cmake\lemon/path.h(949): or 'lemon::_path_bits::PathCopySelector<Target,Source,enable_if<Target::BuildTag,void>::type,RevEnable>' C:\Work\lemon\cmake\lemon/path.h(939): or 'lemon::_path_bits::PathCopySelector<Target,Source,BuildEnable,enable_if<Source::RevPathTag,void>::type>' C:\Work\lemon\cmake\lemon/path.h(73) : see reference to function template instantiation 'void lemon::copyPath<lemon::Path<_Digraph>,CPath>(Target &,const Source &)' being compiled with [ _Digraph=Digraph, CPath=lemon::PredMapPath<lemon::concepts::Digraph,lemon::concepts::Digraph::NodeMap<lemon::concepts::Digraph::Arc>>, Target=lemon::Path<Digraph>, Source=lemon::PredMapPath<lemon::concepts::Digraph,lemon::concepts::Digraph::NodeMap<lemon::concepts::Digraph::Arc>> ] ..\..\test\dfs_test.cc(63) : see reference to function template instantiation 'lemon::Path<_Digraph>::Path<lemon::PredMapPath<_Digraph,_PredMap>>(const CPath &)' being compiled with [ _Digraph=Digraph, _PredMap=lemon::concepts::Digraph::NodeMap<lemon::concepts::Digraph::Arc>, CPath=lemon::PredMapPath<lemon::concepts::Digraph,lemon::concepts::Digraph::NodeMap<lemon::concepts::Digraph::Arc>> ]
comment:4 follow-up: 5 Changed 17 years ago by
And here is the nasty warning which I can't get rid of:
C:\Program Files\Microsoft Visual Studio 8\VC\include\xutility(2282) : warning C4996: 'std::_Copy_opt' was declared deprecated C:\Program Files\Microsoft Visual Studio 8\VC\include\xutility(2270) : see declaration of 'std::_Copy_opt' Message: 'You have used a std:: construct that is not safe. See documentation on how to use the Safe Standard C++ Library' C:\Work\lemon\cmake\lemon/random.h(221) : see reference to function template instantiation '_OutIt std::copy<const unsigned long*,unsigned long*>(_InIt,_InIt,_OutIt)' being compiled with [ _OutIt=unsigned long *, _InIt=const unsigned long * ] C:\Work\lemon\cmake\lemon/random.h(220) : while compiling class template member function 'void lemon::_random_bits::RandomCore<_Word>::copyState(const lemon::_random_bits::RandomCore<_Word> &)' with [ _Word=lemon::Random::Word ] C:\Work\lemon\cmake\lemon/random.h(523) : see reference to class template instantiation 'lemon::_random_bits::RandomCore<_Word>' being compiled with [ _Word=lemon::Random::Word ]
Do you know some magic compiler switch to turn this off?
comment:5 Changed 17 years ago by
Replying to alpar:
Do you know some magic compiler switch to turn this off?
According to
http://msdn2.microsoft.com/en-us/library/aa985974(VS.80).aspx
The following #define
should switch off this warning.
#define _SCL_SECURE_NO_WARNINGS
As an alternative method it also suggests using
#pragma warning(disable:4996)
None of them is working for me, neither using them alone nor both together.
Changed 17 years ago by
Attachment: | vs_2005_path.patch added |
---|
comment:6 Changed 17 years ago by
The uploaded patch uses different type of template specialization, which is accepted by MSVC 2005.
comment:7 Changed 17 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
The patches are now in the main branch, see [96f81c791f0c], [8b703d177341], [c3b45bb643b0] and [4e626dbbe408].
All the errors have been fixed (though MSVC still emits several warnings).
comment:8 Changed 17 years ago by
Resolution: | fixed |
---|---|
Status: | closed → reopened |
Changed 17 years ago by
Attachment: | makefile-cleanup.patch added |
---|
comment:9 follow-up: 10 Changed 17 years ago by
Updated the patch to distribute the CMakeLists.txt files too.
comment:10 Changed 17 years ago by
Replying to ladanyi:
Updated the patch to distribute the CMakeLists.txt files too.
It is in the main branch, see [4b42aa24ce12].
comment:11 Changed 17 years ago by
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
What version of MSVC are you using? I'm asking this because with the attached patches everything compiles using MSVC 15.00.21022.08 (the one included in Visual Studio 2008).