OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

Compile error: "LNK2019" what does this mean?

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API
View previous topic :: View next topic  
Author Message
ronblack
General User
General User


Joined: 11 Nov 2005
Posts: 5

PostPosted: Fri Nov 11, 2005 11:05 pm    Post subject: Compile error: "LNK2019" what does this mean? Reply with quote

I suspect I don't have a path correct or I am missing a lib file or something. Trying to build OOo 2.0 for windows using the following instructions:

http://tools.openoffice.org/dev_docs/build_windows_tcsh.html

Seems to roll along okay until it hits this error: "error LNK2019: unresolved external symbol ..."

Is this a cygwin issue; windows lib issue; c++ lib issue; or what? driving me mad trying to find where to begin to look.

Here's the output just prior to stopping:

=============
Building project sj2
=============
/oo/OOo_2.0.0rc3_src/sj2/stardiv/controller
Making dpj...
.
guw.pl javac -classpath ".:../../wntmsci10.pro/class:/cygdrive/c/JDK13~1.1_1/jre
/lib/rt.jar:.:/oo/OOo_2.0.0rc3_src/solver/680/wntmsci10.pro/bin/sandbox.jar:/oo/
OOo_2.0.0rc3_src/solver/680/wntmsci10.pro/bin/tkt.jar" -d ../../wntmsci10.pro/cl
ass SjSettings.java
Making dpj...
.
-------------
/oo/OOo_2.0.0rc3_src/sj2/stardiv/applet
guw.pl javac -classpath ".:../../wntmsci10.pro/class:/cygdrive/c/JDK13~1.1_1/jre
/lib/rt.jar:.:/oo/OOo_2.0.0rc3_src/solver/680/wntmsci10.pro/bin/sandbox.jar" -d
../../wntmsci10.pro/class AppletExecutionContext.java Document.javaDoc
umentProxy.java LiveConnectable.java
Making dpj...
....
-------------
/oo/OOo_2.0.0rc3_src/sj2/stardiv/app
guw.pl javac -classpath ".:../../wntmsci10.pro/class:/cygdrive/c/JDK13~1.1_1/jre
/lib/rt.jar:.:/oo/OOo_2.0.0rc3_src/solver/680/wntmsci10.pro/bin/sandbox.jar:/oo/
OOo_2.0.0rc3_src/solver/680/wntmsci10.pro/bin/tkt.jar" -d ../../wntmsci10.pro/cl
ass AppletViewer.java AppletViewerFact
ory.java AppletProps.java AppletMe
ssageHandler.java MsgAppletViewer.java
Note: AppletProps.java uses or overrides a deprecated API.
Note: Recompile with -deprecation for details.
Making dpj...
.....
-------------
/oo/OOo_2.0.0rc3_src/sj2/source/jscpp
-------------
/oo/OOo_2.0.0rc3_src/sj2/stardiv/applet/resources
-------------
/oo/OOo_2.0.0rc3_src/sj2/util
------------------------------
Making: ../wntmsci10.pro/bin/j680mi_g.dll
guw.pl rc -DWIN32 -I -I. -I. -I../inc -I../inc -I../WIN/inc -I../wntmsci10.pro/
inc -I. -I/oo/OOo_2.0.0rc3_src/solver/680/wntmsci10.pro/inc/stl -I/oo/OOo_2.0.0r
c3_src/solver/680/wntmsci10.pro/inc/external -I/oo/OOo_2.0.0rc3_src/solver/680/w
ntmsci10.pro/inc -I/oo/OOo_2.0.0rc3_src/solenv/wntmsci10/inc -I/oo/OOo_2.0.0rc3_
src/solenv/inc -I/oo/OOo_2.0.0rc3_src/res -I/oo/OOo_2.0.0rc3_src/solver/680/wntm
sci10.pro/inc/stl -I/cygdrive/c/JDK13~1.1_1/include/win32 -I/cygdrive/c/JDK13~1.
1_1/include -I/cygdrive/c/PROGRA~1/MICROS~4/include -I/cygdrive/c/PROGRA~1/MICRO
S~1.NET/Vc7/include -I. -I../res -I. ../wntmsci10.pro/misc/j680mi_g_def.rc
cat ../wntmsci10.pro/misc/j680mi_g_def.res > ../wntmsci10.pro/misc/j680mi_g.res
guw.pl link /COMMENT:"sj2_680__" /MACHINE:IX86 @/tmp/mkH5yyPe |& /usr/bin/grep.
exe -v "LNK4197:"
Microsoft (R) Incremental Linker Version 7.10.3077
Copyright (C) Microsoft Corporation. All rights reserved.

