Пыьаюсь подключить библиотеку Quarter, для того чтобы исплоьзовать coin3d и qt вместе.
| Код |
#include <QtGui/QApplication>
#include <Inventor/nodes/SoBaseColor.h> #include <Inventor/nodes/SoCone.h> #include <Inventor/nodes/SoSeparator.h>
#include <Quarter/Quarter.h> #include <Quarter/QuarterWidget.h>
using namespace SIM::Coin3D::Quarter;
int main(int argc, char ** argv) { QApplication app(argc, argv); // Initializes Quarter library (and implicitly also the Coin and Qt // libraries). Quarter::init();
// Make a dead simple scene graph by using the Coin library, only // containing a single yellow cone under the scenegraph root. SoSeparator * root = new SoSeparator; root->ref();
SoBaseColor * col = new SoBaseColor; col->rgb = SbColor(1, 1, 0); root->addChild(col);
root->addChild(new SoCone);
// Create a QuarterWidget for displaying a Coin scene graph QuarterWidget * viewer = new QuarterWidget; viewer->setSceneGraph(root);
// make the viewer react to input events similar to the good old // ExaminerViewer viewer->setNavigationModeFile(QUrl("coin:///scxml/navigation/examiner.xml"));
// Pop up the QuarterWidget viewer->show(); // Loop until exit. app.exec(); // Clean up resources. root->unref(); delete viewer;
Quarter::clean();
return 0; }
//#include <QtCore/QCoreApplication>
//int main(int argc, char *argv[]) //{ // QCoreApplication a(argc, argv);
// return a.exec(); //}
Пишет
|
| Код | C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\Inventor\C\basic.h:288: ошибка: C1189: #error: Define either COIN_DLL or COIN_NOT_DLL as appropriate for your linkage! See Inventor/C/basic.h for further instructions.
|
Вот что написано в basic.h
| Код | On MSWindows platforms, one of these defines must always be set when building application programs:
- "COIN_DLL", when the application programmer is using the library in the form of a dynamic link library (DLL)
- "COIN_NOT_DLL", when the application programmer is using the library in the form of a static object library (LIB)
Note that either COIN_DLL or COIN_NOT_DLL _must_ be defined by the application programmer on MSWindows platforms, or else the #error statement will hit. Set up one or the other of these two defines in your compiler environment according to how the library was built -- as a DLL (use "COIN_DLL") or as a LIB (use "COIN_NOT_DLL").
(Setting up defines for the compiler is typically done by either adding something like "/DCOIN_DLL" to the compiler's argument line (for command-line build processes), or by adding the define to the list of preprocessor symbols in your IDE GUI (in the MSVC IDE, this is done from the "Project"->"Settings" menu, choose the "C/C++" tab, then "Preprocessor" from the dropdown box and add the appropriate define)).
|
|