Linking wxPDFView error

Talk here about issues with one of the components hosted at wxCode, or suggest features for it.
Post Reply
dkaip
Super wx Problem Solver
Super wx Problem Solver
Posts: 333
Joined: Wed Jan 20, 2010 1:15 pm

Linking wxPDFView error

Post by dkaip »

Hello.
After so time finaly i made wxPDFView lib at C:\wxPDFView\build\Debug folder(files wxPDFView.lib and wxPDFView.pdb) following the instruction exactly.

Now i am try to build Simple.cpp sample.
mingw32-g++.exe -w -std=c++14 -g -D__WXDEBUG__ -std=c++14 -IC:\wxWidgets-3.0.4\include -IC:\wxWidgets-3.0.4\lib\gcc_lib\mswu -I..\..\include -c C:\wxPDFView\samples\simple\Simple.cpp -o obj\Debug\Simple.o

ok produce Simple.o at C:\wxPDFView\samples\simple\obj\Debug folder.

But trying linker ...
mingw32-g++.exe -LC:\wxWidgets-3.0.4\lib\gcc_lib -o bin\Debug\Sample.exe obj\Debug\Simple.o -static C:\wxWidgets-3.0.4\lib\gcc_lib\libwxexpat.a C:\wxWidgets-3.0.4\lib\gcc_lib\libwxjpeg.a C:\wxWidgets-3.0.4\lib\gcc_lib\libwxmsw30u.a C:\wxWidgets-3.0.4\lib\gcc_lib\libwxmsw30u_gl.a C:\wxWidgets-3.0.4\lib\gcc_lib\libwxpng.a C:\wxWidgets-3.0.4\lib\gcc_lib\libwxregexu.a C:\wxWidgets-3.0.4\lib\gcc_lib\libwxscintilla.a C:\wxWidgets-3.0.4\lib\gcc_lib\libwxtiff.a C:\wxWidgets-3.0.4\lib\gcc_lib\libwxzlib.a ..\..\build\Debug\wxPDFView.lib -mwindows
i am taking ...
Warning: corrupt .drectve at end of def file
..\..\build\Debug\wxPDFView.lib(wxPDFView.dir/Debug/PDFViewThumbnailListBox.obj):(.text$mn+0x26): undefined reference to `__security_cookie'
..\..\build\Debug\wxPDFView.lib(wxPDFView.dir/Debug/PDFViewThumbnailListBox.obj):(.text$mn+0x55): undefined reference to `?
Create@wxVListBox@@QAE_NPAVwxWindow@@HABVwxPoint@@ABVwxSize@@JABVwxString@@@Z'
.....................
What i am doing wrong?
Thank's
Jim
User avatar
doublemax
Moderator
Moderator
Posts: 19103
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: Linking wxPDFView error

Post by doublemax »

Is wxVListBox the only reference missing or are there more errors?
That would be strange because is defined in the "core" library that should always be included.

Regarding the missing "__security_cookie":
https://stackoverflow.com/questions/216 ... ity-cookie

Regarding "Warning: corrupt .drectve at end of def file":
After some Googling it seems that this happens when you use MSVC libraries with GCC. Are you doing that? That could explain the other errors, too.
Use the source, Luke!
dkaip
Super wx Problem Solver
Super wx Problem Solver
Posts: 333
Joined: Wed Jan 20, 2010 1:15 pm

Re: Linking wxPDFView error

Post by dkaip »

Yes, that is exactly, i use MSVC libraries with GCC...
I always use CodeBlocks and GCC. In Linux i connect pdfium with gcc easy.
But in windows compilation process use MSVC, that is i hate, the using of vs and ms tools.
But there is need to have a pdfiewer in windows, so i just build wxPDFView following exactly the instructions.
But this building depends from MSVC libraries and the connection is the problem.
There is some way to over this?
Thank you
Jim.
User avatar
doublemax
Moderator
Moderator
Posts: 19103
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: Linking wxPDFView error

Post by doublemax »

After Googling a bit, it seems impossble to link MSVC libs with GCC. So you either need to find a way to build pdfium with GCC or use the MSVC compiler for everything. I don't know if pdfium supports that, but another option could be to use MSVC to create a pdfium DLL instead of a static library.
Use the source, Luke!
Post Reply