Skip to content
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

Using openMVG dll in VS Visual Studio Team Services #1000

Closed
learnmano opened this issue Jul 25, 2017 · 6 comments
Closed

Using openMVG dll in VS Visual Studio Team Services #1000

learnmano opened this issue Jul 25, 2017 · 6 comments
Labels

Comments

@learnmano
Copy link

Dear Pierre,
Thanks for your outstanding work. Now I'm using openMVG as dll to develop a SfM GUI application, but I can't figue out how to using openMVG's CMake Build as programs in Visual Studio Team Services. When I check openMVG in Team Services and open it, it shows that I can only use the git to edit code in Visual Studio 2015. That drives me crazy, any suggestion?

Best regards,
Sherman

@pmoulon
Copy link
Member

pmoulon commented Jul 25, 2017

Dear @learnmano.
I don't know Visual Studio Team Services, I'm always using git in command line mode.

@rperrot Any idea on this?

I'm not sure to caught your question.
Does your question is about using OpenMVG as a third party in a project?

or
Does your question if about a VisualStudio problem to edit the code?

@rperrot
Copy link
Contributor

rperrot commented Jul 26, 2017

I only used one time TS, only for a git test. It sounds like a big CI/CD server with additional tools (gant-like, backlog product management, ...)

One idea is to make CD of openMVG dll to provide up to date builds as container (as it could be done in docker) but sounds a like bit complicated and overkill to develop in this way.

@learnmano I think it's better to compile the code locally and develop your tool inside openMVG source tree (in software dir for ex) or use it as a third party as @pmoulon proposed.

@learnmano
Copy link
Author

Dear @pmoulon,
Yes, my question is about using OpenMVG as a third party in a project, but in a dll way, not in a static library way. I used openMVG as a third-party library dependcy before, and I also add some extra code to make it dll libraries, it seems that it works fine locally on my computer, but not so well on another computer, cause the path is different. I'll leave a response when I work it out. Can't thank you more for your time and patience.

@learnmano
Copy link
Author

@rperrot Okay, I see. I'll compile the code locally and develop my tool inside openMVG source tree. Thank you for your advice, it's very helpful.

@pmoulon
Copy link
Member

pmoulon commented Jul 26, 2017

Please close the issue once you succeeded.
BTW, we would be happy to make the DLL build effective for Windows.
Any comment about your changes or a PR regarding this would be nice 😄

@learnmano learnmano reopened this Aug 15, 2017
@learnmano
Copy link
Author

Sorry for the delay, the problem is solved successfully. Because I don't understand how to use openMVG as a thirdparty library in the way the BUILD file said, so I changed openMVG source code a little bit.
I start a new program in VS Visual Studio Team Services, and I use some openMVG software as a dll library. For example, as for openMVG_main_ComputeMatches, I add a new head file named main_ComputeMatches.h, and add some extra code like:

#pragma once
#ifdef OPENMVGDLL_COMPUTEMATCHES_EXPORTS
#define MVGCOMPUTEMATCHES_API __declspec(dllexport)
#else
#define MVGCOMPUTEMATCHES_API __declspec(dllimport)
#endif

class MVGCOMPUTEMATCHES_API CSfMComputeMatches
{
public:
//change the main() function to compute_matches()
int compute_matches(int argc, char **argv);

};

Then I add two lines at the beginning in corresponding cpp file:

#define OPENMVGDLL_COMPUTEMATCHES_EXPORTS
#include "main_ComputeMatches.h"

After changing the absolute path to relative path, I just use openMVG as a thirdparty library, and it works fine, as for VS Visual Studio Team Services. But I don't think it's very helpful for making the DLL build effective for Windows, cause this method is limited. Thank you all for your patience and enthusiasm. I close this issue, again, thank you very much.

@pmoulon pmoulon closed this as completed Aug 15, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants