jackyspeed / libmv

Automatically exported from code.google.com/p/libmv
MIT License
0 stars 0 forks source link

The trunk do not compile under Windows. 22 July #14

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Try to compile the code under windows (Visual C++ Express 2008)
2. It do not compile.
3.1 -> The glog issue under windows is the biggest problem.
3.2 -> Some minor issue are interpreted as error for visual Compiler.

What is the expected output? What do you see instead?
A binary revision of libmv (lib, test executable)

What version of the product are you using? On what operating system?
(Windows XP, Visual C++ Express 2008).

Please provide any additional information below.

For the minor issue I give the solution below :
imageio.cc
=> Line 34 ->   char *p = strrchr (c, '.');
Must be  : const char *p = strrchr (c, '.');

homography_test.cc
=> Line 35 and 71 ->   int num_h = 3;
Must be : const int num_h = 3;
Because it is used to perform a static allocation of MAT3 array. (It's 
strange that on your linux compiler you don't have an error or a warning).

For the glog windows issue. I can take a look, but do you have any advice 
to give me. First the _WIN32 preprocessor must be added to the glog 
windows project. I thinks this can be done in the CMakeLists.h.

Also I have a problem with :
Error   126 error C2718: 'libmv::Vec2': actual parameter with 
__declspec(align('16')) won't be aligned    e:\2009Projects\libmv\src
\libmv\base\vector_test.cc

Did you have any fix for this ...

Talk to you ;)

Original issue reported on code.google.com by pmou...@gmail.com on 22 Jul 2009 at 8:23

GoogleCodeExporter commented 9 years ago
I have forgoten one file :
src\libmv\multiview\focal_from_fundamental_test.cc
Line 97 -> EXPECT_NEAR(sqrt(2), fabs(e2(0)), 1e-8);
Must be EXPECT_NEAR(sqrt(2.0), fabs(e2(0)), 1e-8);

Original comment by pmou...@gmail.com on 22 Jul 2009 at 8:43

GoogleCodeExporter commented 9 years ago
In my working copy of glog (not libmv) I have removed the configure @ac_cv_...@ 
stuff 
and replaced it with preprocessor defines. The next step is to use autoconf to 
generate the right headers. However, it's slow going because I don't know 
autoconf.

The benefit of doing this in upstream glog is that then we can make some 
configure 
checks in our code, and not require autoconf (which is used to generate 
config_linux.h and config_mac.h at the moment). Furthermore, then there will be 
no 
more windows/ directory in glog; it will be the same source on Linux, Windows, 
and 
Mac (with different config.h). Upstream glog is already on board for the 
change, but 
the primary author doesn't have time to do it himself.

Would you be willing to take on that task? It's nearly yak shaving, but it 
would 
benefit both glog and libmv (rather than just hacking libmv's glog copy). I can 
send 
you a patch of my work so far. Note that the first stage would have to happen 
on a 
Linux or Mac machine because you can't build the windows/ directory on windows 
(which  
I'm trying to address).

Original comment by mie...@gmail.com on 23 Jul 2009 at 1:48

GoogleCodeExporter commented 9 years ago
The windows compile stuff (that are not in relatioship with glog) are now fixed.

For the glog stuff I do think i'm the good guy to do it, because I do not have 
a 
linux at home. But we can try to define manually the config_windows.h ?

Original comment by pmou...@gmail.com on 23 Jul 2009 at 2:50

GoogleCodeExporter commented 9 years ago
Thanks to mierle all the stuff compile

Original comment by pmou...@gmail.com on 28 Jul 2009 at 6:23