-
Notifications
You must be signed in to change notification settings - Fork 345
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
I try to run cmake 2.8.12.2 with visual studio 2013 ,wrong #6
Comments
you should first find the depends of c++11 and gdal2.0, then comment them. |
thank you for attention,It's useful. but I have a new problem,I can't get gdal 2.0 from http://www.gdal.org/ the heighest version I can find on ftp is 1.9.2, can you tell me where I can get gdal 2.0,,or you can send it to my email wenwu20082001@gmail.com,thank you very much,best wishes! |
@wenwu20082001 I'm afraid I don't use windows so can't help much, but as stated in the documentation GDAL 2.0 is a development branch and not yet released: you probably need to compile this yourself from source, although this page may help. Good luck and let us know if you succeed in getting it working! |
I got gdal 2.0 source from http://trac.osgeo.org/gdal/changeset/27920/trunk?old_path=%2F&format=zip but I can find GDALOpenEx in gdal.h |
Your downloaded GDAL version should be fine. From the error message it looks like cmake is not finding this new GDAL 2.0 version: cmake looks for the function |
the error happened in check_library_exists(gdal GDALOpenEx "gdal.h" HAVE_UNIFIED_GDAL),I debug the script,it has the right $GDAL_LIBRARY and $GDAL_INCLUDE_DIRS,in the GDAL_INCLUDE_DIRS \gdal.h,it has the method GDALOpenEx also. |
It sounds like this may be a problem with cmake on Windows in that case. If you are sure cmake has found the correct version of GDAL, you can try commenting out lines 10 to 14 inclusive in |
I commenting the lines ,but too much error happened. I debug the cmakelists.txt again,found CHECK_INCLUDE_FILE(gdal.h HAVE_NET_INET_IN_H) return false.I think there is some problem seriously. I ' trying . I will let you know if there is news.thank you for your attention! |
Yes, it seems like there's either an issue specific to your environment or it is a deeper cmake issue. Either way you may find more help on the cmake users mailing list. |
Hi, I have same issue. It seems that there is issues with the class exports between projects. I don't know so much about cmake but clearly for a Visual Studio compilation you need to add manually export macro somewhere in ctb project :
Then add CTB_EXPORT on classe declarations which need it, like :
Another solution would be to define .def file for the exports. I have just finished compilation, the program seems to work, just need to set correct environment variables and/or copy dependency libraries. HTH |
@Jule- Thank you for that insight. Your I'm afraid I don't have access to a windows compilation environment to test these changes but I am happy to accept a pull request. |
@homme I've done a fresh build from scratch with your recommendations. I'm afraid that this is a little bit more complicated than you thought. In fact setting In brief, from my new start, in order to make it work I have to:
and
It seems that some directive are not compliant with Visual compiler.
i_tile tx = (i_tile) ceil((float)pixel.x / mTileSize),
ty = (i_tile) ceil((float)pixel.y / mTileSize); Tell me if I'm wrong but since they are integers we can just write: i_tile tx = pixel.x / mTileSize,
ty = pixel.y / mTileSize; I don't want to mess up with the cross compilation so I've corrected with the first less optimized correction.
#ifndef CPL_DLL
#if defined(_MSC_VER) && !defined(CPL_DISABLE_DLL)
# define CPL_DLL __declspec(dllexport)
#else
# if defined(USE_GCC_VISIBILITY_FLAG)
# define CPL_DLL __attribute__ ((visibility("default")))
# else
# if defined(_MSC_VER)
# define CPL_DLL __declspec(dllimport)
# else
# define CPL_DLL
# endif
# endif
#endif
#endif
NB: For @homme I don't know how to properly modify your project in order to send you a pull request since I had to modify EDIT: For the record I use CMake 3.0.2 which is different from the original subject (2.8.12.2). |
Trying to produce my terrain, I issued some tile path shifting, then I realized that I missed one point... I naturally correct your If so the right code is: i_tile tx = (i_tile) floor((float)pixel.x / mTileSize),
ty = (i_tile) floor((float)pixel.y / mTileSize); or more simply: i_tile tx = (i_tile) pixel.x / mTileSize,
ty = (i_tile) pixel.y / mTileSize; By the way, it seems that works for me and that mistake could explain #5. |
@Jule- Many thanks for your detailed analysis. I'll have to look at the compilation issues you mention in more detail next week, but thank you for the good catch with the integer division point in your last comment. I would be happy to take a separate pull request with your fix for that. It would be great if it also helps with issue #5. |
Well, it seems there are some issues with terrain generation. I have some error 404 on elevation tile loading and it mess up all elevation loading. It seems that some tile are not generated or some tile are wrongly tag with missing children. |
@Jule- If you are generating a tileset that is not global (i.e. it does not cross the prime meridian) then you may be falling foul of this issue and you need to manually copy a blank tile to the root directory of your tile server. |
Before having this issue I have rewrite smallterrain tile |
@Jule- If you open up a separate issue describing the problem and are able to point me to a small dataset that replicates the problem, along with the command line you used, then I will be able to take a look at it. |
@wenwu20082001 Could you please try compiling again using the latest code from the |
Something happened like this ....Restart your computer,and It works well. |
the par is :
cmake_configuration_types: Debug;Release;MinSizeRel;RelWithDebInfo
cmake_install_prefix: C:/Program Files (x86)/Cesium Terrain Builder
the out information is :
The C compiler identification is MSVC 18.0.21005.1
The CXX compiler identification is MSVC 18.0.21005.1
Check for working C compiler using: Visual Studio 12
Check for working C compiler using: Visual Studio 12 -- works
Detecting C compiler ABI info
Detecting C compiler ABI info - done
Check for working CXX compiler using: Visual Studio 12
Check for working CXX compiler using: Visual Studio 12 -- works
Detecting CXX compiler ABI info
Detecting CXX compiler ABI info - done
Performing Test COMPILER_SUPPORTS_CXX11
Performing Test COMPILER_SUPPORTS_CXX11 - Failed
Performing Test COMPILER_SUPPORTS_CXX0X
Performing Test COMPILER_SUPPORTS_CXX0X - Failed
CMake Error at CMakeLists.txt:20 (message):
The compiler D:/Program Files (x86)/Microsoft Visual Studio
12.0/VC/bin/cl.exe has no C++11 support. Please use a different C++,
compiler.
can tou tell me ,Which compiler I have to choose? gcc or something else ,my os is windows
best wishes!
The text was updated successfully, but these errors were encountered: