Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6111137
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T14:35:45+00:00 2026-05-23T14:35:45+00:00

The plugin has to call functions in an external dependent dll file. I followed

  • 0

The plugin has to call functions in an external dependent dll file.
I followed the tutorial and did the following but still no success.

  • I have pasted a sample.dll file at my project root.

  • I have added the following configuration to projectDef.cmake (projects\plugintest\Win\projectDef.cmake):

    set (LIBRARY_PATH "${CMAKE_CURRENT_SOURCE_DIR}/sample.dll")
    target_link_libraries(${PROJECT_NAME} debug "${LIBRARY_PATH}/debug/sample.dll")
    target_link_libraries(${PROJECT_NAME} optimized "${SANDSTONE_DIR}/release/sample.dll")
    
  • I generated the solution file using
    “firebreath\prep2010.cmd projects build”

    • The generated firebreath solution’s project properties->Configuration properties->linker->Input->Additional dependecies has the appropriate absolute path of dll.
  • I added the following in PluginTestAPI.cpp:

    include "sample.h"
    

Build errors:

Cannot open include file “sample.h” : No such file or directory.

The dll file is a package of header file and lib file. I am able to successfully make calls to the dll using JNA.

I am a Java developer and don’t have much experience in C++ programming. I believe I am missing something fundamental.

Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T14:35:46+00:00Added an answer on May 23, 2026 at 2:35 pm

    The main thing you need to understand that you’re missing here is that you don’t actually link to a DLL; instead, you link to the .lib file that goes with the DLL and that will do the loading of the DLL for you behind the scenes. Wherever you’re building your dependent dll you’ll find that there is also a .lib file; specify that as the link target in target_link_libraries.

    Next if you want it to open include file “sample.h” you’ll need to add the path to sample.h to your include directories using the cmake include_directories command.

    I suspect it’s a typo, but you have also specified sample.dll twice; once in LIBRARY_PATH, and then once in your target_link_libraries call. That’s not going to work, since it’ll cause it to try to link to ${CMAKE_CURRENT_SOURCE_DIR}/sample.dll/debug/sample.dll

    When all else fails open up the project properties in visual studio (since that’s what you’re using) and look at what libraries and include directories there are; that will often help you understand what cmake is actually doing.

    Hope that helps!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using a jQuery plugin that has its functions defined as such: $('#mydiv').pluginAction({ someproperty:
Has anyone used this plugin? I don't know if my setup is right, but
Rails has the rest autho plugin which works well but is there a solution
I am working with a COM plugin interface that has the following function definition:
WordPress has a group of functions call pluggable functions; basically, they are designed to
I'm trying to write a plugin that calls a function (icalendar-import-file) which has the
Does anyone know of a jQuery plugin that has 'helpers' or extensions like those
The Paperclip plugin for Rails has a resize option that keeps the image in
I am using Jquery Cycle Plugin and it has a side panel that highlights
I am looking for a refactoring plugin which specifically has the ability to take

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.