Return-Path: Delivered-To: apmail-lucene-pylucene-dev-archive@minotaur.apache.org Received: (qmail 22473 invoked from network); 21 Oct 2010 15:16:02 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 21 Oct 2010 15:16:02 -0000 Received: (qmail 90518 invoked by uid 500); 21 Oct 2010 15:16:02 -0000 Delivered-To: apmail-lucene-pylucene-dev-archive@lucene.apache.org Received: (qmail 90419 invoked by uid 500); 21 Oct 2010 15:16:01 -0000 Mailing-List: contact pylucene-dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: pylucene-dev@lucene.apache.org Delivered-To: mailing list pylucene-dev@lucene.apache.org Received: (qmail 90411 invoked by uid 99); 21 Oct 2010 15:16:00 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 21 Oct 2010 15:16:00 +0000 X-ASF-Spam-Status: No, hits=0.7 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [66.159.224.220] (HELO ovaltofu.org) (66.159.224.220) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 21 Oct 2010 15:15:53 +0000 Received: from [192.168.0.5] ([192.168.0.5]) (authenticated bits=0) by ovaltofu.org (8.14.4/8.14.4) with ESMTP id o9LFFRSd019526 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO) for ; Thu, 21 Oct 2010 08:15:28 -0700 (PDT) Message-Id: From: Andi Vajda To: "pylucene-dev@lucene.apache.org" In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes Content-Transfer-Encoding: quoted-printable X-Mailer: iPod Mail (7E18) Mime-Version: 1.0 (iPod Mail 7E18) Subject: Re: Unresolved external symbol errors when linking example native c++ code that uses jcc Date: Thu, 21 Oct 2010 08:15:40 -0700 References: X-Virus-Checked: Checked by ClamAV on apache.org On Oct 21, 2010, at 4:39, Imre Andr=C3=A1s wrote: > Hi list, > > I intend to use jcc to ease calling Java code from native code. I =20 > managed to build and install it. Now I try to build my first test =20 > code from within MS VS 2010 Win32 console app project. Despite =20 > setting up the libs and includes I still get linker errors: I'm not sure this link line makes sense. To get an idea of what the =20 correct link line looks like, get jcc to build a python extension and =20= take a close look at the link line it generates as an example for your =20= C++ only case. Andi.. > > ------------------------------------------------------------------ > Link: > C:\Program Files\Microsoft Visual Studio 10.0\VC\bin\link.exe /=20 > ERRORREPORT:PROMPT /OUT:"C:\out\app\PeldaProgram\ZipBe\bin\test\src=20 > \Debug\jcc.exe" /INCREMENTAL /NOLOGO python27.lib _jcc.lib jvm.lib =20 > kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib =20 > advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib =20= > odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib =20 > comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib =20 > uuid.lib odbc32.lib odbccp32.lib /MANIFEST /ManifestFile:"Debug=20 > \jcc.exe.intermediate.manifest" /MANIFESTUAC:"level=3D'asInvoker' =20 > uiAccess=3D'false'" /DEBUG = /PDB:"C:\out\app\PeldaProgram\ZipBe\bin\test=20 > \src\Debug\jcc.pdb" /SUBSYSTEM:CONSOLE /TLBID:1 /DYNAMICBASE /=20 > NXCOMPAT /IMPLIB:"C:\out\app\PeldaProgram\ZipBe\bin\test\src\Debug=20 > \jcc.lib" /MACHINE:X86 Debug\jcc.exe.embed.manifest.res > Debug\jcc.obj > Debug\stdafx.obj > Debug\__wrap__.obj > Creating library C:\out\app\PeldaProgram\ZipBe\bin\test\src\Debug=20 > \jcc.lib and object C:\out\app\PeldaProgram\ZipBe\bin\test\src\Debug=20= > \jcc.exp > 1>jcc.obj : error LNK2001: unresolved external symbol "unsigned long =20= > VM_ENV" (?VM_ENV@@3KA) > 1>stdafx.obj : error LNK2001: unresolved external symbol "unsigned =20 > long VM_ENV" (?VM_ENV@@3KA) > 1>__wrap__.obj : error LNK2001: unresolved external symbol "unsigned =20= > long VM_ENV" (?VM_ENV@@3KA) > 1>jcc.obj : error LNK2001: unresolved external symbol "class JCCEnv =20= > * env" (?env@@3PAVJCCEnv@@A) > 1>stdafx.obj : error LNK2001: unresolved external symbol "class =20 > JCCEnv * env" (?env@@3PAVJCCEnv@@A) > 1>__wrap__.obj : error LNK2001: unresolved external symbol "class =20 > JCCEnv * env" (?env@@3PAVJCCEnv@@A) > 1>C:\out\app\PeldaProgram\ZipBe\bin\test\src\Debug\jcc.exe : fatal =20 > error LNK1120: 2 unresolved externals > 1>Done Building Project "C:\out\app\PeldaProgram\ZipBe\bin\test\jcc=20 > \jcc.vcxproj" (rebuild target(s)) -- FAILED. > > Build FAILED. > > Time Elapsed 00:00:12.60 > ------------------------------------------------------------------ > > > jni.h and Native2Java.h (jcc generated from the java class I intend =20= > to use in native c++ code) is added to stdafx.h. Now I have no idea =20= > where the above symbols come from, and how should I resolve them. > > > Regards, > Andr=C3=A1s >