-
Notifications
You must be signed in to change notification settings - Fork 552
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
MSVC: cannot build and install Release AND Debug versions of the library #459
Comments
Hi @cjamin! Actually, there's no way to build and install |
Ok, but debugging my program in I would be ok if I could build my program in Are you saying there is no way to be able to build my program in |
Not really, what I was saying is that for the moment, there is no way to install two version of That being said, I may have another solution for you, but keep in mind that I haven't test it, so it's possible that it doesn't work:
I will eventually test it, but if this doesn't work, you can skip the parts where you modify the |
Hi, |
No problems! 😄
You could do that, but if you do, I suggest you to specify a path in your user repository, e.g. |
I don't understand this part of your method: this seems to suggest that I create two different projects for my program, because I can't specify two different values of |
I think you can configure libpointmatcher's CMake by passing |
@cjamin I'm sorry if my instructions were a bit confusing. Instead, I will give it to you as a series of steps in the command line. First, go in mkdir build-release && cd build-release
cmake -DCMAKE_BUILD_TYPE=Release ..
make -j$(nproc)
sudo make install
cd ..
mkdir build-debug && cd build-debug
cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_DEBUG_POSTFIX:STRING="-debug" ..
make -j$(nproc)
sudo make install Then, do these steps in your project directory: mkdir build-release && cd build-release
cmake -DCMAKE_BUILD_TYPE=Release ..
make -j$(nproc)
cd .. && mkdir build-debug && cd build-debug
cmake -DCMAKE_BUILD_TYPE=Debug ..
make -j$(nproc) That's it! This will configure and build a directory for each type of build that you want. If you want to make sure that your project is linking to the right version of Using a different directory for your different build type is something really useful as it avoid you to rebuild the library everytime you want to switch from a I've just tested it and it worked for me, I hope it will work for you too. 😃 And, I also hope that it helps you understand a little bit more what I meant by using a different directory for different build type. |
Hi,
When I build the INSTALL project in Release or Debug mode, it replaces the pointmatcher.lib which is in install/lib.
It should be two different files for Debug and Release, right?
Because of this problem, my own program can only be built in the mode I chose for libpointmatcher.
Any way to fix this? Thanks!
The text was updated successfully, but these errors were encountered: