CHAI3DCHAI3D

normal Can I use CHAI3D with Qt?

More
19 Nov 2015 23:44 #1

Can I use CHAI3D with Qt?

Please Log in or Create an account to join the conversation.

More
19 Nov 2015 23:50 #2

CHAI3D supports the latest Qt5 framework.
An application template can be found in the directory "./templates/Qt"

Please Log in or Create an account to join the conversation.

More
05 Jul 2016 03:25 #3

I am a beginner of Qt.

According to the "readme.txt" file in the templates/qt
I opend chai3d/CMakeLists.txt as a project in the Qt Creator application


And then, I have to add the following options to CMake
-DCMAKE_BUILD_TYPE=Release -Wno-dev
in the configuration dialog.

However, I don't know what the configuration dialog.

Could you tell me the way in detail?

(Qt 5.7.0)


===========================================================
I tried as follows to build the templates/Qt/application.

1. open chai3d-3.1.1/CMakeLists.txt as a project
2. click "Projects" at left menu icons.

Build Setting window
CMake
Add -> String
Setting : -DCMAKE_BUILD_TYPE
Value : Release -Wno-dev

3. Run CMake and Build

4. open templates/Qt/CMakelists.txt as a project
5. click "Projects" at left menu icones.

Build Setting window
CMake
Add -> String
Setting : -DCMAKE_BUILD_TYPE
Value : Release -Wno-dev

Run CMake

6. open templates/Qt/application.pro
Build

Error : LNK2019: unresolved external symbol "public: __thiscall chai3d::cHapticDeviceHandler::cHapticDeviceHandler(void)" (??0 .....

===========================================================

Please Log in or Create an account to join the conversation.

More
09 Jul 2016 04:49 #4

Hello Sunshee,

In order to use CMake and Qt, the CHAI3D library must be built with CMake first. Here are the basic instructions to do just that from a terminal (e.g. DOS prompt on Windows):

  mkdir chai3d-release
  cd chai3d-release
  cmake -DCMAKE_BUILD_TYPE=Release /path/to/chai3d-3.1.1
  cmake --build . --config Release
This will build the CHAI3D library in release configuration, and add it to CMake's list of known projects that CMake maintains on your computer.

Once the CHAI3D library is built, and assuming that you have installed and configured Qt on your machine (and setup CMAKE_PREFIX_PATH to the Qt release of your choice, see stackoverflow.com/questions/22215900/add...to-cmake-prefix-path for details), you can build the CHAI3D Qt template in the same manner. Here are the instructions to build the CHAI3D Qt template from the terminal:
  mkdir chai3d-qt-template-release
  cd chai3d-qt-template-release
  cmake -DCMAKE_BUILD_TYPE=Release /path/to/chai3d-3.1.1/templates/Qt
  cmake --build . --config Release

If CMake and Qt are configured properly, the above should work. You can perform the same operations using QtCreator (you can ignore the -Wno-dev cmake argument, it only removes a harmless warning).

Please Log in or Create an account to join the conversation.