oatpp / oatpp-starter

Oatpp simple-API starter project
https://oatpp.io/
Apache License 2.0
72 stars 35 forks source link

How To install this nice sample on MS windows #9

Closed gitlove123 closed 4 years ago

gitlove123 commented 4 years ago

You do nice work!

I am new of oatpp and cmake. But I have succeeded in installing this sample on Mac OSX.

oatpp-starter-mac

great!

But when I tried to install it on MS Windows OS, I got the following error message:

oatpp-starter-x86orx64

How to solve it?

lganzzzo commented 4 years ago

Hey @gitlove123 ,

From the log message, it looks like you are trying to build oatpp-starter project, but the main oatpp module is missing. So it's whether you haven't installed the main oatpp module or for some reason, Cmake can't see it.

Please let me know how it goes!

Regards, Leonid

gitlove123 commented 4 years ago

Hi, @lganzzzo

Thank you for your quick response.

I had built oatpp module prior to installing this project:

oatpplib-win10

It's OK?

I suspect that cmake on win 10 build it for x86 architecture.

Honestly speaking, it was done at Parallels win 10 on Mac OSX.

I will try it again on NATIVE windows 10 machine.

lganzzzo commented 4 years ago

Hey @gitlove123 ,

I double-checked the error message - it says:

Could not find ... requested version 1.1.0
...
The following were considered but not accepted:
... version 1.1.0

So it actually found the library, but for some reason, it didn't accept it. Did you build both projects on the same machines? The versions seem to be identical so CMake should have accepted it. At the moment I have no idea why CMake didn't accept the lib with the correct version.

Did you build oatpp as described here, or did you use some additional commands/configs?


Just to clarify:

I had built oatpp module prior to installing this project:


Please let me know if you have any progress on this one, or if you have more questions.

Regards, Leonid

gitlove123 commented 4 years ago

Hi, @lganzzzo

I tried again on win10 native machine. As a result, this sample works well !

oatpp-starter-2

Thanks.

I guess that my wrong point was I tried to install oatpp module including .lib and header files into C:/usr/local directory as a non-administrator because I dislike C:/Program Files directory. In this case, I as a admin of my win10 machine installed it correctly. Then, cmake found them and made .sln and .vcxproj files of this sample project:

oatpp-starter-1

Next, I build it using visual studio:

oat-starter-studio

The .exe file I got works fine.

Thanks.

lganzzzo commented 4 years ago

Hey,

Thanks for the update!

Please feel free to create more issues if you face any difficulties/questions while playing with oatpp.

Regards, Leonid