[Lemon-user] Building Lemon 1.3.1 on Windows

Agostino Sturaro sturaro.agostino at outlook.com
Thu Apr 23 05:20:09 CEST 2015


Building the INSTALL target created the folder
C:\Program Files (x86)\LEMON

I created a new empty Visual Studio project, and took the following steps

1) I copied the "hello lemon" example from here
http://lemon.cs.elte.hu/pub/tutorial/a00012.html
and put it into a new Source.cpp file.

2) in Project -> Properties -> Configuration Properties -> C/C++ -> General
set "Additional Include Directiories" to
C:\Program Files (x86)\LEMON\include

3)  in Project -> Properties -> Configuration Properties -> Linker -> General
set "Additional Library Directiories" to
C:\Program Files (x86)\LEMON\lib

Now the #include <lemon/list_graph.h> directive gets recognized.

However, when I try to build this small project, it fails with the following errors

Error    1    error LNK2019: unresolved external symbol "public: __thiscall lemon::bits::WinLock::WinLock(void)" (??0WinLock at bits@lemon@@QAE at XZ) referenced in function "public: __thiscall lemon::bits::Lock::Lock(void)" (??0Lock at bits@lemon@@QAE at XZ)    C:\Users\sturaroa\Documents\Visual Studio 2013\Projects\LemonTest2\LemonTest2\Source.obj    LemonTest2
Error    2    error LNK2019: unresolved external symbol "public: __thiscall lemon::bits::WinLock::~WinLock(void)" (??1WinLock at bits@lemon@@QAE at XZ) referenced in function "public: __thiscall lemon::bits::Lock::~Lock(void)" (??1Lock at bits@lemon@@QAE at XZ)    C:\Users\sturaroa\Documents\Visual Studio 2013\Projects\LemonTest2\LemonTest2\Source.obj    LemonTest2
Error    3    error LNK2001: unresolved external symbol "struct lemon::Invalid const lemon::INVALID" (?INVALID at lemon@@3UInvalid at 1@B)    C:\Users\sturaroa\Documents\Visual Studio 2013\Projects\LemonTest2\LemonTest2\Source.obj    LemonTest2
Error    4    error LNK1120: 3 unresolved externals    C:\Users\sturaroa\Documents\Visual Studio 2013\Projects\LemonTest2\Debug\LemonTest2.exe    LemonTest2

I tried separately adding each of the following paths to the PATH, but I still get the same errors
C:\Program Files (x86)\LEMON
C:\Program Files (x86)\LEMON\include
C:\Program Files (x86)\LEMON\include\lemon

Could somebody please give me some instructions?
I'm not an expert and I'm spending a lot of time for this simple setup.
By comparison, it took me much less to get started with CPLEX.

Thanks.

Best regards,
Agostino Sturaro


From: sturaro.agostino at outlook.com
To: lemon-user at lemon.cs.elte.hu
Date: Tue, 21 Apr 2015 21:23:16 +0200
Subject: Re: [Lemon-user] Building Lemon 1.3.1 on Windows




I tried out the new CMake 3.2.2.
I instructed the installer to add CMake to the PATH.
It failed to do that, so I had to manually add its folder to the PATH user variable.

Then I run it, with these settings
Where is the source code: lemon-1.3.1
Where to build the binaries: lemon-1.3.1/lemon/build

Then I ticked the option "Suppress dev Warnings (-Wno-dev)".

I clicked Configure, indicated Visual Studio 2013, and clicked OK.
It created the build folder and some files without waiting for me to click the Generate button.
It did not create the .sln project file, I had to click the Generate button for that.
This bit is different from what is described in the guide.
See the attached screenshot for my settings and the log.

When I opened the .sln file in Visual Studio 2013, I found a lot of projects (far more than 4), some look like tests.
I built the ALL_BUILD one.
This time it didn't give me any include error. You can find the log attached.
The absence of errors seems to be due to the fact that I set the source code folder to "lemon-1.3.1" instead of "lemon-1.3.1\lemon".

It all seems fine, however, if I try to
#include <lemon/something.h> 
inside a different VS2013 project, they don't get recognized.

Even setting "Additional Include Directiories" in the Project -> Properties -> C/C++ doesn't help.
Is there something else I have to do?
Other PATH stuff, or different configurations?

By the way, there is no LEMON folder in
C:\Program Files (x86)
even though the CMake configuration seems to suggest it should have been created.

I'm doing my best here, but I'm not used to advanced build systems.
Can I just copy-paste .cc and .h files in my project, without going through CMake and VS?

Thanks.

Best regards,
Agostino Sturaro


From: sturaro.agostino at outlook.com
To: lemon-user at lemon.cs.elte.hu
Date: Sat, 18 Apr 2015 05:03:09 +0200
Subject: [Lemon-user] Building Lemon 1.3.1 on Windows




I'm trying to build Lemon 1.3.1, on Windows 7 64 bits SP1, with Visual Studio 2013 Professional 32 bits U4.
I installed CMake 3.2.1 and followed the instructions at this page
https://lemon.cs.elte.hu/trac/lemon/wiki/InstallCmake

I run CMake, setting the build folder to extracted_zip/lemon/build
I indicate I'm using "Visual Studio 12 2013" and leave all other settings to default.
When I try to run it, CMake requires me to set tick the option "Suppress dev Warnings (-Wno-dev)".
After doing that, it appears to work.

When I open the Project.sln in Visual Studio and click Build->Build Solution, I get the following errors:

Error    2    error C1083: Cannot open include file: 'lemon/tolerance.h': No such file or directory    C:\Users\user_a\op_models\lemon-1.3.1\lemon\base.cc    22    1    lemon
Error    6    error C1083: Cannot open include file: 'lemon/random.h': No such file or directory    C:\Users\user_a\op_models\lemon-1.3.1\lemon\random.cc    22    1    lemon
Error    5    error C1083: Cannot open include file: 'lemon/lp_skeleton.h': No such file or directory    C:\Users\user_a\op_models\lemon-1.3.1\lemon\lp_skeleton.cc    19    1    lemon
Error    4    error C1083: Cannot open include file: 'lemon/lp_base.h': No such file or directory    C:\Users\user_a\op_models\lemon-1.3.1\lemon\lp_base.cc    22    1    lemon
Error    3    error C1083: Cannot open include file: 'lemon/color.h': No such file or directory    C:\Users\user_a\op_models\lemon-1.3.1\lemon\color.cc    22    1    lemon
Error    7    error C1083: Cannot open include file: 'lemon/bits/windows.h': No such file or directory    C:\Users\user_a\op_models\lemon-1.3.1\lemon\bits\windows.cc    22    1    lemon
Error    1    error C1083: Cannot open include file: 'lemon/arg_parser.h': No such file or directory    C:\Users\user_a\op_models\lemon-1.3.1\lemon\arg_parser.cc    19    1    lemon

I tried setting the build folder in a different location, but I get the same set of errors.

Any suggestions?
Thanks.
 		 	   		  

_______________________________________________
Lemon-user mailing list
Lemon-user at lemon.cs.elte.hu
http://lemon.cs.elte.hu/mailman/listinfo/lemon-user 		 	   		  

_______________________________________________
Lemon-user mailing list
Lemon-user at lemon.cs.elte.hu
http://lemon.cs.elte.hu/mailman/listinfo/lemon-user 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lemon.cs.elte.hu/pipermail/lemon-user/attachments/20150423/cfd8eccc/attachment.html>


More information about the Lemon-user mailing list