Ib Api ?

I get this error when I try to compile a simple C++ application using the IB API.

It doesn't know the defined "type". Would anyone know what I should do in order to get around this???



1>c:\jts\ib_\ib_\ewrapper.h(65) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\jts\ib_\ib_\ewrapper.h(65) : error C2143: syntax error : missing ',' before '&'
1>c:\jts\ib_\ib_\ewrapper.h(66) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\jts\ib_\ib_\ewrapper.h(66) : error C2143: syntax error : missing ',' before '&'
1>c:\jts\ib_\ib_\ewrapper.h(68) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\jts\ib_\ib_\ewrapper.h(68) : error C2143: syntax error : missing ',' before '&'
1>c:\jts\ib_\ib_\ewrapper.h(72) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\jts\ib_\ib_\ewrapper.h(72) : error C2143: syntax error : missing ',' before '&'
1>c:\jts\ib_\ib_\ewrapper.h(74) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\jts\ib_\ib_\ewrapper.h(74) : error C2143: syntax error : missing ',' before '&'
1>c:\jts\ib_\ib_\ewrapper.h(78) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\jts\ib_\ib_\ewrapper.h(78) : error C2143: syntax error : missing ',' before '&'
1>c:\jts\ib_\ib_\ewrapper.h(79) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\jts\ib_\ib_\ewrapper.h(79) : error C2143: syntax error : missing ',' before '&'
1>c:\jts\ib_\ib_\ewrapper.h(84) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\jts\ib_\ib_\ewrapper.h(84) : error C2146: syntax error : missing ',' before identifier 'errorString'
1>c:\jts\ib_\ib_\ewrapper.h(87) : error C2061: syntax error : identifier 'CString'
1>c:\jts\ib_\ib_\ewrapper.h(89) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\jts\ib_\ib_\ewrapper.h(89) : error C2143: syntax error : missing ',' before '&'
1>c:\jts\ib_\ib_\ewrapper.h(90) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\jts\ib_\ib_\ewrapper.h(90) : error C2143: syntax error : missing ',' before '&'
1>c:\jts\ib_\ib_\ewrapper.h(91) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\jts\ib_\ib_\ewrapper.h(91) : error C2143: syntax error : missing ',' before '&'
1>c:\jts\ib_\ib_\ewrapper.h(92) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\jts\ib_\ib_\ewrapper.h(92) : error C2143: syntax error : missing ',' before '&'
1>c:\jts\ib_\ib_\ewrapper.h(94) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\jts\ib_\ib_\ewrapper.h(94) : error C2143: syntax error : missing ',' before '&'
1>c:\jts\ib_\ib_\ewrapper.h(96) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\jts\ib_\ib_\ewrapper.h(96) : error C2143: syntax error : missing ',' before '&'
 
Quote from Sky123987:

I get this error when I try to compile a simple C++ application using the IB API.

It doesn't know the defined "type". Would anyone know what I should do in order to get around this???



1>c:\jts\ib_\ib_\ewrapper.h(65) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\jts\ib_\ib_\ewrapper.h(65) : error C2143: syntax error : missing ',' before '&'
1>c:\jts\ib_\ib_\ewrapper.h(66) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\jts\ib_\ib_\ewrapper.h(66) : error C2143: syntax error : missing ',' before '&'
...

It would help if you could let us know what are the statements on lines 65 and 66 (etc) of ewrapper.h that are producing these error messages.
 
virtual void tickString(TickerId tickerId, TickType tickType, const CString& value) = 0;


The value I guess it doesn't understand is CString, however I can't find a definition for it.


Question, for ever .h file you include in your C++ Project must there be a match .cpp file??
 
CString will be in the MFC headers, if you don't know what I mean by this your going to have a tough time with the rest of the project, if your not good with C++ why not try VB or C#? It will be much easier.

To answer the other question, every .h file does not require a .cpp file, but this depends on what is in the .cpp file.
 
Quote from Craig66:

CString will be in the MFC headers, if you don't know what I mean by this your going to have a tough time with the rest of the project, if your not good with C++ why not try VB or C#? It will be much easier.

To answer the other question, every .h file does not require a .cpp file, but this depends on what is in the .cpp file.

Thank you for your reply. I thought the only programming options were C++ & Java.

I understand C++ might be tough, but I'd still like to dig into it. I have a programmer from the local university coming over to help me out.

I know that MFC stands for microsoft foundation class, so when I open a new project do I have to choose a project under the MFC, because I have been choosing a project under WIN32. Either way, hopefully my programmer guy will be able to answer all these questions
 
I get paid big $$$ to do telecoms pbx integration in C++, but I still used C# to do my IB integration (using this C# API http://www.dinosaurtech.com/), I did this for a number of reasons,
1. GUI & DB integration is much easier.
2. The speed of C# is enough in this instance, remember everything has to go though a Java app (TWS) before getting to IB's servers.
Just a couple of things to consider...
 
Quote from Craig66:

I get paid big $$$ to do telecoms pbx integration in C++, but I still used C# to do my IB integration (using this C# API http://www.dinosaurtech.com/), I did this for a number of reasons,
1. GUI & DB integration is much easier.
2. The speed of C# is enough in this instance, remember everything has to go though a Java app (TWS) before getting to IB's servers.
Just a couple of things to consider...

thank you for that link, howver I think I'm going to continue hacking out the C++ application as there are other brokerages who's API that I would like to use that might not have a plugin available in C#
 
Back
Top