/MAP /OPT:NOREF /NODEFAULTLIB /RELEASE /DEBUG:full /SUBSYSTEM:WINDOWS,4.0 /DLL -
out:../wntmsci10.pro/bin/j680mi_g.dll -map:../wntmsci10.pro/misc/j680mi_g.map ..
\wntmsci10.pro\lib\sj.exp ..\wntmsci10.pro\slo\j_dflt_g_version.obj ..\wntmsci10
.pro\slo\j_dflt_g_description.obj ..\wntmsci10.pro\slb\sj.lib ivcl.lib iutl.lib
itools.lib icppu.lib isal.lib ijvmaccess.lib msvcrt.lib uwinapi.lib kernel32.lib
user32.lib oldnames.lib stlport_vc71.lib ..\wntmsci10.pro\misc\j680mi_g.res
sj.lib(sjapplet_impl.obj) : error LNK2019: unresolved external symbol "__declspe
c(dllimport) public: class SvCommand & __thiscall SvCommandList::operator[](unsi
gned long)const " (__imp_??ASvCommandList@@QBEAAVSvCommand@@K@Z) referenced in f
unction "public: void __thiscall SjApplet2_Impl::init(class Window *,class com::
sun::star::uno::Reference<class com::sun::star::lang::XMultiServiceFactory> cons
t &,class INetURLObject const &,class SvCommandList const &)" (?init@SjApplet2_I
mpl@@QAEXPAVWindow@@ABV?$Reference@VXMultiServiceFactory@lang@star@sun@com@@@uno
@star@sun@com@@ABVINetURLObject@@ABVSvCommandList@@@Z)
sj.lib(sjapplet.obj) : error LNK2001: unresolved external symbol "__declspec(dll
import) public: class SvCommand & __thiscall SvCommandList::operator[](unsigned
long)const " (__imp_??ASvCommandList@@QBEAAVSvCommand@@K@Z)
sj.lib(sjapplet_impl.obj) : error LNK2019: unresolved external symbol "__declspe
c(dllimport) public: unsigned long __thiscall SvCommandList::Count(void)const "
(__imp_?Count@SvCommandList@@QBEKXZ) referenced in function "public: void __this
call SjApplet2_Impl::init(class Window *,class com::sun::star::uno::Reference<cl
ass com::sun::star::lang::XMultiServiceFactory> const &,class INetURLObject cons
t &,class SvCommandList const &)" (?init@SjApplet2_Impl@@QAEXPAVWindow@@ABV?$Ref
erence@VXMultiServiceFactory@lang@star@sun@com@@@uno@star@sun@com@@ABVINetURLObj
ect@@ABVSvCommandList@@@Z)
sj.lib(sjapplet.obj) : error LNK2001: unresolved external symbol "__declspec(dll
import) public: unsigned long __thiscall SvCommandList::Count(void)const " (__im
p_?Count@SvCommandList@@QBEKXZ)
../wntmsci10.pro/bin/j680mi_g.dll : fatal error LNK1120: 2 unresolved externals
dmake: Error code 96, while making '../wntmsci10.pro/bin/j680mi_g.dll'
---* tg_merge.mk *---

ERROR: Error 65280 occurred while making /oo/OOo_2.0.0rc3_src/sj2/util
dmake: Error code 1, while making 'build_instsetoo_native'
---* tg_merge.mk *---

Thanks in advance for the feedback.

Ron Black
Back to top
View user's profile Send private message
RenjiKage
Power User
Power User


Joined: 13 Oct 2005
Posts: 88
Location: Kokubunji-shi, Tokyo-to, Japan

PostPosted: Tue Nov 15, 2005 6:03 pm    Post subject: Reply with quote

Oh, I hate linker errors... Sad

Perhaps this page helps you: MSDN Linker Error 2019. Try to use the /VERBOSE option to get more information.

Aside from this, I can only recommend you to double- or triple- check if it is really not a path or linking problem... it's just my experience that in most cases, I made a little mistake while setting up the project and ended up with strange linker errors...

What environment do you use to build OO2?
Back to top
View user's profile Send private message Visit poster's website
ronblack
General User
General User


Joined: 11 Nov 2005
Posts: 5

PostPosted: Wed Nov 16, 2005 6:12 am    Post subject: Reply with quote

Here's the Environment . . . .

Hardware:
AMD Athlon 1 GHZ
512 MB RAM
10 GB Disk Space Free

OS:
Windows XP Pro, Service Pack 2

Source Root:
$SRC_ROOT = /cygdrive/c/cygwin/oo/OOo_2.0.0rc3_src

