LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Add dll library made in C++ to a project in CVI

Greetings ... I tell you that I am new to the CVI environment and I am trying to add a dll library that I did in C++ to be able to call a function inside the library that executes windows commands to record the bootloader in an ATMEGA328P. I have included the dll library in my project, but it does not work for me and it gives me an error. Someone who can help me with this problem please, thanks in advance (I leave attached an image of the error I get and the dll library project I did in Visual Studio 2015).

Download All
0 Kudos
Message 1 of 7
(2,658 Views)

Hello Cesar,

 

The error you are seeing is because burn_bootloader() is not declared. Just #include "BurnBoardSetup.h" in your c file

0 Kudos
Message 2 of 7
(2,626 Views)

Thanks for answering ConstantinP ... I commented that I added "BurnBoardSetup.h" but I still got the same error. I found a way to compile my project and it is disabling the option "Require function prototypes" that is the Options>Build Options section, although I do not know if it is the best solution.

0 Kudos
Message 3 of 7
(2,617 Views)

Cesar,

 

What do you mean by adding "BurnBoardSetup.h"?

Do you have at the beginning of CVISrcFile.c the following line:

#include "BurnBoardSetup.h"
0 Kudos
Message 4 of 7
(2,612 Views)

Yes, I told you to add it to the start of my CVISrcFile.c file, and I still had the same error.

0 Kudos
Message 5 of 7
(2,605 Views)

Are you sure that the function that you want to use, is inside of BurnBoardSetup.h ?

0 Kudos
Message 6 of 7
(2,563 Views)

Yes, the functions that I need are described in BurnBoardSetup.h, you can check it by looking at the project that I have attached at the beginning. As I mentioned before, I managed to compile my project, but now the problem I'm having is that when calling any of the BurnBoardSetup.h functions that execute the cmd, this cmd window opens and quickly closes, and it's something that It should not happen, since it should show the entire ATMEGA328P recording process as shown in the following images in the case of recording the bootloader.

Download All
0 Kudos
Message 7 of 7
(2,552 Views)