Hi!
buffer_to_cfile: use extern in the function declaration (in the .h file)
pdu_typename: add a body to the value_string (and please use a more distinctive name, pdu_typename is very generic)
In general: exporting DATA isn't a good idea at all, use/add a function to get that data.
... and try a distclean instead of just a clean (I don't know if that will help)
Regards, ULFL
Ethereal user support <ethereal-users@xxxxxxxxxxxx> schrieb am 10.10.05 15:20:50:
> 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
>
> -----------------------------------------------------------------
> _______________________________________________
> Ethereal-users mailing list
> Ethereal-users@xxxxxxxxxxxx
> http://www.ethereal.com/mailman/listinfo/ethereal-users
>
______________________________________________________________________
XXL-Speicher, PC-Virenschutz, Spartarife & mehr: Nur im WEB.DE Club!
Jetzt gratis testen! http://freemail.web.de/home/landingpad/?mc=021130