I just figured I wanted something more straightforward. So if you only intend to develop using a particular compiler that’s fine. I could use some macros to check for what compiler is being used, but it’s a hassle (to me, at least). If I run the same code in linux it spits out an error. I guess, if I specify a common build directory and have it look for the lib file there it would work… but think about this: _declspec( dllexport ) is microsoft specific. I had to explicitly add the path to the external library, and then place the compiled *.dll in the same directory as the executable. _declspec( dllexport ) double addition(double a, double b) Įven so it still asks for the *.lib file, despite it already being built. Turns out I have to add _declspec( dllexport ) as so: It’s because I’m using the MSVC2013 compiler and it only builds out a *.dll and forgot a *.lib. In addition the example in github ( ) didn’t work either: LNK1104: cannot open file 'myapp.lib'. I had to build out a library file – this is a bit of a hassle to me. Why fork out from Dragly’s project structure? (you can skip to the next part if you want.) This project is actually a simpler fork of his, so credits to him. If you think this post looks familiar, you have probably gone through a similar post from Svenn-Arne Dragly. For this post I will be proposing a project structure in Qt Creator that allows you to have your unit tests project with your main project.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |