-
Notifications
You must be signed in to change notification settings - Fork 397
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Win32 x64 Install Issues #99
Comments
So it's been 2.5 days, but I finally got it to build. The steps I recommend are:
Then, for msvc-12 (Visual Studio 2013), you'll have to modify the source to get it to work.
-static inline int fwrite32(FILE *f, int32_t v)
+static int fwrite32(FILE *f, int32_t v)
This should now build. |
Hi Matthew, I just wanted to thank you for your efforts. I know no one likes build problems, and 2.5 days sounds pretty rough. Please accept our apologies, for you having to go through that! Fortunately, you've given us alot of good information. I think we can update the Win32 README and source so this doesn't happen again. Thanks for contributing! |
Drake is building LCM just fine on Windows, at least with VS 2015. Note that we use pre-built GTK from http://win32builder.gnome.org/gtk+-bundle_3.6.4-20131201_win64.zip. (We might not be building the tests, however...) Also, with CMake, you may want to pass
|
hey @mwoehlke-kitware I THINK (if I remember right) that I looked everywhere for pre-built GTK/glib, that's awesome that you posted a location. I just posted that link to some SO answers I had found when searching that were linking to dead links. |
#if _MSC_VER < 1900
#define snprintf _snprintf
#endif As I read it, that says that VS 2015 has Possibly you are recalling backwards? 😉 At any rate, it looks like Thanks for debugging this, and my apologies also for the time you lost. |
Hi Matthew, thank you for your efforts!
could you explain with a little more detail on the above steps, like how to set the "install path", and if I run cmake in cmd it says "does not appear to contain CMakeLists.txt". How do I solve this? Also, in the cmake-gui, what do I set for the "source code" blank and the "build the binary" path? |
When building software with CMake, there are two directories to keep in mind. The "source directory" refers to the top level directory of the project you want to build, which contains the project's sources. The "build directory" (or "binary directory") is where the build artifacts are created. It is recommended that these be different (an "out of source build"). For example, if you cloned the LCM repository to CMAKE_INSTALL_PREFIX (this is a CMake variable; it will appear in the "main" section of the GUI after you 'configure' for the first time) specifies the root directory of where the project will be installed when you build the
When using the CLI version of CMake (or |
Thank you! I think I have successfully generated the cmake. In the README file in the WinSpecific of the original file, it says build the /WinSpecific/vs12/LCM.sln in visual studios. But, when I do, I get a bunch of errors at first saying missing glib.h, which I then manually set the directory in the Project Properties for all projects in the LCM solution. Could you help me on this? I am so desperate to install LCM on windows! I lost the whole week trying to get it right but there seems to be no detailed tutorial on how to install LCM on windows.. |
Huh. Um... don't do that. Use the build files generated by CMake. The process should be:
There may be no specific tutorial for LCM because building LCM should not be appreciably different than building any other project that uses CMake. (If I can ever get my Windows machine to let me log in, I'll try to take a look at making things better with the strangely packaged MSYS version of glib...) |
So... I took another look at this, and I am confused. There are not Note: I actually have never tried to build non-CMake LCM on Windows, and it's very possible that things on the MSYS side have changed since it was last tested that may make it difficult to build 1.3-LTS without also using an older glib package. |
I was confused with the instructions provided in the original LCM-1.3.1 zip file and the master file provided here. The master file doesn't have the LCM.sln file, so I used the original LCM file. Anyways, When I try to build the ALL__BUILD project file, I still encounter "Cannot open include file 'lcmtest_primitives_t.h" and lcmtest/primitives_t.h': No such file or directory" and a bunch of LNK2001: unresolved external symbol g(something). I should try to build it from the beginning to see if I have done anything wrong. Thank you. |
Thanks to the insightful comments above I was able to build LCM on Windows 7 64. Here's an attempt to document the installation process (that worked for me) on a clean Windows machine. Hopefully someone will find this useful... Approach overview:
1. Install dependencies
2. Build LCMOpen CMD as administrator.
Issue (I think): Workaround...
That should do it. |
I would note that this is only needed to perform the install, assuming you are installing to a "protected" location.
You might be able to get |
Thanks @mwoehlke-kitware.
Actually tried that per your suggestion above - didn't work. |
I just did this and thought I would add to @braanan 's very helpful post that instead of opening the GUI which did not work for me, placing all the commands in command prompt did:
|
Did anyone make any progress with this? I remember taking 2 days to successfully build LCM the first time, and can't remember what I did different the last time and am trying to compile python bindings for a second machine with no luck - glib giving me trouble with both the mingw glib install and a pre-packaged version I found last time. Generating the projects works, but building dlls complains about unresolved external symbols. |
@avikde 's command worked for me (with Visual Studio 15 2017 Win64) after I:
Some of these might not have been necessary. |
Guys, you could try vcpkg to install lcm now 😃 |
@cmpute how can i use this lcm.dll generated from vcpkg for python then? |
@mshaheerm you need to run that in a "Developer Command Prompt" |
I can't seem to install LCM v1.3.1 on Windows with msvc-12.
I followed the advice in the WinSpecific folder for GLIB, i.e. I've installed msys2 and mingw. In the msys shell I installed the
mingw-w64-x86_64-gcc
package along withautoconf
,automake
, and other utilities (git
,vim
, etc)Am I suppose to build LCM in the msvc environment? If I do, I can't seem to link. At first because at first it was missing
ws2_32
, but even after that it's missing a bunch of it's own symbols it seems likelcm_internal_pipe_write
. Even just to get to that point, in lcm/windows/WinPorting.h:10 I have to comment out lines 10 and 11 to avoid conflicts.I noticed there are CMake files here that have a lot of
if (WIN32)
, but when runningcmake
fromcmd
, I can't get them to find my glib-2.0 libs no matter what I setGLIB_PATH
to.I'm going to go back to trying to build glibc without mingw to see if that helps.. But overall I've now lost two full work days trying to build LCM on Windows (whereas on Linux it took me under a minute I think from cloning to having it built.)
The text was updated successfully, but these errors were encountered: