wxPDFDocument - Which files to add to a project  [SOLVED]

Talk here about issues with one of the components hosted at wxCode, or suggest features for it.
User avatar
evstevemd
Part Of The Furniture
Part Of The Furniture
Posts: 2092
Joined: Wed Jan 28, 2009 11:57 am
Location: Dar es Salaam, United Republic of Tanzania
Contact:

wxPDFDocument - Which files to add to a project

Postby evstevemd » Wed Nov 24, 2010 2:35 am

I need to make a project to compile wxPDFDoc. I have seen many files but which files do I need to make a library?
Chief Justice: We have trouble dear citizens!
Citizens: What it is his honor?
Chief Justice:Our president is an atheist, who will he swear to?
[Ubuntu 15.04/Windows 10 Pro - GCC/MinGW, CodeLite IDE et al]

briceandre
Ultimate wxWidgets Guru
Ultimate wxWidgets Guru
Posts: 670
Joined: Tue Aug 31, 2010 6:22 am
Location: Belgium

Postby briceandre » Wed Nov 24, 2010 6:46 am

After you compile wxPDFDoc project, you should find a library in directory ${WXPDFDOC_DIR}/lib/gcc_msw (named libwxpdfdoc.a, or something like that). You simply link with it. Note that path and library name will depend on compiler and compilation options.

But maybe you did not find how to compile wxPDFDOC (I don't think this is documented). But, in this case, can you tell wich compiler and OS you use ? The general idea is that, under ${WXPDFDOC_DIR}/build, you will find makefiles for different kinds of compilers. You should still patch some variables (like the directory of WX_DIR), and, as I just sayed before, I don't think this is documented.

User avatar
evstevemd
Part Of The Furniture
Part Of The Furniture
Posts: 2092
Joined: Wed Jan 28, 2009 11:57 am
Location: Dar es Salaam, United Republic of Tanzania
Contact:

Postby evstevemd » Wed Nov 24, 2010 1:11 pm

Hi,
I know how to compile using makefiles. i have big project that have many dependencies including wxPDFDocument. I add them as projects in CodeLite workspace. Now I was asking which file(s) should I add to make that library?

I use Mingw on Win7 and GCC on Ubuntu.
Chief Justice: We have trouble dear citizens!
Citizens: What it is his honor?
Chief Justice:Our president is an atheist, who will he swear to?
[Ubuntu 15.04/Windows 10 Pro - GCC/MinGW, CodeLite IDE et al]

utelle
Moderator
Moderator
Posts: 823
Joined: Tue Jul 05, 2005 10:00 pm
Location: Cologne, Germany
Contact:

  [SOLVED]

Postby utelle » Wed Nov 24, 2010 10:06 pm

evstevemd wrote:I know how to compile using makefiles. i have big project that have many dependencies including wxPDFDocument. I add them as projects in CodeLite workspace. Now I was asking which file(s) should I add to make that library?

I use Mingw on Win7 and GCC on Ubuntu.

If youd don't want to build wxPdfDocument as a separate library (although I'd recommend to do so), you have to add all .cpp files in the src subdirectory of the wxPdfDocument distribution as source files to your project. Additionally you need to add all .inc files (and the one .h file) in the src subdirectory and all .h files in the include/wx subdirectory as header files to your project. The files from the include/wx subdirectory need to be located in a subdirectory named wx of your project directory, otherwise the source code can't be compiled without problems.

Whether you need to add some or all files from the lib/fonts subdirectory (for use at runtime of your application) depends on the actual needs of your application and on which version of wxPdfDocument you use. If your application doesn't require CJK fonts no files from lib/fonts need to be included in your project, but if it does you need to include those files in case you use the latest official release 0.8.5.2 dated November 2009. In the wxCode SVN several bug fixes were applied in the meantime and CJK fonts are now supported without requiring font description files at runtime, that is, it is recommended to use the SVN version.

Regards,

Ulrich

P.S.: The release of wxPdfDocument 0.9.0 is planned for December, but is more likely to occur early next year.

User avatar
evstevemd
Part Of The Furniture
Part Of The Furniture
Posts: 2092
Joined: Wed Jan 28, 2009 11:57 am
Location: Dar es Salaam, United Republic of Tanzania
Contact:

Postby evstevemd » Wed Nov 24, 2010 10:33 pm

utelle wrote:
evstevemd wrote:I know how to compile using makefiles. i have big project that have many dependencies including wxPDFDocument. I add them as projects in CodeLite workspace. Now I was asking which file(s) should I add to make that library?

I use Mingw on Win7 and GCC on Ubuntu.

If youd don't want to build wxPdfDocument as a separate library (although I'd recommend to do so), you have to add all .cpp files in the src subdirectory of the wxPdfDocument distribution as source files to your project. Additionally you need to add all .inc files (and the one .h file) in the src subdirectory and all .h files in the include/wx subdirectory as header files to your project. The files from the include/wx subdirectory need to be located in a subdirectory named wx of your project directory, otherwise the source code can't be compiled without problems.

Whether you need to add some or all files from the lib/fonts subdirectory (for use at runtime of your application) depends on the actual needs of your application and on which version of wxPdfDocument you use. If your application doesn't require CJK fonts no files from lib/fonts need to be included in your project, but if it does you need to include those files in case you use the latest official release 0.8.5.2 dated November 2009. In the wxCode SVN several bug fixes were applied in the meantime and CJK fonts are now supported without requiring font description files at runtime, that is, it is recommended to use the SVN version.

Regards,

Ulrich

P.S.: The release of wxPdfDocument 0.9.0 is planned for December, but is more likely to occur early next year.

