From: Ruwei L. <rw...@ph...> - 2006-05-26 20:58:22
|
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? Any help or hint will be greatly appreciated. Thanks Ruwei Liu |
From: Arjen M. <arj...@wl...> - 2006-05-29 06:38:14
|
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 |
From: Ruwei L. <rw...@ph...> - 2006-05-29 17:23:36
|
Hi, Arjen Thanks for replying. Actually, examples with DLL won't compile on my computer. I got the following error messages when I tried to make: Microsoft (R) Program Maintenance Utility Version 7.10.3077 Copyright (C) Microsoft Corporation. All rights reserved. No configuration specified. Defaulting to x19d - Win32 Debug. if not exist "./x01d/" mkdir "./x01d" if not exist ".\x01d\Release/" mkdir ".\x01d\Release" cl.exe /nologo /ML /W3 /GX /O2 /D "NDEBUG" /D "NOBRAINDEAD" /D "WIN32" / D "_CONSOLE" /Fp".\x01d\Release/x01d.pch" /D "__PLDLL_H__" /YX /Fo".\x01d\Releas e/" /c ..\..\..\..\tmp\x01c.c x01c.c c:\downloads\plplot-5.6.1_RC1\tmp\plplot.h(617) : warning C4005: 'API' : macro r edefinition c:\downloads\plplot-5.6.1_RC1\tmp\plplot.h(149) : see previous definitio n of 'API' c:\downloads\plplot-5.6.1_RC1\tmp\plplot.h(1886) : error C2373: 'plhlsrgb' : red efinition; different type modifiers c:\downloads\plplot-5.6.1_RC1\tmp\plplot.h(1141) : see declaration of 'p lhlsrgb' c:\downloads\plplot-5.6.1_RC1\tmp\plplot.h(1889) : error C2373: 'plrgbhls' : red efinition; different type modifiers c:\downloads\plplot-5.6.1_RC1\tmp\plplot.h(1315) : see declaration of 'p lrgbhls' ..\..\..\..\tmp\x01c.c(121) : warning C4013: 'plparseopts' undefined; assuming e xtern returning int NMAKE : fatal error U1077: 'cl.exe' : return code '0x2' Stop. I'll send you the project source later. 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 |
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 |
From: Arjen M. <arj...@wl...> - 2006-05-30 06:29:51
|
Ruwei Liu wrote: > 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. Hi Ruwei, no need to apologise - building programs is a hazardous and complicated task. All the various options for using libraries do not help making it easier. Right now I do not have any experience using the C++ bindings under MSVC (more precisely the sys/win32/msdev platform), as I do not program in C++ myself. It may be worth looking at, but that is a task for the hopefully near future. I intended to get freetype and GD working correctly for this release, but there are a few wrinkles to iron out first. Regards, Arjen |