开发者

Linking win32 dll in Qt

开发者 https://www.devze.com 2022-12-27 06:29 出处:网络
I want to reference a win32 dll from my Qt application. I\'ve added the dll location in the .pro file at \"LIBS+=\" . Once that is done, by right, i should be able to include the .h file inside the dl

I want to reference a win32 dll from my Qt application. I've added the dll location in the .pro file at "LIBS+=" . Once that is done, by right, i should be able to include the .h file inside the dll from my application. But i'm unable to do so. I'm testing with the dll here: http://www.flipcode.com/archives/Creating_And_Using_DLLs.shtml

Any he开发者_如何转开发lp would be appreciated!

Thanks


I suppose you also have to add "INCLUDEPATH += path_to_library_headers" to your pro file. "LIBS+=" only tells the linker that some symbols are not in your application code, but in external dll, but you have to tell the compiler where it should look for the library headers.

Hope this helps. If you have any more problems, post the linker/compiler error messages, it would be much easier to tell what's wrong.

0

精彩评论

暂无评论...
验证码 换一张
取 消