Merging into existing project ->dll

Forum for posting problems using QxOrm library

Merging into existing project ->dll

Postby caseybasichis » Wed May 16, 2012 4:30 pm

Hi,

I've been reading the Dll examples FAQ and the rest of the Docs for the last two days. I've also read up on qmake. My understanding of the functionality of QxOrm is stronger, but the setup has been nightmarish.

I need to load QxOrm in an existing project VST audio plugin, which is a dynamic DLL. That DLL is made by the VST SDK, my code just overrides some of that sdk's functions to create the audio processing. I have a working VST project and I have the dll1/2 example project running, but I am having a great deal of difficulty understanding how to integrate qxorm in the VST project so it will export in a single dll. I don't control the destination app so I can't run QApplication in the exe that is running the plugin.

Can I just create a pro and pri file manually or is there something that is done to the existing visual studio project that the command line process handles? Once the the export.h, precompiled.h MyProjectName.pro files are created and pointing at the right paths should it just work or are there other settings I am unaware of?

Do I need every source file in the pro or just the ones with QxOrm?

I have pulled up the property sheets for the DLL1 project and my project in this screen shot. The options are vastly different, I'm assuming because one was created as a Qt project.
[img]
http://www.caseyjamesbasichis.com/QxOrm/QxOrmComp.PNG
[/img]
Also, what is the best reference for the macros and how they are to be formatted. I see through out the code that some of the defines seem to be arbitrary like _QX_BUILDING_DLL2
where others like _QX_DLL2_EXPORT_H_ are not defined anywhere specific but use a specific formatting to convey the correct information (_QX_PROJECT-NAME_EXPORT_H ?). Searching the Doxygen doesn't allow searching for words like 'export', and searching "_QX_DLL2" doesn't work because of the substitution.

Any thoughts on how I might go about this.
caseybasichis
 

Re: Merging into existing project ->dll

Postby QxOrm admin » Thu May 17, 2012 5:17 pm

Hi,

There are many things into your message, and this is more about managing C++ projects than about QxOrm library ;)

If I understand well, you already have your own VST plugin DLL, for example : MyVSTPlugin.DLL.
And today, this plugin doesn't use Qt.
So when you will deploy your plugin and if you want to use QxOrm library inside it, you will have to provide those followings files :
- MyVSTPlugin.DLL ;
- QxOrm.DLL ;
- boost_serialization.DLL ;
- QtCore4.DLL, QtSql4.DLL, etc.
You could deploy those DLL into the same directory if you want (Windows will load all DLLs automatically when your plugin will be executed).

I can't run QApplication in the exe that is running the plugin

QxOrm needs a QApplication or QCoreApplication instance, so you will have to create it into your plugin (for example, into the entry point of the plugin DLL).

Can I just create a pro and pri file manually or is there something that is done to the existing visual studio project that the command line process handles? Once the the export.h, precompiled.h MyProjectName.pro files are created and pointing at the right paths should it just work or are there other settings I am unaware of?
Do I need every source file in the pro or just the ones with QxOrm?

In your plugin project, to compile it, you cannot mix *.pro files and MSVC project manager => you have to choose : you compile all your plugin using qmake, or using MSVC.
All examples projects of QxOrm library are based on qmake, and use nmake command line to build the binaries (qmake & nmake debug).
Using qmake is more easier with Qt projects (and QxOrm library is a Qt project).
But you can use directly MSVC if you want, but in this case you have to define all dependencies to Qt binaries yourself.

Sorry, but this is not very easy to answer to your question because it's very global and a common thing for all C++ projects !
For all C++ projects, you must define all dependencies (*.lib files associated to *.dll files).

Also, what is the best reference for the macros and how they are to be formatted. I see through out the code that some of the defines seem to be arbitrary like _QX_BUILDING_DLL2
where others like _QX_DLL2_EXPORT_H_ are not defined anywhere specific but use a specific formatting to convey the correct information (_QX_PROJECT-NAME_EXPORT_H ?). Searching the Doxygen doesn't allow searching for words like 'export', and searching "_QX_DLL2" doesn't work because of the substitution.

There is no rule for that, you give a name to your macros as you want !
For QxOrm library, I start all macros with QX_... prefix.
For headers files, I start with _QX_... prefix.
QxOrm admin
 


Return to QxOrm - Help

Who is online

Users browsing this forum: No registered users and 5 guests