Skip to content
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

CMakeModule: Modify find gdal order #796

Closed
wants to merge 4 commits into from
Closed

CMakeModule: Modify find gdal order #796

wants to merge 4 commits into from

Conversation

KangLin
Copy link
Contributor

@KangLin KangLin commented Sep 9, 2016

No description provided.

@jasonbeverage
Copy link
Collaborator

Thanks for the PR, can you explain why this is needed? The FindGDAL.cmake hasn't changed in 5 years and as far as I know we've had no issues related to it.

@KangLin
Copy link
Contributor Author

KangLin commented Sep 9, 2016

I use vs2015 in msys2 bash environment, but it finds gdal.lib. Then, it can not find gdal.lib dependent libraries (for example: odbc, etc.). However, gdal_i.lib containing these dependent information. So the gdal_i to the front, so FindGDAL.cmake to find it.

Error information:
10778‍‍
10779‍‍"C:\projects\rabbitim-third-library\src\osgearth\build_windows_msvc\install.vcxproj" (default target) (1) ->
10780‍‍"C:\projects\rabbitim-third-library\src\osgearth\build_windows_msvc\ALL_BUILD.vcxproj" (default target) (3) ->
10781‍‍"C:\projects\rabbitim-third-library\src\osgearth\build_windows_msvc\src\applications\osgearth_3pv\application_osgearth_3pv.vcxproj" (default target) (4) ->
10782‍‍"C:\projects\rabbitim-third-library\src\osgearth\build_windows_msvc\src\osgEarth\osgEarth.vcxproj" (default target) (5) ->
10783‍‍(Link target) ->
10784‍‍ gdal.lib(ogrmssqlspatialdatasource.obj) : error LNK2019: unresolved external symbol _SQLAllocEnv@4 referenced in function "public: int __thiscall OGRMSSQLSpatialDataSource::Open(char const *,int,int)" (?Open@OGRMSSQLSpatialDataSource@@QAEHPBDHH@Z) [C:\pr‍ojects\rabbitim-third-library\src\osgearth\build_windows_msvc\src\osgEarth\osgEarth.vcxproj]
10785‍‍ gdal.lib(ogrdb2cli.obj) : error LNK2001: unresolved external symbol _SQLAllocEnv@4 [C:\projects\rabbitim-third-library\src\osgearth\build_windows_msvc\src\osgEarth\osgEarth.vcxproj]
10786‍‍ gdal.lib(cpl_odbc.obj) : error LNK2001: unresolved external symbol _SQLAllocEnv@4 [C:\projects\rabbitim-third-library\src\osgearth\build_windows_msvc\src\osgEarth\osgEarth.vcxproj]
10787‍‍ gdal.lib(ogrmssqlspatialdatasource.obj) : error LNK2019: unresolved external symbol _SQLFreeEnv@4 referenced in function "public: int __thiscall OGRMSSQLSpatialDataSource::Open(char const *,int,int)" (?Open@OGRMSSQLSpatialDataSource@@QAEHPBDHH@Z) [C:\pro‍jects\rabbitim-third-library\src\osgearth\build_windows_msvc\src\osgEarth\osgEarth.vcxproj]
10788‍‍ gdal.lib(ogrdb2cli.obj) : error LNK2001: unresolved external symbol _SQLFreeEnv@4 [C:\projects\rabbitim-third-library\src\osgearth\build_windows_msvc\src\osgEarth\osgEarth.vcxproj]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants