I am compiling plplot in C++ builer(windows version) just by adding some related files in [plplot]\scr and [plplot]\include ect.into my project which will generate a static library according to the 'makefile' in [plplot]\sys\win32\msdev\plplib. I konw that some header files is needed,such as 'plConfig.h'. This header file should generated by certain makefile,right?
The following is what I did on compiling plplot in c++ Builder:
1).I add some lines in plconfig.h.in,they are"
#define LIB_DIR "$(PLLIB:\=\\)"
#define BIN_DIR "$(PLBIN:\=\\)"
#define DATA_DIR "$(PLLIB:\=\\)"
#define DRV_DIR "$(PLLIB:\=\\)"
#define VERSION "5.6.1"
#define BUILD_DIR "F:\plplot\building\lib\Debug_Build"
and changed it as plConfig.h.
2).According to the error information about absence of 'XXX.h',I added them by hand. And I also found that some errors about 'nan.h' was appeared in the line:
static unsigned __int64 lNaN = ((unsigned __int64) 1 << 63) - 1;
#define NaN (*(double*)&lNaN)
I found errors about the string '_int64', in Borland c++ Builder, it should be '__int64',note that the latter has two '_' .And other error about head file is 'unistd.h'. I just ignored it in my project.
4).Except for some 'warnings',the static libarary was generated successfully.
But after that,a linker error was jumped out when I test a examples ,it said:"[Linker Error] Error: Unresolved external '_plD_dispatch_init_null' referenced from F:\PLPLOT\BUILDING\LIB\DEBUG_BUILD\LIBPLPLOT.LIB|plcore"
Could somebody tell me that if some of the steps was wrong? And the last error was related to the 'plcore.c/h' , and I have found the related lines in 'plcore.h':
#if defined(PLD_null) && !defined(ENABLE_DYNDRIVERS)
How could I overcome it ?Thank you !