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

Compiling for Win other files needed. #4

Open
rgleason opened this issue Feb 5, 2015 · 0 comments
Open

Compiling for Win other files needed. #4

rgleason opened this issue Feb 5, 2015 · 0 comments

Comments

@rgleason
Copy link

rgleason commented Feb 5, 2015

Does this do independent compile? - If not, please disregard.
[LATER- It does do independent compile with the changes noted below}
Trying as an independent compile - First try
After copy opencpn.lib from v4.0 into the /build directory.
Needed ../include/opncpn_plugin.h in the src directory due to link errors.

Then cmake .. and cmake --build . --config release

Build FAILED.
"C:\Data-Dart\Up-Soft\Navigation\o-plugin\s63_pi\build\ALL_BUILD.vcxproj" (default target) (1) ->
"C:\Data-Dart\Up-Soft\Navigation\o-plugin\s63_pi\build\s63_pi.vcxproj" (defaulttarget) (3) ->(Link target) ->
LINK : fatal error LNK1181: cannot open input file 'E:\opencpn_cmake2010\release\opencpn.lib'
[C:\Data-Dart\Up-Soft\Navigation\o-plugin\s63_pi\build\s63_pi.vcxproj]
0 Warning(s)
1 Error(s)

Error comes from CMakeLists.txt file Line 200

 IF(WIN32)
#  SET(OPENCPN_IMPORT_LIB "opencpn.lib")
  SET(OPENCPN_IMPORT_LIB "E:/opencpn_cmake2010/${CMAKE_CFG_INTDIR}/opencpn.lib")
  TARGET_LINK_LIBRARIES( ${PACKAGE_NAME} ${OPENCPN_IMPORT_LIB} )
#  ADD_DEPENDENCIES(${PACKAGE_NAME} ${PARENT})
ENDIF(WIN32) 

So, I un-commented line 199 and commented line 200

 SET(OPENCPN_IMPORT_LIB "opencpn.lib")
# SET(OPENCPN_IMPORT_LIB "E:/opencpn_cmake2010/${CMAKE_CFG_INTDIR}/opencpn.lib")

And it compiled for both cmake --build .
and cmake --build . --config release

When I did cpack the second time, after a failure, it compiled successfully.

Maybe the README under Windows should clarify this?

bdbcat added a commit that referenced this issue Jul 4, 2021
bdbcat added a commit that referenced this issue Jul 4, 2021
bdbcat added a commit that referenced this issue Jul 17, 2021
bdbcat added a commit that referenced this issue Jun 16, 2022
bdbcat added a commit that referenced this issue Jan 19, 2023
bdbcat added a commit that referenced this issue Apr 15, 2023
bdbcat added a commit that referenced this issue Jul 4, 2023
bdbcat added a commit that referenced this issue Dec 18, 2023
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

No branches or pull requests

1 participant