Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Can't find files even though files are found
Forum Updated to NodeBB v4.3 + New Features

Can't find files even though files are found

Scheduled Pinned Locked Moved Solved General and Desktop
2 Posts 1 Posters 422 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • serkan_trS Offline
    serkan_trS Offline
    serkan_tr
    wrote on last edited by
    #1

    I'm building a project via QT. It works correctly on the computer where I am compiling my project. but when run on another computer, it does not see the .dll files belonging to the gstreamer application. and it gives error. When I say "OK" to all the errors, the application opens and works correctly. it gives me a direct path on the error screen. In the form
    C:\gstreamer\1.0\msvc_x86_64\bin.
    It says <dll_name>.dll does not exist in this path. When I go and look at that path, I see that the specified .dll file is there.

    NOTE: I am doing windeploy.
    cmake file:

    
    if(LINUX)
    	# TODO: investigate https://github.com/probonopd/linuxdeployqt
    
    	add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/release/package/QGroundControl.AppImage
    		COMMAND ${CMAKE_SOURCE_DIR}/deploy/create_linux_appimage.sh ${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} ${CMAKE_BINARY_DIR}/release/package;
    		DEPENDS QGroundControl
    		USES_TERMINAL
    	)
    	add_custom_target(appimage DEPENDS ${CMAKE_BINARY_DIR}/release/package/QGroundControl.AppImage)
    
    elseif(APPLE)
    
    	get_target_property(_qmake_executable Qt5::qmake IMPORTED_LOCATION)
    	get_filename_component(_qt_bin_dir "${_qmake_executable}" DIRECTORY)
    	find_program(MACDEPLOYQT_EXECUTABLE macdeployqt HINTS "${_qt_bin_dir}")
    
    	add_custom_target(dmg)
    
    	if(GST_FOUND)
    		add_custom_command(TARGET dmg
    			OUTPUT
    			COMMAND
    				${CMAKE_SOURCE_DIR}/tools/prepare_gstreamer_framework.sh ${CMAKE_BINARY_DIR}/gstwork/ QGroundControl.app QGroundControl
    		)
    	endif()
    
    	add_custom_command(TARGET dmg
    		OUTPUT
    		COMMAND
    			${MACDEPLOYQT_EXECUTABLE} $<TARGET_FILE_DIR:QGroundControl>/../.. -appstore-compliant -qmldir=${CMAKE_SOURCE_DIR}/src
    		COMMAND
    			rsync -a ${CMAKE_SOURCE_DIR}/libs/Frameworks $<TARGET_FILE_DIR:QGroundControl>/../../Contents/
    		COMMAND
    			${CMAKE_INSTALL_NAME_TOOL} -change "@rpath/SDL2.framework/Versions/A/SDL2" "@executable_path/../Frameworks/SDL2.framework/Versions/A/SDL2" $<TARGET_FILE:QGroundControl>
    		COMMAND
    			mkdir -p ${CMAKE_BINARY_DIR}/package
    		COMMAND
    			mkdir -p ${CMAKE_BINARY_DIR}/staging
    		COMMAND
    			rsync -a --delete ${CMAKE_BINARY_DIR}/QGroundControl.app ${CMAKE_BINARY_DIR}/staging
    		COMMAND
    			hdiutil create /tmp/tmp.dmg -ov -volname "QGroundControl-$${APP_VERSION_STR}" -fs HFS+ -srcfolder "staging"
    		COMMAND
    			hdiutil convert /tmp/tmp.dmg -format UDBZ -o ${CMAKE_BINARY_DIR}/package/QGroundControl.dmg
    	)
    
    	set_target_properties(QGroundControl PROPERTIES MACOSX_BUNDLE YES)
    
    elseif(WIN32)
    	if(MSVC) # Check if we are using the Visual Studio compiler
    		set_target_properties(${PROJECT_NAME} PROPERTIES
    			WIN32_EXECUTABLE YES
    			LINK_FLAGS "/ENTRY:mainCRTStartup"
    		)
    	endif()
    
    	# deploy
    	include(Windeployqt)
    	windeployqt(QGroundControl "QGroundControl-installer.exe")
    
    	add_custom_command(TARGET QGroundControl POST_BUILD
    		COMMAND ${CMAKE_COMMAND} -E
    		copy_if_different $<TARGET_FILE:sdl2> $<TARGET_FILE_DIR:QGroundControl>
    	)
    
    elseif(ANDROID)
    	include(AddQtAndroidApk)
    	add_qt_android_apk(QGroundControl.apk QGroundControl
    		PACKAGE_NAME "io.mavlink.qgroundcontrol"
    		#KEYSTORE ${CMAKE_CURRENT_LIST_DIR}/mykey.keystore myalias
    		#KEYSTORE_PASSWORD xxxxx
    	)
    endif()
    
    
    serkan_trS 1 Reply Last reply
    0
    • serkan_trS serkan_tr

      I'm building a project via QT. It works correctly on the computer where I am compiling my project. but when run on another computer, it does not see the .dll files belonging to the gstreamer application. and it gives error. When I say "OK" to all the errors, the application opens and works correctly. it gives me a direct path on the error screen. In the form
      C:\gstreamer\1.0\msvc_x86_64\bin.
      It says <dll_name>.dll does not exist in this path. When I go and look at that path, I see that the specified .dll file is there.

      NOTE: I am doing windeploy.
      cmake file:

      
      if(LINUX)
      	# TODO: investigate https://github.com/probonopd/linuxdeployqt
      
      	add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/release/package/QGroundControl.AppImage
      		COMMAND ${CMAKE_SOURCE_DIR}/deploy/create_linux_appimage.sh ${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} ${CMAKE_BINARY_DIR}/release/package;
      		DEPENDS QGroundControl
      		USES_TERMINAL
      	)
      	add_custom_target(appimage DEPENDS ${CMAKE_BINARY_DIR}/release/package/QGroundControl.AppImage)
      
      elseif(APPLE)
      
      	get_target_property(_qmake_executable Qt5::qmake IMPORTED_LOCATION)
      	get_filename_component(_qt_bin_dir "${_qmake_executable}" DIRECTORY)
      	find_program(MACDEPLOYQT_EXECUTABLE macdeployqt HINTS "${_qt_bin_dir}")
      
      	add_custom_target(dmg)
      
      	if(GST_FOUND)
      		add_custom_command(TARGET dmg
      			OUTPUT
      			COMMAND
      				${CMAKE_SOURCE_DIR}/tools/prepare_gstreamer_framework.sh ${CMAKE_BINARY_DIR}/gstwork/ QGroundControl.app QGroundControl
      		)
      	endif()
      
      	add_custom_command(TARGET dmg
      		OUTPUT
      		COMMAND
      			${MACDEPLOYQT_EXECUTABLE} $<TARGET_FILE_DIR:QGroundControl>/../.. -appstore-compliant -qmldir=${CMAKE_SOURCE_DIR}/src
      		COMMAND
      			rsync -a ${CMAKE_SOURCE_DIR}/libs/Frameworks $<TARGET_FILE_DIR:QGroundControl>/../../Contents/
      		COMMAND
      			${CMAKE_INSTALL_NAME_TOOL} -change "@rpath/SDL2.framework/Versions/A/SDL2" "@executable_path/../Frameworks/SDL2.framework/Versions/A/SDL2" $<TARGET_FILE:QGroundControl>
      		COMMAND
      			mkdir -p ${CMAKE_BINARY_DIR}/package
      		COMMAND
      			mkdir -p ${CMAKE_BINARY_DIR}/staging
      		COMMAND
      			rsync -a --delete ${CMAKE_BINARY_DIR}/QGroundControl.app ${CMAKE_BINARY_DIR}/staging
      		COMMAND
      			hdiutil create /tmp/tmp.dmg -ov -volname "QGroundControl-$${APP_VERSION_STR}" -fs HFS+ -srcfolder "staging"
      		COMMAND
      			hdiutil convert /tmp/tmp.dmg -format UDBZ -o ${CMAKE_BINARY_DIR}/package/QGroundControl.dmg
      	)
      
      	set_target_properties(QGroundControl PROPERTIES MACOSX_BUNDLE YES)
      
      elseif(WIN32)
      	if(MSVC) # Check if we are using the Visual Studio compiler
      		set_target_properties(${PROJECT_NAME} PROPERTIES
      			WIN32_EXECUTABLE YES
      			LINK_FLAGS "/ENTRY:mainCRTStartup"
      		)
      	endif()
      
      	# deploy
      	include(Windeployqt)
      	windeployqt(QGroundControl "QGroundControl-installer.exe")
      
      	add_custom_command(TARGET QGroundControl POST_BUILD
      		COMMAND ${CMAKE_COMMAND} -E
      		copy_if_different $<TARGET_FILE:sdl2> $<TARGET_FILE_DIR:QGroundControl>
      	)
      
      elseif(ANDROID)
      	include(AddQtAndroidApk)
      	add_qt_android_apk(QGroundControl.apk QGroundControl
      		PACKAGE_NAME "io.mavlink.qgroundcontrol"
      		#KEYSTORE ${CMAKE_CURRENT_LIST_DIR}/mykey.keystore myalias
      		#KEYSTORE_PASSWORD xxxxx
      	)
      endif()
      
      
      serkan_trS Offline
      serkan_trS Offline
      serkan_tr
      wrote on last edited by
      #2

      @serkan_tr I added the variable "PKG_CONFIG_PATH" to the environment variables and the problem was solved

      1 Reply Last reply
      0
      • serkan_trS serkan_tr has marked this topic as solved on

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved