Dev-Cpp

Moderator: Moderator

Dev-Cpp

Postby Hellhound » Mon Aug 08, 2016 10:27 pm

I am trying to use ForexConnect API with Dev-cpp.

I have added the include and lib directories to the compiler directories but the compiler give me error:

C:\Program Files\Candleworks\ForexConnectAPIx64\bin\FXApp1.o FXApp1.cpp:(.text+0x3d): undefined reference to `__imp__ZN13CO2GTransport13createSessionEv'

So can anyone help me with this?
Hellhound
 
Posts: 16
Joined: Sun Mar 31, 2013 10:39 pm

Re: Dev-Cpp

Postby Julia CJ » Tue Aug 09, 2016 5:46 am

Hi Hellhound,

In order investigate this problem, please sent the project with existing issue at my e-mail: ycherepanova@gehtsoft.com.
Julia CJ
 

Re: Dev-Cpp

Postby Hellhound » Tue Aug 09, 2016 6:48 am

Thank you for replying!

I have only downloaded the Dev-cpp on this machine today, started a new window application and done the following things in around 20 minutes: (So I hope I can avoid senting you the files to save some time)

1) Under tool, compiler options, library tab, I added the folder with the ForexConnect.lib file
2) Under tool, compiler options, c include tab, I added the include folder
3) Add the include line "#include <ForexConnect.h>" to the main.cpp generated by the IDE, (Dev-cpp
do not use the stdafx.h file)
4) Add a line of code to the program: IO2GSession *pSession = CO2GTransport::createSession();
inside the main window procedure, under the message WM_CREATE

Do you have any ideas why the program is not compiling? I learned from StackOverflow that undefined reference error arises because the compiler cannot find the implementation of the function, because that I am new to those DLL programming, I can't figure out what's going on...
Hellhound
 
Posts: 16
Joined: Sun Mar 31, 2013 10:39 pm

Re: Dev-Cpp

Postby Julia CJ » Wed Aug 10, 2016 8:08 am

Hi Hellhound,

Probably, you use Win 32 platform in your project. ForexConnect applies x64. You need to use x32 version of ForexConnect or to compile the project as x64.
Julia CJ
 

Re: Dev-Cpp

Postby Hellhound » Wed Aug 10, 2016 10:15 am

I have uninstalled the 64 bit version and reinstalled the 32 bit version. The same error still comes up.

The .h file do have the function declaration, but the error comes up is about a function with a different name which seems to be some kind of generated internal name.

How about Java? can I use Java SE with the API jar file?
Hellhound
 
Posts: 16
Joined: Sun Mar 31, 2013 10:39 pm

Re: Dev-Cpp

Postby Julia CJ » Fri Aug 12, 2016 2:00 am

Hi Hellhound,

Yes, try to use Java. It should work with it.
Julia CJ
 


Return to ForexConnect API

Who is online

Users browsing this forum: No registered users and 9 guests