Sir,
When I using libethereal.dll, I want to
add function to it(within file.c and file.h). I
add code as following.
Q1:
1.add function to file.c and declaration it in
file.h
int buffer_to_cfile(gchar * gbuff,int
isize)
2.add function name buffer_to_cfile to file
libethereal.def
buffer_to_cfile
3.call nmake -f makefile.nmake to compile
project.
error message is:
libethereal.def : error LNK2001: unresolved
external symbol buffer_to_cfile libethereal.lib : fatal
error LNK1120: 1 unresolved externals LINK : fatal error
LNK1141: failure during build of exports file NMAKE :
fatal error U1077: 'link' : return code '0x475'
Stop. NMAKE : fatal error U1077: '"C:\Program
Files\Microsoft Visual Studio\VC98\bin\NMAKE.EXE"
Stop.
Q2: how to add variable(export)
1.add line to file.h
ETH_VAR_IMPORT const value_string
pdu_typename[];
2.add declaration to libethereal.def
pdu_typename
DATA
3.make and compile
the same error occured:
libethereal.def : error LNK2001: unresolved
external symbol pdu_typename libethereal.lib : fatal error
LNK1120: 1 unresolved externals LINK : fatal error
LNK1141: failure during build of exports file NMAKE :
fatal error U1077: 'link' : return code '0x475'
development environment:
OS:win2000
IDE:VC 6.0
though it is a link error,I do this as the exist
variable in other file(smb.h) like 'ETH_VAR_IMPORT const value_string
smb_cmd_vals[];
I rebuild the whole project,but link error
occurred.
nmake -f makefile.nmake clean
nmake -f makefile.nmake
can you give me some advise to solve
it,thanks!
Best Regards
Jeff
|