|
|
Home » U++ TheIDE » U++ TheIDE: Compiling, Linking, Debugging of your packages » Compiling a POSIX Package
Compiling a POSIX Package [message #49125] |
Thu, 21 December 2017 07:37 |
morley
Messages: 10 Registered: January 2007
|
Promising Member |
|
|
Hi Everyone, I am trying to develop some code around this API, which interfaces to the Interactive Brokers trading platform. I would like to learn about automated trading. The gentlemen that developed it made some modifications to the the Interoffice Brokers API to make it run under Posix. I would like to be able to utilize this code. Here is what he writes: I don't want to just compile it though, I want to use upp to do some further work on it. Here is the overview:
************************************************************ **********************************
Portable C++ API for Interactive Brokers TWS
============================================
This twsapi is almost identical to the original IB C++ Posix API. It contains
several bugfixes, usage improvements and it's using the autotools build system.
For more details read "Changes of original IB API" below.
The project homepage (bugtracker, latest git repo) is hosted on [github]
(https://github.com/rudimeier/twsapi)
Released source tarballs download [here]
(https://bitbucket.org/rudimeier/twsapi/downloads)
Binary rpms for various Linux distros [here]
( http://software.opensuse.org/download.html?project=home:rudi _m&package=twsapi)
Installation
------------
Building from source requires a C++ compiler. It has been very well tested with
GNU gcc/g++ and Intel icc/icpc on various Linux distros, MacOSX and
Windows/Cygwin. Native Windows/Mingw is also supported.
When building from git checkout you need both autotools and libtool. Also,
don't forget to type `autoreconf -vfi` first.
```bash
./configure
make
make install
```
************************************************************ **********************************
I would like to be able to compile and to further work on Upp. There are two folders
involved: PosixSocketClient and TestPosixSocketClient.
So my approach was to first build PosixSocketClient as a package, and then reference the package in TestPosixSocketClient. I am having a problem getting PosixSocketClient to build. I think some of the problems are alluded to in the make file:
____________________________________________________________ ______________
LANG = C
LC_ALL = C
ACLOCAL_AMFLAGS = -I m4
SUBDIRS = PosixSocketClient TestPosixSocketClient
nodist_header_HEADERS =
nodist_header_HEADERS += twsapi_config.h
twsapi_config.h: config.h API_VersionNum.txt gen_twsapi_config_h \
Shared/EClientSocketBaseImpl.h
$(srcdir)/gen_twsapi_config_h config.h $(srcdir)/API_VersionNum.txt \
$(srcdir)/Shared/EClientSocketBaseImpl.h > $@.tmp \
&& mv $@.tmp $@
____________________________________________________________ ________________
I was able to get through most of the errors which was mostly just pointing upp to the shared header files, however I have some tougher problems with gen_twsapi_config_h. The autorreconf /make file scripts apparently takes gen_twsapi_config.h and turns it into config.h. But there is a lot going on. Can I do this on windows easily, or do I have to do this in linux with autoreconf and make? I am using the mingw64 version of upp.
Thanks!
|
|
|
Re: Compiling a POSIX Package [message #49126 is a reply to message #49125] |
Thu, 21 December 2017 09:20 |
Oblivion
Messages: 1091 Registered: August 2007
|
Senior Contributor |
|
|
Hello, and welcome to Upp forums!
I am not familiar with that package, but I am familiar with using 3rd party packages -especially C libararies- in U++ libs and apps.
My strategy would be to first successfully compile the relevant 3rd party package separately on the target platform (using make, or cmake if possible), and then look into the config.h (or whatever config files created by configure/make/cmake. They usually create a final config.h which contains the necessary preprocessor flags that will let the package compile). Then add the source code of the given package to my app, and it's config.h (or whatever it is named) file.
Since this package supports Windows and MinGW, same strategy should apply to the MinGW builds.
This method always worked for me.
Best regards,
Oblivion
Github page: https://github.com/ismail-yilmaz
upp-components: https://github.com/ismail-yilmaz/upp-components
Bobcat the terminal emulator: https://github.com/ismail-yilmaz/Bobcat
[Updated on: Thu, 21 December 2017 10:01] Report message to a moderator
|
|
|
|
|
Goto Forum:
Current Time: Fri Mar 29 01:46:31 CET 2024
Total time taken to generate the page: 0.03362 seconds
|
|
|