[gdal-dev] FWD: Visual C++ build bug
Mateusz Loskot
mateusz at loskot.net
Tue Feb 7 09:53:38 PST 2017
On 7 February 2017 at 18:01, MS <maximster at gmail.com> wrote:
> Hi Mateusz,
>
> I made some progress in getting the VS2015 compile correctly under win64. It
> looks like the VS project that is being setup needs to have a lot of fixes.
> While it can build a dll, it was not able to build a debug dll,
Maxim,
First, the generated project is NOT a typical Visual C++ project.
It does not provide any build configuration itself.
It just calls NMAKE and builds whatever is specified in the Makefiles of GDAL.
So, if you do not edit your nmake.opt/nmake.opt.local, then you will
get default Release build.
> and the clean run is also messed up. It catches everything, debug or release.
Yes, because as I explained above, the project does NOT build separately
in Release and Debug subfolders.
Basically, when you hit Build in VS IDE is like you execute
nmake /f makefile.vc command in command line.
Both are equivalent, NO difference.
> I made some changes to kind of let the VS project have both, a debug and
> release dlls, but I can see that there are still some configuration
> problems.
If you expect fully features .vcxproj, you really need to create it
yourself, manually.
> Debug dlls need to have a /MDd instead of /MD command in the OPTFLAGS, but
> for some reason when I put that in, the project fails.
That is default GDAL nmake.opt setting.
You can learn about rationale here
https://trac.osgeo.org/gdal/ticket/540
https://trac.osgeo.org/gdal/ticket/3346
https://trac.osgeo.org/gdal/ticket/4291
> In any case, if you want to see what fixes I put in, take a look here:
> https://bitbucket.org/MaximSter/theconstruct/wiki/ExtDependencies
>
> It is under Windows, #13. Hopefully that will help you figuring out what
> needs to be addressed.
OK, but I'd prefer if you posted it to gdal-dev.
Let's continue further discussion there ('ve CC'ed to gdal-dev).
Best regards,
Mateusz Loskot
More information about the gdal-dev
mailing list