#2154 closed defect (fixed)
Bad Build-Commands in makegdal80.sln
Reported by: | Geoheber | Owned by: | warmerdam |
---|---|---|---|
Priority: | low | Milestone: | 1.5.1 |
Component: | ConfigBuild | Version: | unspecified |
Severity: | normal | Keywords: | Visual Studio |
Cc: | ilucena, Mateusz Łoskot |
Description
Visual Studio throws error if building makegdal80.sln. The reason seems to be the following bad-formed commands where the newline-characters are lost and the different commands are positioned after another in one line: Choose Properties - Configuration Properties - NMake. The commands for "Build Command Line","Rebuild All Command Line" and "Clean Command Line" have the issue described above (One must click on "..." to see it)
Change History (7)
comment:1 by , 16 years ago
Cc: | added |
---|---|
Component: | default → ConfigBuild |
comment:2 by , 16 years ago
comment:3 by , 16 years ago
Ivan,
Are the problems with text convensions all fixed in trunk and 1.5 branch? I want to ensure that the .sln files shipped in 1.5.1 do not have this problem.
comment:4 by , 16 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
I change makegdal_gen.bat to create the project files build options in just one line:
cd $(ProjectDir) && nmake -f makefile.vc && nmake -f makefile.vc install
I believe that it will prevent newline conversion problem in the future.
I recreate the VC2003 and VC2005 projects files as in:
C:\Dev\gdal>makegdal_gen Usage: makegdal_gen "MS Visual C++ version" > makegdalNN.vcproj Examples:
makegdal_gen 7.10 > makegdal71.vcproj makegdal_gen 8.00 > makegdal80.vcproj
I committed those three files (makegdal_gen.bat, makegdal71.vcproj, makegdal80.vcproj) to the trunk; I got the two .vcproj from SVN to another computer; I tested each one on their respective versions of Visual Studio and everything works fine.
Finally one note of advise: I suggest we should remove the .sln files from the trunk. They are not generated by the batch script; They are automatically generated by Visual Studio when you load the .vcproj; Users that are developing in C++, C#, VB.Net can also add the GDAL .vcproj to their existent projects without the .sln files.
Ivan
comment:5 by , 16 years ago
Ivan,
Debug configuration of VC++ project files actually executed non-debug build because of lack of DEBUG=1 flag in commands. So, I applied a tiny fix to makegdal_gen.bat (r14896) and manually fixed makegdal80.vcproj file (r14897). AFAIU, the latter should be made by project file generation using patched makegdal_gen.bat, but I wasn't sure.
Could you please confirm if my fix is correct and I can safely regenerate VC++ project files?
-- Mateusz
comment:6 by , 16 years ago
One more fix, support for MSVC_VER flag set according to requested VC++ version (r14898). Now, nmake commands are generated this way:
- Debug
nmake -f makefile.vc MSVC_VER=XXXX DEBUG=1
- Release
nmake -f makefile.vc MSVC_VER=XXXX
where possible XXXX values are 1200, 1300, 1310, 1400, 1500.
Ivan, I hope it's OK.
comment:7 by , 16 years ago
I personally like to add those two options direct to nmake.opt but I think that your approach differentiating "Release" from "Debug" options is great for the consistency of the Visual Studio way of doing things. I will take a look.
We have problem with newline-characters before due to unix-dos CRLF stuff on SVN. This particular section of the XML file uses one non-standard newline character. Two solutions: recreate the file using makegdal_gen.bat or change the newlines to "&&" so you can have all commands in one line, e.g.:
nmake makefile.vc clean && nmake makefile.vc install