I want to build as library but not using Make files. I want to use CodeLite. I need to know what files to include in order to build wxPDFDoc just like I do with wxSQLite3?

Also there is Cute PDF containing graph. which library did you use to make graph?
Thanks for reply!
Chief Justice: We have trouble dear citizens!
Citizens: What it is his honor?
Chief Justice:Our president is an atheist, who will he swear to?
[Ubuntu 15.04/Windows 10 Pro - GCC/MinGW, CodeLite IDE et al]

utelle
Moderator
Moderator
Posts: 823
Joined: Tue Jul 05, 2005 10:00 pm
Location: Cologne, Germany
Contact:

Postby utelle » Wed Nov 24, 2010 11:13 pm

evstevemd wrote:I want to build as library but not using Make files. I want to use CodeLite. I need to know what files to include in order to build wxPDFDoc just like I do with wxSQLite3?

While wxSQLite3 consists of only a single source file and very few header files it's quite different with wxPdfDocument. In my previous answer I already named all source and header files you need to build wxPdfDocument be it as part of an application or be it as a separate library. So I'm not sure what else you need to know.

evstevemd wrote:Also there is Cute PDF containing graph. which library did you use to make graph?

Could you please explain which PDF you mean? One of the samples coming with wxPdfDocument? Which one?

Regards,

Ulrich

User avatar
evstevemd
Part Of The Furniture
Part Of The Furniture
Posts: 2092
Joined: Wed Jan 28, 2009 11:57 am
Location: Dar es Salaam, United Republic of Tanzania
Contact:

Postby evstevemd » Wed Nov 24, 2010 11:32 pm

utelle wrote:
evstevemd wrote:Also there is Cute PDF containing graph. which library did you use to make graph?

Could you please explain which PDF you mean? One of the samples coming with wxPdfDocument? Which one?

Regards,

Ulrich

I downloaded SVN tarball and it have got many files but only One PDF.
Chief Justice: We have trouble dear citizens!
Citizens: What it is his honor?
Chief Justice:Our president is an atheist, who will he swear to?
[Ubuntu 15.04/Windows 10 Pro - GCC/MinGW, CodeLite IDE et al]

utelle
Moderator
Moderator
Posts: 823
Joined: Tue Jul 05, 2005 10:00 pm
Location: Cologne, Germany
Contact:

Postby utelle » Thu Nov 25, 2010 7:57 am

evstevemd wrote:
utelle wrote:
evstevemd wrote:Also there is Cute PDF containing graph. which library did you use to make graph?

Could you please explain which PDF you mean? One of the samples coming with wxPdfDocument? Which one?

I downloaded SVN tarball and it have got many files but only One PDF.

The sample PDFs are not included in the distribution but can be found on the wxPdfDocument website. If you mean the PDF file chart2d.pdf included in the tarball, then there is a simple answer: it was created using Gnuplot.

Regards,

Ulrich

User avatar
evstevemd
Part Of The Furniture
Part Of The Furniture
Posts: 2092
Joined: Wed Jan 28, 2009 11:57 am
Location: Dar es Salaam, United Republic of Tanzania
Contact:

Postby evstevemd » Thu Nov 25, 2010 7:20 pm

yeah that one! Thanks
I'm just beginning this pdf thing!
Chief Justice: We have trouble dear citizens!
Citizens: What it is his honor?
Chief Justice:Our president is an atheist, who will he swear to?
[Ubuntu 15.04/Windows 10 Pro - GCC/MinGW, CodeLite IDE et al]

User avatar
evstevemd
Part Of The Furniture
Part Of The Furniture
Posts: 2092
Joined: Wed Jan 28, 2009 11:57 am
Location: Dar es Salaam, United Republic of Tanzania
Contact:

Postby evstevemd » Wed Dec 01, 2010 11:52 pm

I have managed to add and make a library. but I wonder why it is so small (few kb). Is it supposed to be that light (I have forgotten exact size)
Chief Justice: We have trouble dear citizens!
Citizens: What it is his honor?
Chief Justice:Our president is an atheist, who will he swear to?
[Ubuntu 15.04/Windows 10 Pro - GCC/MinGW, CodeLite IDE et al]

utelle
Moderator
Moderator
Posts: 823
Joined: Tue Jul 05, 2005 10:00 pm
Location: Cologne, Germany
Contact:

Postby utelle » Thu Dec 02, 2010 6:03 pm

evstevemd wrote:I have managed to add and make a library. but I wonder why it is so small (few kb). Is it supposed to be that light (I have forgotten exact size)

When I build wxPdfDocument I get a 2 MB release DLL resp. a 3.5 MB debug DLL. So a size of a few kB probably indicates that something went wrong in building the library.

Regards,

Ulrich

User avatar
evstevemd
Part Of The Furniture
Part Of The Furniture
Posts: 2092
Joined: Wed Jan 28, 2009 11:57 am
Location: Dar es Salaam, United Republic of Tanzania
Contact:

Postby evstevemd » Thu Dec 02, 2010 9:05 pm

utelle wrote:
evstevemd wrote:I have managed to add and make a library. but I wonder why it is so small (few kb). Is it supposed to be that light (I have forgotten exact size)

When I build wxPdfDocument I get a 2 MB release DLL resp. a 3.5 MB debug DLL. So a size of a few kB probably indicates that something went wrong in building the library.

Regards,

Ulrich

I'm making static one, I hope it should range somewhere there. let me check if I can discover anything
Chief Justice: We have trouble dear citizens!
Citizens: What it is his honor?
Chief Justice:Our president is an atheist, who will he swear to?
[Ubuntu 15.04/Windows 10 Pro - GCC/MinGW, CodeLite IDE et al]

