logging-log4cxx-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Owen Corpening" <ocorpen...@acornsys.com>
Subject Re: can't statically link on w32
Date Fri, 13 May 2005 00:41:06 GMT
My method is stdcall:
extern "C" UINT __stdcall ValidateActuateiServerSettings(MSIHANDLE hInstall)
{
    BasicConfigurator::configure();

but I am linking to logc4xx.lib - is there some trick to getting the
mangling right?

here's the link cli :

link
/OUT:"C:\development\head\EPS\Install\ActuateInstall\actions\Release/AcornAc
tuateCustomActions.dll" /INCREMENTAL:NO /NOLOGO /LIBPATH:"C:\Program
Files\Microsoft SDK\Lib"
/LIBPATH:"C:\development\head\EPS\vendor\Apache\logging-log4cxx\build\releas
e\static" /DLL /DEBUG
/PDB:"C:\development\head\EPS\Install\ActuateInstall\actions\Release/AcornAc
tuateCustomActions.pdb" /SUBSYSTEM:WINDOWS /OPT:REF /OPT:ICF
/IMPLIB:"C:\development\head\EPS\Install\ActuateInstall\actions\Release/Acor
nActuateCustomActions.lib" /MACHINE:X86 msi.lib log4cxx.lib  kernel32.lib
user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib
ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib "\Program
Files\Microsoft SDK\Lib\Msi.Lib"
"\development\head\Eps\vendor\Apache\logging-log4cxx\build\release\static\lo
g4cxx.lib" "\Program Files\Microsoft SDK\Lib\Kernel32.Lib" "\Program
Files\Microsoft SDK\Lib\User32.Lib" "\Program Files\Microsoft
SDK\Lib\Gdi32.Lib" "\Program Files\Microsoft SDK\Lib\WinSpool.Lib" "\Program
Files\Microsoft SDK\Lib\ComDlg32.Lib" "\Program Files\Microsoft
SDK\Lib\AdvAPI32.Lib" "\Program Files\Microsoft SDK\Lib\Shell32.Lib"
"\Program Files\Microsoft SDK\Lib\Ole32.Lib" "\Program Files\Microsoft
SDK\Lib\OleAut32.Lib" "\Program Files\Microsoft SDK\Lib\Uuid.Lib"

owen

"Andreas Fester" <Andreas.Fester@gmx.de> wrote in message
news:4283AE62.3080704@gmx.de...
> Hi,
>
> Owen Corpening wrote:
> > my .vcproj file has:
> >     AdditionalDependencies="msi.lib log4cxx.lib"
> >     OutputFile="$(OutDir)/AcornActuateCustomActions.dll"
> >     LinkIncremental="1"
> >     AdditionalLibraryDirectories="C:\Program Files\Microsoft
> >
SDK\Lib;C:\development\head\EPS\vendor\Apache\logging-log4cxx\build\release\
> > static"
> >
> > but I am getting this as if it cannot find the log4cxx.lib:
> >
> > [AcornActuateCustomActions] AcornActuateCustomActions.obj : error
LNK2019:
> > unres
> > olved external symbol "__declspec(dllimport) public: void __thiscall
> > log4cxx::Lo
> > gger::forcedLog(class log4cxx::helpers::ObjectPtrT<class log4cxx::Level>
> > const &
> > ,class std::basic_string<char,struct std::char_traits<char>,class
> > std::allocator
> > <char> > const &,class log4cxx::spi::LocationInfo const &)"
> > (__imp_?forcedLog@Lo
> >
gger@log4cxx@@QAEXABV?$ObjectPtrT@VLevel@log4cxx@@@helpers@2@ABV?$basic_stri
> > ng@D
> > U?$char_traits@D@std@@V?$allocator@D@2@@std@@ABVLocationInfo@spi@2@@Z)
> > referenced in function _ValidateActuateiServerSettings@4
>                           =================================
>
> This does not seem to be a C++ mangled name but an __stdcall
> mangled name.
> Could it bee that you are mixing calling conventions somehow?
>
> Otherwise, try to write a small .bat file which contains the linker
> call and add all parameters manually (I do not currently have a
> Windows system available, but something like
>
> LINK /NOLOGO /DEBUG /SUBSYSTEM:windows LIBPATH:C:\Program
>
Files\Microsoft\SDK\Lib;C:\development\head\EPS\vendor\Apache\logging-log4cx
x\build\release\
> static" msi.lib log4cxx.lib objectfile1.obj objectfile2.obj
>
> should do the job). This sort of approach usually helps me in finding
> such errors :-)
>
> Regards,
>
> Andreas
>
> -- 
> Andreas Fester
> mailto:Andreas.Fester@gmx.de
> WWW: http://littletux.homelinux.org
> ICQ: 326674288
>




Mime
View raw message