From: Ruwei L. <rw...@ph...> - 2006-05-29 18:26:36
|
Hi, Arjen, I was about to send you the source code and project file when I found that my project was using C++ binding, and I tried to link it to the original plplotd.dll and a new "plstream.dll" which I created using the source code (with minor change) to support C++ binding. So those error messages may not due to plplotd.dll. It maybe caused by my "plstream.dll". Is it the right way to create a c++ binding dll for plplot just using the "plstream.cc" and "plstream.h"(change the declaration of "class plstream" to "class __declspec(dllexport) plstream") and link the project to "plplotd.dll"? Thanks a lot! I'm really really sorry for my mistake. I got so dippy with adding on C++ binding, GD lib and/or freetype to the Plplot library. Regards, Ruwei Arjen Markus wrote: > Ruwei Liu wrote: > >> Hi, all >> >> I'm trying to use plplot library for a project. It works fine >> with the static library , but it fails to >> link when I using the dynamic library. I got the following error >> message: >> >> ------ Build started: Project: Tplot, Configuration: Debug >> Win32 ------ >> >> Linking... >> LINK : error LNK2020: unresolved token (0A0000B3) >> plD_dispatch_init_null >> LINK : error LNK2020: unresolved token (0A0000B4) >> plD_dispatch_init_gif >> LINK : error LNK2020: unresolved token (0A0000B5) >> plD_dispatch_init_jpeg >> LINK : error LNK2020: unresolved token (0A0000B6) >> plD_dispatch_init_png >> LINK : error LNK2020: unresolved token (0A0000B7) >> plD_dispatch_init_ljii >> LINK : error LNK2020: unresolved token (0A0000B8) >> plD_dispatch_init_ljiip >> LINK : error LNK2020: unresolved token (0A0000B9) >> plD_dispatch_init_xfig >> LINK : error LNK2020: unresolved token (0A0000BA) >> plD_dispatch_init_psc >> LINK : error LNK2020: unresolved token (0A0000BB) >> plD_dispatch_init_psm >> LINK : error LNK2020: unresolved token (0A0000BC) >> plD_dispatch_init_plm >> LINK : error LNK2020: unresolved token (0A0000BD) >> plD_dispatch_init_win3 >> LINK : fatal error LNK1120: 11 unresolved externals >> >> Tplot - 12 error(s), 0 warning(s) >> >> I did put the "plplotd.lib", "plplotd.def", "plplotd.exp" and >> "plplotd.dll" to the project directory, link >> to "plplotd.lib", and also defined "__PLDLL_H__", is there anything >> I'm still missing? > > > Have you looked at the makefile for the examples with the DLL in > sys\msdev\win32\dexamples? > These compile and link allright, so I would suggest you mimick the > compile and link options > from these examples. > > If this does not work, can you send me the source code and the > makefile/project file, so that I > can try and reproduce this on my machine? (I maintain the win32 device > and the MSVC > build system) > > Regards, > > Arjen |