// JP opened flex table

Click to See Complete Forum and Search --> : Using *.lib file in MFC project?


Lan Nguyen
November 12th, 2001, 02:06 AM
Dear all,
I would like to ask a question.
I have a "srp.lib" file, compiled in VC++ from a C project. When I use that "srp.lib" library file in a "tconf" project (written in C, with main() function), "tconf" compiles and links well to produce an exe file.
But when I use that "srp.lib" library file in a MFC project "dlgtest", when linking, it gives some errors:
"dlgtestDlg.obj : error LNK2001: unresolved external symbol "struct t_conf * __cdecl t_openconf(struct _iobuf *)" (?t_openconf@@YAPAUt_conf@@PAU_iobuf@@@Z)
Debug/dlgtest.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
"
in which t_openconf() is defined in "srp.lib" and also used in "tconf".
Can anyone tell me how to fix it?
Many thanks,
Lan Nguyen

rclemes
November 12th, 2001, 06:35 AM
Have you tried the extern "C" linking directive ?

Brian Steffens
April 12th, 2002, 02:23 AM
i don't know, i need help with something like that too. i have no problem with directx in a win32 app, but i have the same problem as you do trying to do it in mfc (unresolved externals).. it's when vc++ links in ddraw.lib. i'd really like to know how to get around this.

//JP added flex table