Author Topic: Etrade API:Need help getting it to work.  (Read 10083 times)

Offline djf232

  • Single posting newcomer
  • *
  • Posts: 3
Etrade API:Need help getting it to work.
« on: August 28, 2017, 01:53:03 am »
I've been trying to get Etrade's API to work. They provide a SDK for c++, and I have been trying to write a basic program in code::blocks using these libraries, but I have been running into a problem. Here is the basic program below:
Code
#include <iostream>
#include <OAuthSDK.h>


 using namespace std;

 int main()
 {
     cout<<"here"<<endl;
     return 0;
 }

The program is giving me an error stating that it can't find SDKDDVer.h. I'm not sure how to fix this error or what this header file actually is. How do I fix this problem so that the program runs?

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: Etrade API:Need help getting it to work.
« Reply #1 on: August 28, 2017, 02:10:16 am »
1) http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_(general)#Q:_How_do_I_report_a_compilation_problem_on_the_forums.3F
2) http://lmgtfy.com/?q=SDKDDVer.h

[EDIT:] I see that i posted the same link on your first post in the forum. We really need more information to help you. This link 1) describes how you can get this information and provide it to us, so we can help you...
« Last Edit: August 28, 2017, 02:12:51 am by BlueHazzard »

Offline djf232

  • Single posting newcomer
  • *
  • Posts: 3
Re: Etrade API:Need help getting it to work.
« Reply #2 on: August 28, 2017, 02:59:23 am »
I am running Code::Blocks version 1.1 on Windows 7. The compiler I use is GNU GCC Compiler.

Description of problem.
I downloaded the ETrade C++ SDK from https://developer.etrade.com/ctnt/dev-portal/getContent?contentUri=Downloads-DocumentationSDKDownloads and I was trying to get it to work. I added the link libraries with the .lib files to the project and the compiler directories containing the .h files. I then built and ran the program shown and getting the errors. I am assuming that the SDKDDVer.h is some header file associated with the visual c++ sdk so I downloaded the redistributable, but I can't find this header file on my pc anywhere so I don't know how to tell codeblocks where it is so it can use it.

Build log:
Code
-------------- Build: Debug in EtradeProject1 (compiler: GNU GCC Compiler)---------------

mingw32-g++.exe -Wall -fexceptions -g -IC:\Lib\libcurl-7.19.3-win32-ssl-msvc\include -IC:\Lib\vc_sdk\Accounts -IC:\Lib\vc_sdk\Market -IC:\Lib\vc_sdk\OAuth -IC:\Lib\vc_sdk\Order -IC:\Lib\vc_sdk\Accounts\ETCOMMON -c C:\Users\jr\Desktop\EtradeProject1\main.cpp -o obj\Debug\main.o
In file included from C:\Lib\vc_sdk\OAuth\ETCOMMON\StdAfx.h:11:0,
                 from C:\Lib\vc_sdk\OAuth\ETCOMMON\CommonDefs.h:6,
                 from C:\Lib\vc_sdk\OAuth/OAuthSDK.h:6,
                 from C:\Users\jr\Desktop\EtradeProject1\main.cpp:2:
C:\Lib\vc_sdk\OAuth\ETCOMMON\targetver.h:8:23: fatal error: SDKDDKVer.h: No such file or directory
compilation terminated.
Process terminated with status 1 (0 minute(s), 0 second(s))
1 error(s), 0 warning(s) (0 minute(s), 0 second(s))

It didn't crash.

Offline sodev

  • Regular
  • ***
  • Posts: 497
Re: Etrade API:Need help getting it to work.
« Reply #3 on: August 28, 2017, 12:51:14 pm »
I am running Code::Blocks version 1.1 on Windows 7. The compiler I use is GNU GCC Compiler.
Uhm, how old is that CodeBlocks? 10 years? And which of the various flavors and versions of gcc is that?

Quote
I am assuming that the SDKDDVer.h is some header file associated with the visual c++ sdk so I downloaded the redistributable
There is no Visual C++ SDK, there is only the C/C++ Runtime and this is basically spoken part of the compiler, it cannot be used by anything else but Visual Studio. The Redistributable is just the DLLs of that for use by programs that are compiled with Visual Studio and dont link the Runtime statically.

I didnt download that Etrade thing but i assume it is not in source form but compiled libs plus headers, and from what it includes i guess its compiled by Visual Studio. You cannot use libraries made by Visual Studio with GCC. If there is no Etrade thing for GCC you simply cannot use it with that compiler. You have to use Visual Studio, exactly the same version the Etrade thing was compiled with.

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: Etrade API:Need help getting it to work.
« Reply #4 on: August 28, 2017, 10:23:22 pm »
yea, the problem is that this is probably part of the ddk and some version of mingw don't ship with this header.

You may face a lot problems here, because you try to use a vc++ library with mingw. I don't say it won't work, but it is not a easy way.
You probably will read this page: http://www.mingw.org/wiki/createimportlibraries

About the header problem: You need a newer Mingw compiler, for example this one: http://forums.codeblocks.org/index.php/topic,22103.0/topicseen.html