|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
How do I setup a SDK in C++?
Hi!
We just received our Cooler Master keyboard and are already excited to start programming different effects(Thanks Cooler Master!). The problem right now is the setup. Cooler Master has an SDK which has a .dll, .lib, and a .h file. I am pretty sure that I have to #include the .h file in the main.cpp file, but that throws a bunch or errors because I am pretty sure I need to do something with the other two files. What exactly am I supposed to do with the .dll and .lib files? I am not super familiar with C++ but aside from the setup, it appears like any other language I've used. I am using Visual Studio 2013. Thanks a bunch in advance! Last edited by team-4480 : 17-08-2016 at 23:08. |
|
#2
|
|||
|
|||
|
Re: How do I setup a SDK in C++?
I'm guessing you meant visual studio 2013 since as you said, the keyboard is programmed in c++ ?
I included stdafx.h, Windows.h, and SDKDLL.h (they need to be in that order or I get a bunch of errors for reasons I don't understand). The .dll and .lib files do have to be in the same folder as the project files (same with targever.h and stdafx.cpp). Let me know if that isn't working. I'm using visual studio 2015 but I think it should work in the same way. |
|
#3
|
||||
|
||||
|
Re: How do I setup a SDK in C++?
Quote:
I tried what you said and it did indeed work! I was starting to pull my hair out! Thanks for your help! |
|
#4
|
||||
|
||||
|
Re: How do I setup a SDK in C++?
For future reference:
.h files contain function / class definitions for your code to use. So, you need to include the .h file for the compiler to know what you mean when you call a library function .dll (dynamic) and .lib (static) library files contain the actual code for the library. The linker needs these to make your program actually run library functions when you make those calls. Basically, the .dll/.lib is the actual library and the .h tells you what's in the library. .dll or dynamic libraries are added in whenever you run your program (so you'll need those in the same folder as your program or on the search path for it to run correctly), while .lib or static libraries are added to your program binary during compilation (so no external dependencies). For your project, you'll only need either the .dll or .lib, depending on which type of library linking you want. Hope this clears things up Last edited by euhlmann : 18-08-2016 at 00:34. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|