-
Notifications
You must be signed in to change notification settings - Fork 51
-
Hey, First of all, love the transparancy of the library. I would like to open the project in visual studio (2022). When importing from git it generates the make file correctly. But when I try to build/run any example i get this error:
This is how the general makefile cmake looks like:
|
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 3 comments · 8 replies
-
Hi, Thanks for your interest in the stack. With this said, it explains why you have (and will) encountered some issues for compiling the stack and its examples. As I'm quite interested in having the stack running on a Windows platform, I will try to help you make it work so that other users can adopt it on Windows too. The first error you encountered is from the compiler which doesn't recognize the flags since these are GCC/G++ flags :
To correct this, I suggest you edit the CMakeLists_native.txt file from this :
To this :
This will tell CMake to not use these GCC specific flags when using the MSVC compiler. The default flags should be fine for a first approach. Please keep me inform on your progress. I will try to have a Windows environment ready to make some tests on my side but it may take some time. |
Beta Was this translation helpful? Give feedback.
All reactions
-
Hi, I started a new branch for the support of the MSVC compiler => https://github.com/c-jimenez/open-ocpp/tree/dev/compile_msvc This branch can be built with Visual Studio Community 2022 (there are still a lot of warning that I need to fix) and all the examples are generated and seems to work on Windows. So you can use it now to start discovering the stack and I will keep you in touch when this branch will be ready to be merged in the develop branch. |
Beta Was this translation helpful? Give feedback.
All reactions
-
Hi, Sounds great that on your side the examples seem to be working! I tried it out but I still get stuck somehow. What i did was:
got the output below:
` |
Beta Was this translation helpful? Give feedback.
All reactions
-
It seems that the MSVC compiler has not been recognized by CMake or that your "out" folder has not been fully regenerated when switching to the new branch. |
Beta Was this translation helpful? Give feedback.
All reactions
-
Beta Was this translation helpful? Give feedback.
All reactions
-
Hi, Are you sure that you did switch or that you did pull out the latests commit on the branch I gave you (https://github.com/c-jimenez/open-ocpp/tree/dev/compile_msvc) ? The String.h file doesn't exists anymore and has been renamed as well as the CMakeLists_native.txt file and some other which have been renamed/removed. |
Beta Was this translation helpful? Give feedback.
All reactions
-
Hey, Yes you where right, stupid mistake. I pulled in the last branch version like this. Then i retried, but got new errors: This is the cmake file, in the root folder (CMakeLists.txt):
And this is how the build looks like for example: quick start chargepoint: Here is the build:
|
Beta Was this translation helpful? Give feedback.
All reactions
-
Ok, I think we are now close to make it work on your system. I did the build with the following OpenSSL version for Windows : https://slproweb.com/download/Win64OpenSSL-3_0_7.exe.
I did not try with a 1.1.1s version. If you can't switch to this newest version, could you please indicate where did you find yours? Was it compiled from sources? |
Beta Was this translation helpful? Give feedback.
All reactions
-
Beta Was this translation helpful? Give feedback.
All reactions
-
Great news! I hope you will enjoy the library! I will continue to cleanup the build on my side. |
Beta Was this translation helpful? Give feedback.
Ok, I think we are now close to make it work on your system.
I did the build with the following OpenSSL version for Windows : https://slproweb.com/download/Win64OpenSSL-3_0_7.exe.
And I defined the 2 following environment vars:
(You have to restart Visual Studio after modifying the environment vars so that they are taken into account).
I did not try with a 1.1.1s version. If you can't switch to this newest version, could you please indicate where did you find yours? Was it compiled from sources?