Go to Post Nutritionally speaking I didn't get enough (MOE) green in my FIRST diet this year! - Mark McLeod [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 17-08-2016, 18:48
team-4480's Avatar
team-4480 team-4480 is offline
Debug? What's that?
FRC #4480
 
Join Date: Jan 2015
Rookie Year: 2013
Location: Minnesooota
Posts: 222
team-4480 will become famous soon enoughteam-4480 will become famous soon enough
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!
__________________
#Python4Life

Last edited by team-4480 : 17-08-2016 at 23:08.
Reply With Quote
  #2   Spotlight this post!  
Unread 17-08-2016, 19:17
Rachel Lim Rachel Lim is offline
Registered User
FRC #1868 (Space Cookies)
Team Role: Student
 
Join Date: Sep 2014
Rookie Year: 2014
Location: Moffett Field
Posts: 251
Rachel Lim has a reputation beyond reputeRachel Lim has a reputation beyond reputeRachel Lim has a reputation beyond reputeRachel Lim has a reputation beyond reputeRachel Lim has a reputation beyond reputeRachel Lim has a reputation beyond reputeRachel Lim has a reputation beyond reputeRachel Lim has a reputation beyond reputeRachel Lim has a reputation beyond reputeRachel Lim has a reputation beyond reputeRachel Lim has a reputation beyond repute
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.
Reply With Quote
  #3   Spotlight this post!  
Unread 17-08-2016, 23:36
team-4480's Avatar
team-4480 team-4480 is offline
Debug? What's that?
FRC #4480
 
Join Date: Jan 2015
Rookie Year: 2013
Location: Minnesooota
Posts: 222
team-4480 will become famous soon enoughteam-4480 will become famous soon enough
Re: How do I setup a SDK in C++?

Quote:
Originally Posted by Rachel Lim View Post
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.
Yes, I meant Visual Studio

I tried what you said and it did indeed work! I was starting to pull my hair out! Thanks for your help!
__________________
#Python4Life
Reply With Quote
  #4   Spotlight this post!  
Unread 18-08-2016, 00:32
euhlmann's Avatar
euhlmann euhlmann is online now
CTO, Programmer
AKA: Erik Uhlmann
FRC #2877 (LigerBots)
Team Role: Leadership
 
Join Date: Dec 2015
Rookie Year: 2015
Location: United States
Posts: 349
euhlmann has much to be proud ofeuhlmann has much to be proud ofeuhlmann has much to be proud ofeuhlmann has much to be proud ofeuhlmann has much to be proud ofeuhlmann has much to be proud ofeuhlmann has much to be proud ofeuhlmann has much to be proud of
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
__________________
Creator of SmartDashboard.js, an extensible nodejs/webkit replacement for SmartDashboard


https://ligerbots.org

Last edited by euhlmann : 18-08-2016 at 00:34.
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 23:42.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi