Fix PHP MapScript build on Windows with CMake and Visual Studio 2012 Express #5346

Closed
wants to merge 5 commits into
from

Projects

None yet

2 participants

@AlexanderGabriel
Contributor

Hi,

i compiled php mapscript on Windows with Visual Studio 2012 Express and PHP-5.6.27. I used CMake, not the stuff from the documentation (i think, this is really outdated).
I'm not new to Mapserver and MapScript but new to github and not really experienced in this Windows-compiling stuff. I'm not quite sure if i'm doing this right but i'm looking forward to get feedback ;)

I had some Problems but i think i found good solutions for it. It compiles now on Windows with PHP-5.6.26-ts-x86-vc11. I'd like to provide some patches to improve the build-process for other Windows users in the future.

There is already a pull-request for the patch from tbonfort but it is not merged yet. i included it, because building will not work without.

I tested on linux. phpinfo() shows the extension so it seams i didn't break anything in the build system. maybe there are better tests to do before merging.

Thank you.

Kind regards,
Alex

tbonfort and others added some commits Sep 2, 2016
@tbonfort @AlexanderGabriel tbonfort Fix build issue with php 5.6.25 (#5318) 7e8ff46
@AlexanderGabriel AlexanderGabriel Fixes error in maphttp.c.obj LNK2019 unresolved external symbol "__im…
…p__select@20" in function "_msHTTPExecuteRequests" when compiling mapserver on windows
6d0cb4b
@AlexanderGabriel AlexanderGabriel Fix compilation error with Visual Studio 2012 Express on Windows (Dec…
…laration of variables at the beginning of a block)
88935d2
@AlexanderGabriel AlexanderGabriel fix issues when compiling PHP-MapScript with VS2012 Express against p…
…hp-sdk-structure
02b3c90
@AlexanderGabriel AlexanderGabriel cmake/FindICONV.cmake did not find iconv
026ba5c
@tbonfort
Member

Looks good to me, thanks @AlexanderGabriel. It would be really cool if you could create a wiki page here on github explaining the detailed steps you undertook to compile mapserver from source under windows, that we could send windows users to if/when they need to test a fix/patch on their own.

@AlexanderGabriel
Contributor

That is a good Idea. I can do that. But wouldn't it be better to first merge this pull-request? Or should i point to my rep and the commits in the wiki-page until this got merged?
I've updated "README.WIN32" in / and at /mapscript/php (branch-7-0-UpdateWin32BuildInstructions in my rep) a few minutes ago. The content of the new readmes can be used for the wiki-page.
Should I open a new pull request for just updating docs or make a new pull-request for both, docs and patches to build on windows and we throw away this pull-request?

@tbonfort tbonfort added a commit to tbonfort/mapserver that referenced this pull request Dec 5, 2016
@AlexanderGabriel @tbonfort AlexanderGabriel + tbonfort cmake/FindICONV.cmake did not find iconv on windows (#5346) 1b8af1c
@tbonfort tbonfort added a commit that referenced this pull request Dec 5, 2016
@AlexanderGabriel @tbonfort AlexanderGabriel + tbonfort Fix LNK2019 build error on windows (#5346)
Fixes error in maphttp.c.obj LNK2019  unresolved external symbol
"__imp__select@20" in function "_msHTTPExecuteRequests"
bcf7e7e
@tbonfort tbonfort added this to the 7.0.3 Release milestone Dec 5, 2016
@tbonfort
Member
tbonfort commented Dec 5, 2016

Fixes applied to branch-7-0, thanks @AlexanderGabriel. Documentation updates can go in a new PR

@tbonfort tbonfort closed this Dec 5, 2016
@AlexanderGabriel AlexanderGabriel deleted the AlexanderGabriel:branch-7-0-fixphpmapscriptwin32buildwithcmake branch Dec 7, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment