4

I built an application based on QuickFIX Engine in Qt, named fixapp; it works fine. My broker asked me to specify a local port to connect to them. Then I couldn't find such configuration file, so I modified the source code of QuickFix.

I used the examples of tradeclient and executor brought by QuickFIX source code to test. This works. tradeclient binds to a local port I specified in configuration file.

However, when I turn to fixapp, using the library built by the modified QuickFIX source code, it doesn't bind to the local port I specified. It seems that the part I modified didn't change the behavior of the program.

What are the potential problems here?

Update: I tried to set some breakpoints in QuickFix source code. In one cpp file I modified, my breakpoint is ignored. It is Debug Mode, not release mode. I feel like that it is running the old cpp file and showing the new cpp file.

Kuba hasn't forgotten Monica
  • 95,931
  • 16
  • 151
  • 313
Ian Xu
  • 79
  • 6
  • What is the exact error message you receive? – Andrew Tomazos Sep 12 '12 at 02:45
  • Hi Andrew, I don't have any error message. It just doesn't bind to the port I specified. I expect the fixApp works as tradeclient to bind to the port I specified. – Ian Xu Sep 12 '12 at 02:50
  • Have you got Qt logging turned on? – Andrew Tomazos Sep 12 '12 at 02:57
  • you mean something like qDebug() ? – Ian Xu Sep 12 '12 at 03:01
  • 2
    So the Qt libraries have a debug mode where they will log error messages. If you are using the Qt network module and it is the one failing to bind then if you turn logging on in them you should get an error message that will help identify the problem if you turn on debugging. http://qt-project.org/doc/qt-4.8/debug.html – Andrew Tomazos Sep 12 '12 at 03:16
  • I checked the link you sent me. I install the Qt with default settings. It seems that -debug is employed. One more thing, I can use qDebug(). does this mean I've turned the Debugging mode on? Once on, will the error message show up in window `Application Output`? I went through the `Application Output` and`Compile Output`, it seems nothing related to binding showed up. By the way, is it possible to have a standard output window besides the gui window created by `fixapp`? I want to modify the source code to output something to help me determine what's the problem. – Ian Xu Sep 12 '12 at 03:28
  • Have you tried setting a breakpoint just before the part where it is supposed to be binding, and stepping through it and checking the relevant variable states and return value? – Andrew Tomazos Sep 12 '12 at 03:37

1 Answers1

0

The asker found that quickfix library path is .../quickfix/lib, and the path I reference to the external lib in fixapp is also .../quickfix/lib. However when he checked the library path in /usr/lib, the library is still the old one. Once he replaced the one in /usr/lib, the fixapp started to work. He doesn't know why the path he referenced in Qt doesn't work but the /usr/lib works.

Kuba hasn't forgotten Monica
  • 95,931
  • 16
  • 151
  • 313