Thread: [Quickfix-developers] quickfix_jni.dll compilation problem
Brought to you by:
orenmnero
|
From: Alexander G. <ago...@ac...> - 2006-02-10 12:18:27
|
Hi All,
I am a newbee in Fix. I want to use quickFix as a FIX engine for a new =
project and I have a problem running the junit tests.=20
I downloaded the sources and I tried to compile the quickfix_jni.dll for =
Windows/Java using postgreSQL as the db platform. I did the following:
1. edited the config_windows.h (uncommented #define HAVE_JAVA 1
and #define HAVE_POSTGRESQL 1)
2. Downloaded the windows installer of postgreSQL (v. 8.1.2.) and =
installed the db.
3. Downloaded and installed the "Microsoft Platform SDK" in order to =
have the shfolder.lib.
4. Downloaded the source code of the same version of postgreSQL and with =
the aid of the shfolder.lib compiled the libpqdll.lib.
5. Installed the Microsoft visual C++ 6.0. and opened the =
quickfix_vs6.dsw. In the tools -> options added the following =
directories:
- into the "include files":=20
%java_home%\include
%java_home%\include\win32
%postgres_install_dir%\include
- into the "library files"
%postgres_src_dir%\src\interfaces\libpq\Release\ (containing =
libpgdll.lib).
6. Ran the batch build of the workspace.
7. Opened the eclipse platform and ran the ant build of the build.xml =
from the src/java folder.
8. Ran the junit tests from the quickfix.test packages. The first three =
tests: MessageTest, FieldTest, and DataDictionaryTest executed =
successfully while the last two (DictionaryTest and SessionSettingsTest =
failed with the following error:
java.lang.UnsatisfiedLinkError: create
at quickfix.Dictionary.create(Native Method)
at quickfix.Dictionary.<init>(Dictionary.java:30)
at quickfix.test.DictionaryTest.setUp(DictionaryTest.java:20)
at junit.framework.TestCase.runBare(TestCase.java:138)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:131)
at junit.framework.TestSuite.runTest(TestSuite.java:173)
at junit.framework.TestSuite.run(TestSuite.java:168)
at =
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTes=
tRunner.java:478)
at =
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunn=
er.java:344)
at =
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRun=
ner.java:196)
I investigated a bit and found out that all the failed tests fail while =
running a native method create (from the constructor of the class =
quickfix.Dictionary) which apparently calls the constructor of the =
Dictionary.cpp class.=20
Could someone suggest something to resolve this problem and/or tell how =
important is that these tests fail.
Thank you very much in advance.
Alexander Gorbachev.
|
|
From: Joerg T. <Joe...@ma...> - 2006-02-10 13:47:10
|
Hi Alexander,
> I am a newbee in Fix. I want to use quickFix as a FIX engine for a new =
project and I
> have a problem running the junit tests.
>=20
> I downloaded the sources and I tried to compile the quickfix_jni.dll fo=
r Windows/Java
> using postgreSQL as the db platform. I did the following:
[...]
> java.lang.UnsatisfiedLinkError: create at quickfix.Dictionary.create(Na=
tive Method) at
> quickfix.Dictionary.<init>(Dictionary.java:30) at
> quickfix.test.DictionaryTest.setUp(DictionaryTest.java:20) at
> junit.framework.TestCase.runBare(TestCase.java:138) at
> junit.framework.TestResult$1.protect(TestResult.java:106) at
> junit.framework.TestResult.runProtected(TestResult.java:124) at
> junit.framework.TestResult.run(TestResult.java:109) at
> junit.framework.TestCase.run(TestCase.java:131) at
> junit.framework.TestSuite.runTest(TestSuite.java:173) at
> junit.framework.TestSuite.run(TestSuite.java:168) at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteT=
estRunner.java:478)
> at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRu=
nner.java:344)=20
> at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestR=
unner.java:196)
>=20
> I investigated a bit and found out that all the failed tests fail while=
running a
> native method create (from the constructor of the class quickfix.Dictio=
nary) which
> apparently calls the constructor of the Dictionary.cpp class.
For some reason, a constructor method with the appropriate signature coul=
d not found in=20
the quickfix_jni.dll. I am not a windows expert at all, but I suggest to =
look at the=20
symbols exported by quickfix_jni.dll. Maybe also some dependent library, =
ie the XML=20
library is missing:
Dictionary constructor is called
shared loader loads objects needed by the constructor method...
...ie method/object from quickfix.dll
...shared loader loads objects needed for method/object from qui=
ckfix.dll
......libxml2 stuff not found
Just some thoughts...
> Could someone suggest something to resolve this problem and/or tell how=
important is
> that these tests fail.
Did you try the non-java unit tests? Do they run completely?
Anyway, all tests should run successfully, otherwise your QuickFIX instal=
lation will not=20
be usable.
Cheers, J=F6rg
--=20
Joerg Thoennes
http://macd.com
Tel.: +49 (0)241 44597-24 Macdonald Associates GmbH
Fax : +49 (0)241 44597-10 Lothringer Str. 52, D-52070 Aachen
|
|
From: Oren M. <or...@qu...> - 2006-02-10 19:18:34
|
This isn't that big a deal. Generally you do not need to create a Dictionary class from java. So for standard functionality this isn't likely to be a problem for you. The problem is that quickfix_Dictionary.cpp was not added to the visual studio 6 project file. Also the merge method in there is returning a value even though it is marked void. None of the other compilers complained about this, but vs6 marks it as an error, so you will need to remove the return statement. After doing this all the unit tests should pass. We are checking these fixes into cvs. Otherwise, if the C++ unit tests pass and the java acceptance tests pass, you should be fine. --oren Alexander Gorbachev wrote: > Hi All, > > I am a newbee in Fix. I want to use quickFix as a FIX engine for a new > project and I have a problem running the junit tests. > > I downloaded the sources and I tried to compile the quickfix_jni.dll > for Windows/Java using postgreSQL as the db platform. I did the > following: > > 1. edited the config_windows.h (uncommented #define HAVE_JAVA 1 > and #define HAVE_POSTGRESQL 1) > > 2. Downloaded the windows installer of postgreSQL (v. 8.1.2.) and > installed the db. > > 3. Downloaded and installed the "Microsoft Platform SDK" in order to > have the shfolder.lib. > > 4. Downloaded the source code of the same version of postgreSQL and > with the aid of the shfolder.lib compiled the libpqdll.lib. > > 5. Installed the Microsoft visual C++ 6.0. and opened the > quickfix_vs6.dsw. In the tools -> options added the following > directories: > > - into the "include files": > %java_home%\include > %java_home%\include\win32 > %postgres_install_dir%\include > > - into the "library files" > %postgres_src_dir%\src\interfaces\libpq\Release\ > (containing libpgdll.lib). > > 6. Ran the batch build of the workspace. > > 7. Opened the eclipse platform and ran the ant build of the build.xml > from the src/java folder. > > 8. Ran the junit tests from the quickfix.test packages. The first > three tests: MessageTest, FieldTest, and DataDictionaryTest executed > successfully while the last two (DictionaryTest and > SessionSettingsTest failed with the following error: > > java.lang.UnsatisfiedLinkError: create > at quickfix.Dictionary.create(Native Method) > at quickfix.Dictionary.<init>(Dictionary.java:30) > at quickfix.test.DictionaryTest.setUp(DictionaryTest.java:20) > at junit.framework.TestCase.runBare(TestCase.java:138) > at junit.framework.TestResult$1.protect(TestResult.java:106) > at junit.framework.TestResult.runProtected(TestResult.java:124) > at junit.framework.TestResult.run(TestResult.java:109) > at junit.framework.TestCase.run(TestCase.java:131) > at junit.framework.TestSuite.runTest(TestSuite.java:173) > at junit.framework.TestSuite.run(TestSuite.java:168) > at > org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:478) > at > org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:344) > at > org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196) > > > > I investigated a bit and found out that all the failed tests fail > while running a native method create (from the constructor of the > class quickfix.Dictionary) which apparently calls the constructor of > the Dictionary.cpp class. > > Could someone suggest something to resolve this problem and/or tell > how important is that these tests fail. > > Thank you very much in advance. > > Alexander Gorbachev. > > > |
|
From: Alexander G. <ago...@ac...> - 2006-02-13 09:10:28
|
Oren, Thank you very much. After changing the source code and including the quickfix_Dictionary into the project all the tests pass successfully. Also thanks to Joerg for the participation and his help. Kind regards, Alexander. ----- Original Message ----- From: "Oren Miller" <or...@qu...> To: "Alexander Gorbachev" <ago...@ac...> Cc: <qui...@li...> Sent: Friday, February 10, 2006 8:18 PM Subject: Re: [Quickfix-developers] quickfix_jni.dll compilation problem > > This isn't that big a deal. Generally you do not need to create a > Dictionary class from java. So for standard functionality this isn't > likely to be a problem for you. > > The problem is that quickfix_Dictionary.cpp was not added to the visual > studio 6 project file. Also the merge method in there is returning a > value even though it is marked void. None of the other compilers > complained about this, but vs6 marks it as an error, so you will need to > remove the return statement. After doing this all the unit tests should > pass. We are checking these fixes into cvs. > > Otherwise, if the C++ unit tests pass and the java acceptance tests pass, > you should be fine. > > --oren > > Alexander Gorbachev wrote: > >> Hi All, >> I am a newbee in Fix. I want to use quickFix as a FIX engine for a new >> project and I have a problem running the junit tests. >> I downloaded the sources and I tried to compile the quickfix_jni.dll for >> Windows/Java using postgreSQL as the db platform. I did the following: >> 1. edited the config_windows.h (uncommented #define HAVE_JAVA 1 >> and #define HAVE_POSTGRESQL 1) >> 2. Downloaded the windows installer of postgreSQL (v. 8.1.2.) and >> installed the db. >> 3. Downloaded and installed the "Microsoft Platform SDK" in order to >> have the shfolder.lib. >> 4. Downloaded the source code of the same version of postgreSQL and with >> the aid of the shfolder.lib compiled the libpqdll.lib. >> 5. Installed the Microsoft visual C++ 6.0. and opened the >> quickfix_vs6.dsw. In the tools -> options added the following >> directories: >> - into the "include files": >> %java_home%\include >> %java_home%\include\win32 >> %postgres_install_dir%\include >> - into the "library files" >> %postgres_src_dir%\src\interfaces\libpq\Release\ (containing >> libpgdll.lib). >> 6. Ran the batch build of the workspace. >> 7. Opened the eclipse platform and ran the ant build of the build.xml >> from the src/java folder. >> 8. Ran the junit tests from the quickfix.test packages. The first three >> tests: MessageTest, FieldTest, and DataDictionaryTest executed >> successfully while the last two (DictionaryTest and SessionSettingsTest >> failed with the following error: >> java.lang.UnsatisfiedLinkError: create >> at quickfix.Dictionary.create(Native Method) >> at quickfix.Dictionary.<init>(Dictionary.java:30) >> at quickfix.test.DictionaryTest.setUp(DictionaryTest.java:20) >> at junit.framework.TestCase.runBare(TestCase.java:138) >> at junit.framework.TestResult$1.protect(TestResult.java:106) >> at junit.framework.TestResult.runProtected(TestResult.java:124) >> at junit.framework.TestResult.run(TestResult.java:109) >> at junit.framework.TestCase.run(TestCase.java:131) >> at junit.framework.TestSuite.runTest(TestSuite.java:173) >> at junit.framework.TestSuite.run(TestSuite.java:168) >> at >> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:478) >> at >> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:344) >> at >> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196) >> I investigated a bit and found out that all the failed tests fail while >> running a native method create (from the constructor of the class >> quickfix.Dictionary) which apparently calls the constructor of the >> Dictionary.cpp class. >> Could someone suggest something to resolve this problem and/or tell how >> important is that these tests fail. >> Thank you very much in advance. >> Alexander Gorbachev. >> > |