Configure:
./configure
--with-cl-home="/cygdrive/c/PROGRA~1/MICROS~1.NET/Vc7"
--with-jdk-home=/cygdrive/c/j2sdk1.4.2_10
--with-use-shell=tcsh
--with-csc-path=/cygdrive/c/WINDOWS/Microsoft.NET/Framework/v1.1.4322
--disable-directx
--with-ant-home=/cygdrive/c/cygwin/oo/OOo_2.0.0rc3_src/external/ant/apache-ant-1.6.5


Packages:
Microsoft Visual C++ .NET 2003 Standard

Microsoft Platform SDK "PSDK-x86.exe"
do i need to use "PSDK-amd64.exe" instead?
if so, what are the steps to back-out of the PSDK-x86.exe
are there special steps to install this SDK?

DirectX 9.0 SDK
DirectX 9.0 SDK Update - (October 2005) "dxsdk_oct2005.exe"
DirectX 9.0b SDK Extras: Direct3D "dx90_sdk_extras_direct3d.exe"

Java 2 SDK
"j2sdk-1_4_2_10-windows-i586-p-iftw.exe"
I was not sure which Java 2 SDK to get!

Cygwin Toolkit
1.5.18-1
bison
flex
make
patch
perl
gcc
rxvt
tcsh
unzip
zip
lynx
wget
ncftpget
ncftp
gpg (under utils/gnupg)
gcc-gpc Pascal compiler


General Polygon Clipper
gpc232.zip

Microsoft Layer for Unicode
unicows.exe

dbghelp.dll
dbghinst.EXE

Apache Ant 1.6.5
apache-ant-1.6.5-bin.zip

Mozilla libraries
mozilla-source-1.7.5.tar.gz

Perl modules
Archive::Zip
XML::Parser

~

Thanks for the reply.
Back to top
View user's profile Send private message
RenjiKage
Power User
Power User


Joined: 13 Oct 2005
Posts: 88
Location: Kokubunji-shi, Tokyo-to, Japan

PostPosted: Wed Nov 16, 2005 4:21 pm    Post subject: Reply with quote

Your build environment seems to be OK. Confused I don't know... have you noticed that all linker errors have some relationship to a class called SvCommandList? This is a class of OO2.

Can you look into the source code and try to find out the dependencies of SvCommandList? Perhaps, we can then find the library that is missing...

Anyway, have you tried to call the MS Visual C++ Linker with the /VERBOSE option?

I read the build instructions.. Did you notice that it took them 17 hours to build OO on a Athlon XP 1700 machine. How much time did your PC need until you got this error?
Back to top
View user's profile Send private message Visit poster's website
ronblack
General User
General User


Joined: 11 Nov 2005
Posts: 5

PostPosted: Wed Nov 16, 2005 8:24 pm    Post subject: Reply with quote

>Can you look into the source code and try to find out the dependencies of >SvCommandList? Perhaps, we can then find the library that is missing...
I was hoping I would not have to do this, but alas, this may be the course for a solution.

>Anyway, have you tried to call the MS Visual C++ Linker with the /VERBOSE option?
Not yet. . . I will give this a shot next and let you know.

>I read the build instructions.. Did you notice that it took them 17 hours to build OO on a >Athlon XP 1700 machine. How much time did your PC need until you got this error?
First pass:
Start: 2:45 PM 11/8/2005
Stop: 6:52 PM 11/8/2005

Subsequent passes:
take about 28 minutes until the error quits the build

Thanks again for the reply.
Back to top
View user's profile Send private message
ronblack
General User
General User


Joined: 11 Nov 2005
Posts: 5

PostPosted: Sat Nov 26, 2005 10:38 pm    Post subject: Found an answer Reply with quote

Stepped away from this for a few days and got back to it tonight.

Found a solution which was recently posted here:

http://www.openoffice.org/issues/show_bug.cgi?id=51169

ie: add the SVTOOLLIB library in sj2/util/makefile.mk:

SHL1STDLIBS= \
$(VCLLIB) \
$(UNOTOOLSLIB) \
$(TOOLSLIB) \
$(CPPULIB) \
$(SALLIB) \
$(SVTOOLLIB)


Link error no longer exists!

Many thanks for the responses.
Back to top
View user's profile Send private message
RenjiKage
Power User
Power User


Joined: 13 Oct 2005
Posts: 88
Location: Kokubunji-shi, Tokyo-to, Japan

PostPosted: Tue Nov 29, 2005 10:47 pm    Post subject: Reply with quote

Very Happy

Good that you found the error! Cool
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group