User avatar
evstevemd
Part Of The Furniture
Part Of The Furniture
Posts: 2092
Joined: Wed Jan 28, 2009 11:57 am
Location: Dar es Salaam, United Republic of Tanzania
Contact:

Postby evstevemd » Wed Dec 08, 2010 4:04 pm

Cannot Compile SVN. First I get a lot of warnings and then one error!

----------Build Started--------
C:\WINDOWS\system32\cmd.exe /c ""mingw32-make.exe" -j 2 -f "MyProject_wsp.mk""
----------Building project:[ wxpdfdoc - DebugUnicode ]----------
mingw32-make.exe[1]: Entering directory `D:/Projects/MyProject/sdk/wxpdfdoc'
g++ -c "D:/Projects/MyProject/sdk/wxpdfdoc/src/pdfannotation.cpp" -g -mthreads -DHAVE_W32API_H -D__WXMSW__ -D__WXDEBUG__ -D_UNICODE -IC:\wxWidgets\lib\gcc_dll\mswud -IC:\wxWidgets\include -DWXUSINGDLL -Wno-ctor-dtor-privacy -pipe -fmessage-length=0 -DWXMAKINGDLL_MYLIB -o ../../sdk/work/wxpdfdoc/src_pdfannotation.o "-I." "-I."
g++ -c "D:/Projects/MyProject/sdk/wxpdfdoc/src/pdfbarcode.cpp" -g -mthreads -DHAVE_W32API_H -D__WXMSW__ -D__WXDEBUG__ -D_UNICODE -IC:\wxWidgets\lib\gcc_dll\mswud -IC:\wxWidgets\include -DWXUSINGDLL -Wno-ctor-dtor-privacy -pipe -fmessage-length=0 -DWXMAKINGDLL_MYLIB -o ../../sdk/work/wxpdfdoc/src_pdfbarcode.o "-I." "-I."
D:/Projects/MyProject/sdk/wxpdfdoc/src/pdfbarcode.cpp:27: warning: 'wxPdfBarCodeCreator::wxPdfBarCodeCreator(wxPdfDocument&)' redeclared without dllimport attribute: previous dllimport ignored
D:/Projects/MyProject/sdk/wxpdfdoc/src/pdfbarcode.cpp:32: warning: 'virtual wxPdfBarCodeCreator::~wxPdfBarCodeCreator()' redeclared without dllimport attribute: previous dllimport ignored
D:/Projects/MyProject/sdk/wxpdfdoc/src/pdfbarcode.cpp:37: warning: 'bool wxPdfBarCodeCreator::EAN13(double, double, const wxString&, double, double)' redeclared without dllimport attribute: previous dllimport ignored
D:/Projects/MyProject/sdk/wxpdfdoc/src/pdfbarcode.cpp:43: warning: 'bool wxPdfBarCodeCreator::UPC_A(double, double, const wxString&, double, double)' redeclared without dllimport attribute: previous dllimport ignored
D:/Projects/MyProject/sdk/wxpdfdoc/src/pdfbarcode.cpp:49: warning: 'wxChar wxPdfBarCodeCreator::GetCheckDigit(const wxString&)' redeclared without dllimport attribute: previous dllimport ignored
D:/Projects/MyProject/sdk/wxpdfdoc/src/pdfbarcode.cpp:74: warning: 'bool wxPdfBarCodeCreator::TestCheckDigit(const wxString&)' redeclared without dllimport attribute: previous dllimport ignored
D:/Projects/MyProject/sdk/wxpdfdoc/src/pdfbarcode.cpp:120: warning: 'bool wxPdfBarCodeCreator::Barcode(double, double, const wxString&, double, double, unsigned int)' redeclared without dllimport attribute after being referenced with dll linkage
D:/Projects/MyProject/sdk/wxpdfdoc/src/pdfbarcode.cpp:210: warning: 'bool wxPdfBarCodeCreator::Code39(double, double, const wxString&, bool, bool, double, double, bool)' redeclared without dllimport attribute: previous dllimport ignored
D:/Projects/MyProject/sdk/wxpdfdoc/src/pdfbarcode.cpp:275: warning: 'wxChar wxPdfBarCodeCreator::ChecksumCode39(const wxString&)' redeclared without dllimport attribute after being referenced with dll linkage
D:/Projects/MyProject/sdk/wxpdfdoc/src/pdfbarcode.cpp:326: warning: 'wxString wxPdfBarCodeCreator::EncodeCode39Ext(const wxString&)' redeclared without dllimport attribute after being referenced with dll linkage
D:/Projects/MyProject/sdk/wxpdfdoc/src/pdfbarcode.cpp:340: warning: 'void wxPdfBarCodeCreator::DrawCode39(const wxString&, double, double, double, double)' redeclared without dllimport attribute after being referenced with dll linkage
D:/Projects/MyProject/sdk/wxpdfdoc/src/pdfbarcode.cpp:361: warning: 'bool wxPdfBarCodeCreator::I25(double, double, const wxString&, double, double)' redeclared without dllimport attribute: previous dllimport ignored
D:/Projects/MyProject/sdk/wxpdfdoc/src/pdfbarcode.cpp:420: warning: 'bool wxPdfBarCodeCreator::PostNet(double, double, const wxString&)' redeclared without dllimport attribute: previous dllimport ignored
D:/Projects/MyProject/sdk/wxpdfdoc/src/pdfbarcode.cpp:473: warning: 'bool wxPdfBarCodeCreator::ZipCodeValidate(const wxString&)' redeclared without dllimport attribute after being referenced with dll linkage
D:/Projects/MyProject/sdk/wxpdfdoc/src/pdfbarcode.cpp:498: warning: 'int wxPdfBarCodeCreator::ZipCodeCheckSumDigit(const wxString&)' redeclared without dllimport attribute after being referenced with dll linkage
D:/Projects/MyProject/sdk/wxpdfdoc/src/pdfbarcode.cpp:536: warning: 'void wxPdfBarCodeCreator::ZipCodeDrawDigitBars(double, double, double, double, double, int)' redeclared without dllimport attribute after being referenced with dll linkage
D:/Projects/MyProject/sdk/wxpdfdoc/src/pdfbarcode.cpp:1161: warning: 'bool wxPdfBarCodeCreator::Code128A(double, double, const wxString&, double, double)' redeclared without dllimport attribute: previous dllimport ignored
D:/Projects/MyProject/sdk/wxpdfdoc/src/pdfbarcode.cpp:1205: warning: 'bool wxPdfBarCodeCreator::Code128B(double, double, const wxString&, double, double)' redeclared without dllimport attribute: previous dllimport ignored
D:/Projects/MyProject/sdk/wxpdfdoc/src/pdfbarcode.cpp:1246: warning: 'bool wxPdfBarCodeCreator::Code128C(double, double, const wxString&, double, double)' redeclared without dllimport attribute: previous dllimport ignored
D:/Projects/MyProject/sdk/wxpdfdoc/src/pdfbarcode.cpp:1278: warning: 'bool wxPdfBarCodeCreator::Code128(double, double, const wxString&, double, double)' redeclared without dllimport attribute: previous dllimport ignored
D:/Projects/MyProject/sdk/wxpdfdoc/src/pdfbarcode.cpp:1303: warning: 'bool wxPdfBarCodeCreator::EAN128(double, double, const wxString&, double, double)' redeclared without dllimport attribute: previous dllimport ignored
D:/Projects/MyProject/sdk/wxpdfdoc/src/pdfbarcode.cpp:1388: warning: 'void wxPdfBarCodeCreator::Code128Draw(double, double, const wxString&, double, double)' redeclared without dllimport attribute after being referenced with dll linkage
D:/Projects/MyProject/sdk/wxpdfdoc/src/pdfannotation.cpp:33: warning: 'wxPdfLink::wxPdfLink(int)' redeclared without dllimport attribute after being referenced with dll linkage
D:/Projects/MyProject/sdk/wxpdfdoc/src/pdfannotation.cpp:41: warning: 'wxPdfLink::wxPdfLink(const wxString&)' redeclared without dllimport attribute: previous dllimport ignored
D:/Projects/MyProject/sdk/wxpdfdoc/src/pdfannotation.cpp:47: warning: 'wxPdfLink::wxPdfLink(const wxPdfLink&)' redeclared without dllimport attribute: previous dllimport ignored
D:/Projects/MyProject/sdk/wxpdfdoc/src/pdfannotation.cpp:57: warning: 'virtual wxPdfLink::~wxPdfLink()' redeclared without dllimport attribute after being referenced with dll linkage
D:/Projects/MyProject/sdk/wxpdfdoc/src/pdfannotation.cpp:61: warning: 'wxPdfPageLink::wxPdfPageLink(double, double, double, double, const wxPdfLink&)' redeclared without dllimport attribute: previous dllimport ignored
D:/Projects/MyProject/sdk/wxpdfdoc/src/pdfannotation.cpp:70: warning: 'virtual wxPdfPageLink::~wxPdfPageLink()' redeclared without dllimport attribute: previous dllimport ignored
D:/Projects/MyProject/sdk/wxpdfdoc/src/pdfannotation.cpp:78: warning: 'wxPdfAnnotation::wxPdfAnnotation(double, double, const wxString&)' redeclared without dllimport attribute: previous dllimport ignored
D:/Projects/MyProject/sdk/wxpdfdoc/src/pdfannotation.cpp:83: warning: 'wxPdfAnnotation::wxPdfAnnotation(const wxPdfAnnotation&)' redeclared without dllimport attribute: previous dllimport ignored
D:/Projects/MyProject/sdk/wxpdfdoc/src/pdfannotation.cpp:94: warning: 'wxPdfBookmark::wxPdfBookmark(const wxString&, int, double, int)' redeclared without dllimport attribute: previous dllimport ignored
D:/Projects/MyProject/sdk/wxpdfdoc/src/pdfannotation.cpp:108: warning: 'virtual wxPdfBookmark::~wxPdfBookmark()' redeclared without dllimport attribute: previous dllimport ignored
D:/Projects/MyProject/sdk/wxpdfdoc/src/pdfannotation.cpp:115: warning: 'virtual int wxPdfDocument::AddLink()' redeclared without dllimport attribute: previous dllimport ignored
D:/Projects/MyProject/sdk/wxpdfdoc/src/pdfannotation.cpp:131: warning: 'virtual bool wxPdfDocument::SetLink(int, double, int)' redeclared without dllimport attribute: previous dllimport ignored
D:/Projects/MyProject/sdk/wxpdfdoc/src/pdfannotation.cpp:161: warning: 'virtual void wxPdfDocument::Link(double, double, double, double, const wxPdfLink&)' redeclared without dllimport attribute: previous dllimport ignored
D:/Projects/MyProject/sdk/wxpdfdoc/src/pdfannotation.cpp:188: warning: 'virtual void wxPdfDocument::Bookmark(const wxString&, int, double)' redeclared without dllimport attribute: previous dllimport ignored
D:/Projects/MyProject/sdk/wxpdfdoc/src/pdfannotation.cpp:203: warning: 'virtual void wxPdfDocument::Annotate(double, double, const wxString&)' redeclared without dllimport attribute: previous dllimport ignored
g++ -c "D:/Projects/MyProject/sdk/wxpdfdoc/src/pdfcffdecoder.cpp" -g -mthreads -DHAVE_W32API_H -D__WXMSW__ -D__WXDEBUG__ -D_UNICODE -IC:\wxWidgets\lib\gcc_dll\mswud -IC:\wxWidgets\include -DWXUSINGDLL -Wno-ctor-dtor-privacy -pipe -fmessage-length=0 -DWXMAKINGDLL_MYLIB -o ../../sdk/work/wxpdfdoc/src_pdfcffdecoder.o "-I." "-I."
g++ -c "D:/Projects/MyProject/sdk/wxpdfdoc/src/pdfcffindex.cpp" -g -mthreads -DHAVE_W32API_H -D__WXMSW__ -D__WXDEBUG__ -D_UNICODE -IC:\wxWidgets\lib\gcc_dll\mswud -IC:\wxWidgets\include -DWXUSINGDLL -Wno-ctor-dtor-privacy -pipe -fmessage-length=0 -DWXMAKINGDLL_MYLIB -o ../../sdk/work/wxpdfdoc/src_pdfcffindex.o "-I." "-I."
D:/Projects/MyProject/sdk/wxpdfdoc/src/pdfcffindex.cpp:34: warning: 'wxPdfCffIndexElement::wxPdfCffIndexElement(wxInputStream*, int, int)' redeclared without dllimport attribute: previous dllimport ignored
D:/Projects/MyProject/sdk/wxpdfdoc/src/pdfcffindex.cpp:42: warning: 'wxPdfCffIndexElement::wxPdfCffIndexElement(wxMemoryOutputStream&)' redeclared without dllimport attribute: previous dllimport ignored
D:/Projects/MyProject/sdk/wxpdfdoc/src/pdfcffindex.cpp:51: warning: 'wxPdfCffIndexElement::wxPdfCffIndexElement(const char*)' redeclared without dllimport attribute: previous dllimport ignored
D:/Projects/MyProject/sdk/wxpdfdoc/src/pdfcffindex.cpp:62: warning: 'virtual wxPdfCffIndexElement::~wxPdfCffIndexElement()' redeclared without dllimport attribute after being referenced with dll linkage
D:/Projects/MyProject/sdk/wxpdfdoc/src/pdfcffindex.cpp:70: warning: 'wxPdfCffIndexElement::wxPdfCffIndexElement(const wxPdfCffIndexElement&)' redeclared without dllimport attribute after being referenced with dll linkage
D:/Projects/MyProject/sdk/wxpdfdoc/src/pdfcffindex.cpp:89: warning: 'wxPdfCffIndexElement& wxPdfCffIndexElement::operator=(const wxPdfCffIndexElement&)' redeclared without dllimport attribute: previous dllimport ignored
D:/Projects/MyProject/sdk/wxpdfdoc/src/pdfcffindex.cpp:109: warning: 'void wxPdfCffIndexElement::SetBuffer(wxMemoryOutputStream&)' redeclared without dllimport attribute: previous dllimport ignored
D:/Projects/MyProject/sdk/wxpdfdoc/src/pdfcffindex.cpp:123: warning: 'virtual void wxPdfCffIndexElement::Emit(wxMemoryOutputStream&)' redeclared without dllimport attribute: previous dllimport ignored
D:/Projects/MyProject/sdk/wxpdfdoc/src/pdfcffdecoder.cpp:211: warning: 'wxPdfCffDecoder::wxPdfCffDecoder()' redeclared without dllimport attribute: previous dllimport ignored
D:/Projects/MyProject/sdk/wxpdfdoc/src/pdfcffdecoder.cpp:223: warning: 'wxPdfCffDecoder::wxPdfCffDecoder(wxPdfCffIndexArray*, wxPdfSortedArrayInt*, wxArrayInt*)' redeclared without dllimport attribute: previous dllimport ignored
D:/Projects/MyProject/sdk/wxpdfdoc/src/pdfcffdecoder.cpp:237: warning: 'virtual wxPdfCffDecoder::~wxPdfCffDecoder()' redeclared without dllimport attribute: previous dllimport ignored
D:/Projects/MyProject/sdk/wxpdfdoc/src/pdfcffdecoder.cpp:245: warning: 'unsigned char wxPdfCffDecoder::ReadByte(wxInputStream*)' redeclared without dllimport attribute: previous dllimport ignored
D:/Projects/MyProject/sdk/wxpdfdoc/src/pdfcffdecoder.cpp:253: warning: 'short int wxPdfCffDecoder::ReadShort(wxInputStream*)' redeclared without dllimport attribute: previous dllimport ignored
D:/Projects/MyProject/sdk/wxpdfdoc/src/pdfcffdecoder.cpp:262: warning: 'int wxPdfCffDecoder::ReadInt(wxInputStream*)' redeclared without dllimport attribute: previous dllimport ignored
D:/Projects/MyProject/sdk/wxpdfdoc/src/pdfcffdecoder.cpp:273: warning: 'int wxPdfCffDecoder::CalcBias(int)' redeclared without dllimport attribute: previous dllimport ignored
D:/Projects/MyProject/sdk/wxpdfdoc/src/pdfcffdecoder.cpp:297: warning: 'bool wxPdfCffDecoder::GetCharWidthAndComposite(wxPdfCffIndexElement&, int&, bool&, int&, int&)' redeclared without dllimport attribute: previous dllimport ignored
D:/Projects/MyProject/sdk/wxpdfdoc/src/pdfcffdecoder.cpp:359: warning: 'void wxPdfCffDecoder::ReadASubr(wxInputStream*, int, int, int, int, wxPdfSortedArrayInt&, wxArrayInt&, wxPdfCffIndexArray&)' redeclared without dllimport attribute: previous dllimport ignored
D:/Projects/MyProject/sdk/wxpdfdoc/src/pdfcffdecoder.cpp:463: warning: 'void wxPdfCffDecoder::HandleStack()' redeclared without dllimport attribute after being referenced with dll linkage
D:/Projects/MyProject/sdk/wxpdfdoc/src/pdfcffdecoder.cpp:494: warning: 'int wxPdfCffDecoder::StackOpp()' redeclared without dllimport attribute after being referenced with dll linkage
D:/Projects/MyProject/sdk/wxpdfdoc/src/pdfcffdecoder.cpp:530: warning: 'void wxPdfCffDecoder::EmptyStack()' redeclared without dllimport attribute after being referenced with dll linkage
D:/Projects/MyProject/sdk/wxpdfdoc/src/pdfcffdecoder.cpp:536: warning: 'void wxPdfCffDecoder::PopStack()' redeclared without dllimport attribute after being referenced with dll linkage
D:/Projects/MyProject/sdk/wxpdfdoc/src/pdfcffdecoder.cpp:545: warning: 'void wxPdfCffDecoder::PushStack()' redeclared without dllimport attribute after being referenced with dll linkage
D:/Projects/MyProject/sdk/wxpdfdoc/src/pdfcffdecoder.cpp:551: warning: 'void wxPdfCffDecoder::ReadCommand(wxInputStream*)' redeclared without dllimport attribute after being referenced with dll linkage
D:/Projects/MyProject/sdk/wxpdfdoc/src/pdfcffdecoder.cpp:627: warning: 'int wxPdfCffDecoder::CalcHints(wxInputStream*, int, int, int, int, wxPdfCffIndexArray&)' redeclared without dllimport attribute after being referenced with dll linkage
g++ -c "D:/Projects/MyProject/sdk/wxpdfdoc/src/pdfcolour.cpp" -g -mthreads -DHAVE_W32API_H -D__WXMSW__ -D__WXDEBUG__ -D_UNICODE -IC:\wxWidgets\lib\gcc_dll\mswud -IC:\wxWidgets\include -DWXUSINGDLL -Wno-ctor-dtor-privacy -pipe -fmessage-length=0 -DWXMAKINGDLL_MYLIB -o ../../sdk/work/wxpdfdoc/src_pdfcolour.o "-I." "-I."
g++ -c "D:/Projects/MyProject/sdk/wxpdfdoc/src/pdfdecode.cpp" -g -mthreads -DHAVE_W32API_H -D__WXMSW__ -D__WXDEBUG__ -D_UNICODE -IC:\wxWidgets\lib\gcc_dll\mswud -IC:\wxWidgets\include -DWXUSINGDLL -Wno-ctor-dtor-privacy -pipe -fmessage-length=0 -DWXMAKINGDLL_MYLIB -o ../../sdk/work/wxpdfdoc/src_pdfdecode.o "-I." "-I."
D:/Projects/MyProject/sdk/wxpdfdoc/src/pdfcolour.cpp:31: warning: 'wxPdfColour::ms_colourDatabase' redeclared without dllimport attribute: previous dllimport ignored
D:/Projects/MyProject/sdk/wxpdfdoc/src/pdfcolour.cpp:31: error: definition of static data member 'wxPdfColour::ms_colourDatabase' of dllimport'd class
D:/Projects/MyProject/sdk/wxpdfdoc/src/pdfcolour.cpp:34: warning: 'static wxColourDatabase* wxPdfColour::GetColourDatabase()' redeclared without dllimport attribute: previous dllimport ignored
D:/Projects/MyProject/sdk/wxpdfdoc/src/pdfcolour.cpp:57: warning: 'wxPdfColour::wxPdfColour()' redeclared without dllimport attribute: previous dllimport ignored
D:/Projects/MyProject/sdk/wxpdfdoc/src/pdfcolour.cpp:64: warning: 'wxPdfColour::wxPdfColour(unsigned char)' redeclared without dllimport attribute: previous dllimport ignored
D:/Projects/MyProject/sdk/wxpdfdoc/src/pdfcolour.cpp:69: warning: 'wxPdfColour::wxPdfColour(const wxColour&)' redeclared without dllimport attribute: previous dllimport ignored
D:/Projects/MyProject/sdk/wxpdfdoc/src/pdfcolour.cpp:74: warning: 'wxPdfColour::wxPdfColour(unsigned char, unsigned char, unsigned char)' redeclared without dllimport attribute: previous dllimport ignored
D:/Projects/MyProject/sdk/wxpdfdoc/src/pdfcolour.cpp:79: warning: 'wxPdfColour::wxPdfColour(double, double, double, double)' redeclared without dllimport attribute: previous dllimport ignored
D:/Projects/MyProject/sdk/wxpdfdoc/src/pdfcolour.cpp:84: warning: 'wxPdfColour::wxPdfColour(const wxPdfSpotColour&, double)' redeclared without dllimport attribute: previous dllimport ignored
D:/Projects/MyProject/sdk/wxpdfdoc/src/pdfcolour.cpp:89: warning: 'wxPdfColour::wxPdfColour(const wxPdfPattern&)' redeclared without dllimport attribute: previous dllimport ignored
D:/Projects/MyProject/sdk/wxpdfdoc/src/pdfcolour.cpp:94: warning: 'wxPdfColour::wxPdfColour(const wxString&)' redeclared without dllimport attribute: previous dllimport ignored
D:/Projects/MyProject/sdk/wxpdfdoc/src/pdfcolour.cpp:99: warning: 'wxPdfColour::wxPdfColour(const wxPdfColour&)' redeclared without dllimport attribute: previous dllimport ignored
D:/Projects/MyProject/sdk/wxpdfdoc/src/pdfcolour.cpp:106: warning: 'wxPdfColour::wxPdfColour(const wxString&, bool)' redeclared without dllimport attribute: previous dllimport ignored
D:/Projects/MyProject/sdk/wxpdfdoc/src/pdfcolour.cpp:113: warning: 'wxPdfColour& wxPdfColour::operator=(const wxPdfColour&)' redeclared without dllimport attribute: previous dllimport ignored
D:/Projects/MyProject/sdk/wxpdfdoc/src/pdfcolour.cpp:122: warning: 'bool wxPdfColour::Equals(const wxPdfColour&) const' redeclared without dllimport attribute: previous dllimport ignored
D:/Projects/MyProject/sdk/wxpdfdoc/src/pdfcolour.cpp:128: warning: 'void wxPdfColour::SetColour(unsigned char)' redeclared without dllimport attribute after being referenced with dll linkage
D:/Projects/MyProject/sdk/wxpdfdoc/src/pdfcolour.cpp:136: warning: 'void wxPdfColour::SetColour(const wxColour&)' redeclared without dllimport attribute after being referenced with dll linkage
D:/Projects/MyProject/sdk/wxpdfdoc/src/pdfcolour.cpp:144: warning: 'void wxPdfColour::SetColour(unsigned char, unsigned char, unsigned char)' redeclared without dllimport attribute after being referenced with dll linkage
D:/Projects/MyProject/sdk/wxpdfdoc/src/pdfcolour.cpp:150: warning: 'void wxPdfColour::SetColour(double, double, double, double)' redeclared without dllimport attribute after being referenced with dll linkage
D:/Projects/MyProject/sdk/wxpdfdoc/src/pdfcolour.cpp:161: warning: 'void wxPdfColour::SetColour(const wxString&)' redeclared without dllimport attribute after being referenced with dll linkage
D:/Projects/MyProject/sdk/wxpdfdoc/src/pdfcolour.cpp:193: warning: 'void wxPdfColour::SetColour(const wxPdfSpotColour&, double)' redeclared without dllimport attribute after being referenced with dll linkage
D:/Projects/MyProject/sdk/wxpdfdoc/src/pdfcolour.cpp:201: warning: 'void wxPdfColour::SetColour(const wxPdfPattern&)' redeclared without dllimport attribute after being referenced with dll linkage
D:/Projects/MyProject/sdk/wxpdfdoc/src/pdfcolour.cpp:209: warning: 'const wxString wxPdfColour::GetColour(bool) const' redeclared without dllimport attribute: previous dllimport ignored
D:/Projects/MyProject/sdk/wxpdfdoc/src/pdfcolour.cpp:239: warning: 'const wxString wxPdfColour::GetColourValue() const' redeclared without dllimport attribute: previous dllimport ignored
D:/Projects/MyProject/sdk/wxpdfdoc/src/pdfcolour.cpp:244: warning: 'wxPdfSpotColour::wxPdfSpotColour(int, double, double, double, double)' redeclared without dllimport attribute: previous dllimport ignored
D:/Projects/MyProject/sdk/wxpdfdoc/src/pdfcolour.cpp:249: warning: 'wxPdfSpotColour::wxPdfSpotColour(const wxPdfSpotColour&)' redeclared without dllimport attribute: previous dllimport ignored
mingw32-make.exe[1]: *** [../../sdk/work/wxpdfdoc/src_pdfcolour.o] Error 1
mingw32-make.exe[1]: *** Waiting for unfinished jobs....
D:/Projects/MyProject/sdk/wxpdfdoc/src/pdfdecode.cpp:35: warning: 'wxMemoryOutputStream* wxPdfParser::FlateDecode(wxMemoryOutputStream*)' redeclared without dllimport attribute: previous dllimport ignored
D:/Projects/MyProject/sdk/wxpdfdoc/src/pdfdecode.cpp:48: warning: 'wxMemoryOutputStream* wxPdfParser::ASCIIHexDecode(wxMemoryOutputStream*)' redeclared without dllimport attribute: previous dllimport ignored
D:/Projects/MyProject/sdk/wxpdfdoc/src/pdfdecode.cpp:98: warning: 'wxMemoryOutputStream* wxPdfParser::ASCII85Decode(wxMemoryOutputStream*)' redeclared without dllimport attribute: previous dllimport ignored
D:/Projects/MyProject/sdk/wxpdfdoc/src/pdfdecode.cpp:180: warning: 'wxMemoryOutputStream* wxPdfParser::DecodePredictor(wxMemoryOutputStream*, wxPdfObject*)' redeclared without dllimport attribute: previous dllimport ignored
D:/Projects/MyProject/sdk/wxpdfdoc/src/pdfdecode.cpp:329: warning: 'wxMemoryOutputStream* wxPdfParser::LZWDecode(wxMemoryOutputStream*)' redeclared without dllimport attribute: previous dllimport ignored
D:/Projects/MyProject/sdk/wxpdfdoc/src/pdfdecode.cpp:342: warning: 'wxPdfLzwDecoder::ms_andTable' redeclared without dllimport attribute: previous dllimport ignored
D:/Projects/MyProject/sdk/wxpdfdoc/src/pdfdecode.cpp:344: warning: 'wxPdfLzwDecoder::wxPdfLzwDecoder()' redeclared without dllimport attribute after being referenced with dll linkage
D:/Projects/MyProject/sdk/wxpdfdoc/src/pdfdecode.cpp:351: warning: 'virtual wxPdfLzwDecoder::~wxPdfLzwDecoder()' redeclared without dllimport attribute after being referenced with dll linkage
D:/Projects/MyProject/sdk/wxpdfdoc/src/pdfdecode.cpp:361: warning: 'int wxPdfLzwDecoder::GetNextCode()' redeclared without dllimport attribute: previous dllimport ignored
D:/Projects/MyProject/sdk/wxpdfdoc/src/pdfdecode.cpp:390: warning: 'bool wxPdfLzwDecoder::Decode(wxMemoryInputStream*, wxMemoryOutputStream*)' redeclared without dllimport attribute after being referenced with dll linkage
D:/Projects/MyProject/sdk/wxpdfdoc/src/pdfdecode.cpp:453: warning: 'void wxPdfLzwDecoder::InitializeStringTable()' redeclared without dllimport attribute after being referenced with dll linkage
D:/Projects/MyProject/sdk/wxpdfdoc/src/pdfdecode.cpp:471: warning: 'void wxPdfLzwDecoder::WriteString(int)' redeclared without dllimport attribute after being referenced with dll linkage
D:/Projects/MyProject/sdk/wxpdfdoc/src/pdfdecode.cpp:482: warning: 'void wxPdfLzwDecoder::AddStringToTable(int, char)' redeclared without dllimport attribute after being referenced with dll linkage
D:/Projects/MyProject/sdk/wxpdfdoc/src/pdfdecode.cpp:342: error: definition of static data member 'wxPdfLzwDecoder::ms_andTable' of dllimport'd class
mingw32-make.exe[1]: *** [../../sdk/work/wxpdfdoc/src_pdfdecode.o] Error 1
Chief Justice: We have trouble dear citizens!
Citizens: What it is his honor?
Chief Justice:Our president is an atheist, who will he swear to?
[Ubuntu 15.04/Windows 10 Pro - GCC/MinGW, CodeLite IDE et al]

User avatar
evstevemd
Part Of The Furniture
Part Of The Furniture
Posts: 2092
Joined: Wed Jan 28, 2009 11:57 am
Location: Dar es Salaam, United Republic of Tanzania
Contact:

Postby evstevemd » Wed Dec 08, 2010 4:06 pm

I use GCC/Codelite/wxWidgets 2.9.1
Chief Justice: We have trouble dear citizens!
Citizens: What it is his honor?
Chief Justice:Our president is an atheist, who will he swear to?
[Ubuntu 15.04/Windows 10 Pro - GCC/MinGW, CodeLite IDE et al]

utelle
Moderator
Moderator
Posts: 823
Joined: Tue Jul 05, 2005 10:00 pm
Location: Cologne, Germany
Contact:

Postby utelle » Wed Dec 08, 2010 8:51 pm

evstevemd wrote:Cannot Compile SVN. First I get a lot of warnings and then one error!

----------Build Started--------
C:\WINDOWS\system32\cmd.exe /c ""mingw32-make.exe" -j 2 -f "MyProject_wsp.mk""
----------Building project:[ wxpdfdoc - DebugUnicode ]----------
mingw32-make.exe[1]: Entering directory `D:/Projects/MyProject/sdk/wxpdfdoc'
g++ -c "D:/Projects/MyProject/sdk/wxpdfdoc/src/pdfannotation.cpp" -g -mthreads -DHAVE_W32API_H -D__WXMSW__ -D__WXDEBUG__ -D_UNICODE -IC:\wxWidgets\lib\gcc_dll\mswud -IC:\wxWidgets\include -DWXUSINGDLL -Wno-ctor-dtor-privacy -pipe -fmessage-length=0 -DWXMAKINGDLL_MYLIB -o ../../sdk/work/wxpdfdoc/src_pdfannotation.o "-I." "-I."
g++ -c "D:/Projects/MyProject/sdk/wxpdfdoc/src/pdfbarcode.cpp" -g -mthreads -DHAVE_W32API_H -D__WXMSW__ -D__WXDEBUG__ -D_UNICODE -IC:\wxWidgets\lib\gcc_dll\mswud -IC:\wxWidgets\include -DWXUSINGDLL -Wno-ctor-dtor-privacy -pipe -fmessage-length=0 -DWXMAKINGDLL_MYLIB -o ../../sdk/work/wxpdfdoc/src_pdfbarcode.o "-I." "-I."
D:/Projects/MyProject/sdk/wxpdfdoc/src/pdfbarcode.cpp:27: warning: 'wxPdfBarCodeCreator::wxPdfBarCodeCreator(wxPdfDocument&)' redeclared without dllimport attribute: previous dllimport ignored
[...]
D:/Projects/MyProject/sdk/wxpdfdoc/src/pdfdecode.cpp:482: warning: 'void wxPdfLzwDecoder::AddStringToTable(int, char)' redeclared without dllimport attribute after being referenced with dll linkage
D:/Projects/MyProject/sdk/wxpdfdoc/src/pdfdecode.cpp:342: error: definition of static data member 'wxPdfLzwDecoder::ms_andTable' of dllimport'd class
mingw32-make.exe[1]: *** [../../sdk/work/wxpdfdoc/src_pdfdecode.o] Error 1

Well, you're mixing up library and DLL builds.

If you only define WXUSINGDLL - as you did -, this means you want to compile code which references wxPdfDocument compiled as a DLL. You can't compile wxPdfDocument itself that way.

If you want to compile wxPdfDocument itself as a library resp. as a DLL define WXMAKINGLIB_PDFDOC resp. WXMAKINGDLL_PDFDOC. In that context defining WXUSINGDLL means using a wxWidgets DLL build.

Regards,

Ulrich


Return to “wxCode”

Who is online

Users browsing this forum: No registered users and 3 guests