Well, I have been able to reference the statically compiled SwordLib in a new project, but I have gotten stuck. The source code is from examples/cmdline/lookup.cpp and the following is a set of warnings/errors I get when it tries to link:

Linking...
msvcprt.lib(MSVCP71.dll) : error LNK2005: "public: int __thiscall std::ios_base::width(int)" ([EMAIL PROTECTED]@std@@[EMAIL PROTECTED]) already defined in lookup.obj
msvcprt.lib(MSVCP71.dll) : error LNK2005: "public: void __thiscall std::basic_ios<char,struct std::char_traits<char> >::setstate(int,bool)" ([EMAIL PROTECTED]@[EMAIL PROTECTED]@std@@@std@@[EMAIL PROTECTED]) already defined in lookup.obj
msvcprt.lib(MSVCP71.dll) : error LNK2005: "public: static bool __cdecl std::char_traits<char>::eq_int_type(int const &,int const &)" ([EMAIL PROTECTED]@[EMAIL PROTECTED]@@[EMAIL PROTECTED]) already defined in lookup.obj
msvcprt.lib(MSVCP71.dll) : error LNK2005: "public: static int __cdecl std::char_traits<char>::eof(void)" ([EMAIL PROTECTED]@[EMAIL PROTECTED]@@SAHXZ) already defined in lookup.obj
msvcprt.lib(MSVCP71.dll) : error LNK2005: "public: class std::basic_streambuf<char,struct std::char_traits<char> > * __thiscall std::basic_ios<char,struct std::char_traits<char> >::rdbuf(void)const " ([EMAIL PROTECTED]@[EMAIL PROTECTED]@std@@@std@@[EMAIL PROTECTED]@[EMAIL PROTECTED]@@@[EMAIL PROTECTED]) already defined in lookup.obj
msvcprt.lib(MSVCP71.dll) : error LNK2005: "public: int __thiscall std::ios_base::width(void)const " ([EMAIL PROTECTED]@std@@QBEHXZ) already defined in lookup.obj
msvcprt.lib(MSVCP71.dll) : error LNK2005: "public: void __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::_Unlock(void)" ([EMAIL PROTECTED]@[EMAIL PROTECTED]@std@@@std@@QAEXXZ) already defined in lookup.obj
msvcprt.lib(MSVCP71.dll) : error LNK2005: "public: void __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::_Lock(void)" ([EMAIL PROTECTED]@[EMAIL PROTECTED]@std@@@std@@QAEXXZ) already defined in lookup.obj
msvcprt.lib(MSVCP71.dll) : error LNK2005: "public: static int __cdecl std::char_traits<char>::to_int_type(char const &)" ([EMAIL PROTECTED]@[EMAIL PROTECTED]@@[EMAIL PROTECTED]) already defined in lookup.obj
msvcprt.lib(MSVCP71.dll) : error LNK2005: "public: int __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::sputc(char)" ([EMAIL PROTECTED]@[EMAIL PROTECTED]@std@@@std@@[EMAIL PROTECTED]) already defined in lookup.obj
msvcprt.lib(MSVCP71.dll) : error LNK2005: "public: char __thiscall std::basic_ios<char,struct std::char_traits<char> >::fill(void)const " ([EMAIL PROTECTED]@[EMAIL PROTECTED]@std@@@std@@QBEDXZ) already defined in lookup.obj
msvcprt.lib(MSVCP71.dll) : error LNK2005: "public: int __thiscall std::ios_base::flags(void)const " ([EMAIL PROTECTED]@std@@QBEHXZ) already defined in lookup.obj
msvcprt.lib(MSVCP71.dll) : error LNK2005: "public: class std::basic_ostream<char,struct std::char_traits<char> > & __thiscall std::basic_ostream<char,struct std::char_traits<char> >::flush(void)" ([EMAIL PROTECTED]@[EMAIL PROTECTED]@std@@@std@@[EMAIL PROTECTED]) already defined in lookup.obj
msvcprt.lib(MSVCP71.dll) : error LNK2005: "public: class std::basic_ostream<char,struct std::char_traits<char> > * __thiscall std::basic_ios<char,struct std::char_traits<char> >::tie(void)const " ([EMAIL PROTECTED]@[EMAIL PROTECTED]@std@@@std@@[EMAIL PROTECTED]@[EMAIL PROTECTED]@@@[EMAIL PROTECTED]) already defined in lookup.obj
msvcprt.lib(MSVCP71.dll) : error LNK2005: "public: bool __thiscall std::ios_base::good(void)const " ([EMAIL PROTECTED]@std@@QBE_NXZ) already defined in lookup.obj
msvcprt.lib(MSVCP71.dll) : error LNK2005: "public: void __thiscall std::basic_ostream<char,struct std::char_traits<char> >::_Osfx(void)" ([EMAIL PROTECTED]@[EMAIL PROTECTED]@std@@@std@@QAEXXZ) already defined in lookup.obj
msvcprt.lib(MSVCP71.dll) : error LNK2005: "public: class std::basic_ostream<char,struct std::char_traits<char> > & __thiscall std::basic_ostream<char,struct std::char_traits<char> >::operator<<(class std::basic_ostream<char,struct std::char_traits<char> > & (__cdecl*)(class std::basic_ostream<char,struct std::char_traits<char> > &))" ([EMAIL PROTECTED]@[EMAIL PROTECTED]@@@std@@[EMAIL PROTECTED]@AAV01@@[EMAIL PROTECTED]) already defined in lookup.obj
msvcprt.lib(MSVCP71.dll) : error LNK2005: "class std::basic_ostream<char,struct std::char_traits<char> > & __cdecl std::endl(class std::basic_ostream<char,struct std::char_traits<char> > &)" ([EMAIL PROTECTED]@@[EMAIL PROTECTED]@[EMAIL PROTECTED]@@@[EMAIL PROTECTED]@@Z) already defined in lookup.obj
msvcprt.lib(MSVCP71.dll) : error LNK2005: "class std::basic_ostream<char,struct std::char_traits<char> > & __cdecl std::operator<<<struct std::char_traits<char> >(class std::basic_ostream<char,struct std::char_traits<char> > &,char const *)" ([EMAIL PROTECTED]@std@@@std@@[EMAIL PROTECTED]@[EMAIL PROTECTED]@@@[EMAIL PROTECTED]@[EMAIL PROTECTED]) already defined in lookup.obj
lookup.obj : error LNK2001: unresolved external symbol "class std::basic_ostream<char,struct std::char_traits<char> > std::cout" ([EMAIL PROTECTED]@@[EMAIL PROTECTED]@[EMAIL PROTECTED]@@@[EMAIL PROTECTED])
Debug/TestSword.exe : fatal error LNK1120: 1 unresolved externals


