高级会员
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
|
【转帖】link error with dwf libraries
link error with dwf libraries
link error with dwf libraries
hi,
i'm having problems when 'dd_bb6wd_dwfexport.lib' is added to my app.
while compiling returns the link error:
"unresolved external '_errno' referenced from dd_bb6wd_dwfexport.lib|dwfexportimpl".
i'm testing odreaderex example using c++builder 6 compiler and dwgdirect 1.11. this problem was already happening in the previous version.
does someone know what can be wrong?
regards,
regina.
link error exporting dwf (c++ builder 6 compiler)
hi,
i updated dwgdirect library to 1.11.01 version and tried again exporting dwf using oddwfexportex example. i still have the same linker error when lib is included.
can someone help please?
regards,
regina.
regina,
_errno is a global variable. it holds error code used by the strerror function for printing error messages. it should be declared in borland\cbuilder6\include\errno.h header file. also you can look at borland c++ builder 6 -> help -> c runtimelibrary reference -> errno.
check, please, that you have correct errno.h
misha kuzinets
anything else?
i am having the same problem in borland builder v6 update 4.
[linker error] unresolved external '_errno' referenced from c:\devtools\opendesign\lib\bb6\dd_bb6wd_dwfexport. lib|dwfexportimpl
i have errno.h in c:\program files\borland\cbuilder6\include. that directory is first in the bpl's include path. the bpl is being built with the -twm flag to make it static multi threaded.
i do have microsoft c# and c++.net installed on the same machine, but i do not use them for this project.
any more advice would be appreciated.
relevant header file excerpt below:
#ifdef __cplusplus
extern "c" {
#endif
extern int * _rtlentry _expfunc __errno(void);
extern int * _rtlentry _expfunc __doserrno(void);
#ifdef __cplusplus
}
#endif
#define errno (*__errno())
#define _doserrno (*__doserrno())
#else
extern int _rtlentry _expdata errno;
extern int _rtlentry _expdata _doserrno;
#endif
extern int _rtlentry _expdata _sys_nerr;
extern char * _rtlentry _expdata _sys_errlist[];
#if !defined(rc_invoked)
#if defined(__stdc__)
#pragma warn .nak
#endif
#endif /* !rc_invoked */
#ifdef __cplusplus
} // "c"
} // std
#endif /* __cplusplus */
#endif /* __errno_h */
#if defined(__cplusplus) && !defined(__using_cname__) && !defined(__errno_h_using_list)
#define __errno_h_using_list
# ifdef _mt
using std:: __errno;
using std:: __doserrno;
# else // !_mt
using std::errno;
using std::_doserrno;
# endif // _mt
using std::_sys_nerr;
using std::_sys_errlist;
#endif /* __using_cname__ */
-twm ?
is there something other than the cflag -twm that makes a project multi threaded vs. single threaded? is there a way to check a lib to make sure what threading model it is? i am still getting the unresolved external. someone please send me some advil and a drywall repair kit.
thanks,
dan
flags used to compile bb6 libraries are:
c++flags="-twd -w-8012 -w-8027 -w-8026 -w-8066 -w-8022 -w-8004 -w-8057 -w-8088 -w-8030 -w-8072 -w-8060 -w-8008 -dwin32"
we have 3 bc6 sample projects: odreadex, odvectorizeex and odwriteex. maybe comparing this projects settings and yours may help?
sergey slezkin
where can i get the borland project files?
can you send me the borland c++ builder 6.0 project files (bpg, bpr, or bpk) for one of the dwf sample projects? i copied the compiler flags, but i still have the same error.
thanks,
dan
please see attached project
i am still getting the error with the simplified attached project. please let me know what i am doing wrong. it seems so simple, but it doesn't work. i have unzipped open design to c:\devtools\opendesign and have a directory "quest" for the attached project. i am building in borland c++ 6.0 professional edition with the fourth update.
attached files (6.8 kb, 16 views)
dan,
please, carefully check that the same flags are used. for instance, -twd not -twm, and etc.
by the way the attached file doesn't keep the project wholly.
misha kuzinets
link errors in exe, bpl linked to libs
i can link properly now if i add the appropriate open design libraries to both the bpl where they are used primarily, and the exe which has an object of one of the classes from the bpl, which accesses open design classes. i guess i lack a basic understanding of the dependencies between the exe and bpl. should i really have to add the lib files to both the bpl and the exe. if not, what do i need to do differently?
thanks,
dan
#pragma link
well, at least part of the answer to this problem was #pragma link. i have the open design code in a bpl which is statically linked into the exe. after i added #pragma link statements for all the libs and odfilebuf.obj to a cpp in the bpl i can remove the libs from the exe's list of files.
|