Build log was saved at "file://c:\Documents and Settings\Greg\My Documents\Visual Studio Projects\TestSword\Debug\BuildLog.htm"
TestSword - 21 error(s), 0 warning(s)



---------------------- Done ----------------------

   Build: 0 succeeded, 1 failed, 0 skipped

I apologize for the lack of formatting. If anyone can help, I greatly appreciate it!

God Bless <><
Greg

Greg Marine wrote:

Chris,

I appreciate your information. I think I'm going to need to go with MS Visual Studio on Windows. You are correct about the Mozilla build system. For Linux, I was thinking the same about GCC.

Anyone,

I want to apologize for my infancy with my questions, but I do have another newbie question I'm afraid. I have succesfully compiled the Sword library on both Windows and Linux but have no clue how to include it into my wrapper projects. I searched MSDN and the internet and have come up with nothing for Windows (MS VS). I'm beginning to think my knowledge of C++ is so primitive I should probably start with another project first. But if someone could give me some pointers on what I need to do to get the compiled static library to get linked against my own wrapper project on at least Windows, I would greatly appreciate it! I'll get to the Linux version when I've gotten started on Windows. Again, I am sorry for my infancy. I just truly want to help out by providing an XPCOM wrapper for the Sword API. My knowledge of the Mozilla technologies and other's like Java and VB aren't so primitive and I'm not new to software development. Just new to C++.

Thank you again for all you do for His Kingdom. This project inspires me to continue persueing God's Calling for me to create Christian software to help strengthen the Body of Christ.

May God Bless you all <><
Greg

Chris Little wrote:

As Michael noted, the norm in Linux is to develop for GCC. Most of us probably just use text editors like emacs or vi for coding. I think the BibleTime guys may use KDevelop.

On Windows, it's a whole other story. On that platform we use Borland C++ 5.0 for BibleCS development, though I think everything also works in 6.0. The library can also be compiled in MS Visual Studio 6.0 & .NET 2003 (7.1) and with Cygwin.

If you plan to use the same tool for both Mozilla and Sword development, it will probably have to be MS Visual Studio.NET 2003. Mozilla has their own rather complex build system. No one has yet succeeded in building Moz in Borland.

--Chris

Greg Marine wrote:

Good day everyone,

I read on the CrossWire website that Borland C++ was used to develop parts of Sword. Like BibleCS or something. I'm curious as to which version of Borland C++ is used and where it could be used to compile on Linux too. I'm VERY new to C++ and not sure what IDE is best for working with projects like Sword and the XPCOM wrapper I'd like to create. I'm also interested in being able to compile and work with Mozilla's software using the same tools as Sword. So, anyone who has worked on Sword and has also successfully worked with Mozilla I am curious about your thoughts. At the very least, I could use a pointer to the best way to work with the Sword code base on Windows and Linux. I really appreciate help any of you can offer.

Thank you and God Bless <><
Greg

_______________________________________________
sword-devel mailing list
[email protected]
http://www.crosswire.org/mailman/listinfo/sword-devel



_______________________________________________ sword-devel mailing list [email protected] http://www.crosswire.org/mailman/listinfo/sword-devel



_______________________________________________ sword-devel mailing list [email protected] http://www.crosswire.org/mailman/listinfo/sword-devel


_______________________________________________
sword-devel mailing list
[email protected]
http://www.crosswire.org/mailman/listinfo/sword-devel

Reply via email to