[reSIProcate] how to use Visual Studio(VC++) with reSIProcate....

hanan aboudalal hanan.aboudalal at gmail.com
Wed Jun 21 04:06:21 CDT 2006


Hi all:

if you are trying to use resiprocate.lib in a normal application project
(generating exe), make sure of the following. Go to project properties ->
Configuration properties -> general, and set the value of  *Use of MFC*  to
*Use MFC in a Static Library. *
**
And if your trying to make your a library make sure that it is a static one.
Go to project properties -> Configuration properties -> general, and set the
value of  *Configuration Type*  to  *Static Library (.lib)*  and that of  *Use
of MFC*  to  *Use MFC in a Static Library**. *
**
best reguards,


On 6/21/06, julien <julien at aplix.co.jp> wrote:
>
> Hi Jinti,
> I can't debug (I press F10 to launch the program and I get an exception
> right away)
>
> In output I get this :
> -------------------------------------------
> 'test2.exe': Loaded 'C:\Documents and Settings\julien\My
> Documents\Visual Studio 2005\Projects\test2\debug2\test2.exe', Symbols
> loaded.
> 'test2.exe': Loaded 'C:\WINDOWS\system32\ntdll.dll', No symbols loaded.
> 'test2.exe': Loaded 'C:\WINDOWS\system32\mscoree.dll', No symbols loaded.
> 'test2.exe': Loaded 'C:\WINDOWS\system32\kernel32.dll', No symbols loaded.
> 'test2.exe': Loaded 'C:\WINDOWS\system32\advapi32.dll', No symbols loaded.
> 'test2.exe': Loaded 'C:\WINDOWS\system32\rpcrt4.dll', No symbols loaded.
> 'test2.exe': Loaded
>
> 'C:\WINDOWS\WinSxS\x86_Microsoft.VC80.DebugCRT_1fc8b3b9a1e18e3b_8.0.50727.42_x-ww_f75eb16c\msvcr80d.dll',
> Symbols loaded.
> 'test2.exe': Loaded 'C:\WINDOWS\system32\msvcrt.dll', No symbols loaded.
> 'test2.exe': Loaded
>
> 'C:\WINDOWS\WinSxS\x86_Microsoft.VC80.DebugCRT_1fc8b3b9a1e18e3b_8.0.50727.42_x-ww_f75eb16c\msvcp80d.dll',
> Symbols loaded.
> 'test2.exe': Loaded 'C:\WINDOWS\system32\ws2_32.dll', No symbols loaded.
> 'test2.exe': Loaded 'C:\WINDOWS\system32\ws2help.dll', No symbols loaded.
> 'test2.exe': Loaded
>
> 'C:\WINDOWS\WinSxS\x86_Microsoft.VC80.DebugCRT_1fc8b3b9a1e18e3b_8.0.50727.42_x-ww_f75eb16c\msvcm80d.dll',
> Symbols loaded.
> 'test2.exe': Loaded 'C:\WINDOWS\system32\ole32.dll', No symbols loaded.
> 'test2.exe': Loaded 'C:\WINDOWS\system32\gdi32.dll', No symbols loaded.
> 'test2.exe': Loaded 'C:\WINDOWS\system32\user32.dll', No symbols loaded.
> 'test2.exe': Loaded 'C:\WINDOWS\system32\iphlpapi.dll', No symbols loaded.
> 'test2.exe': Loaded 'C:\WINDOWS\system32\imm32.dll', No symbols loaded.
> 'test2.exe': Loaded 'C:\WINDOWS\system32\lpk.dll', No symbols loaded.
> 'test2.exe': Loaded 'C:\WINDOWS\system32\usp10.dll', No symbols loaded.
> 'test2.exe': Loaded 'C:\WINDOWS\system32\shlwapi.dll', No symbols loaded.
> 'test2.exe': Loaded
> 'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\mscorwks.dll', No symbols
> loaded.
> 'test2.exe': Loaded
>
> 'C:\WINDOWS\WinSxS\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.91_x-ww_0de56c07\msvcr80.dll',
> No symbols loaded.
> 'test2.exe': Loaded 'C:\WINDOWS\system32\shell32.dll', No symbols loaded.
> 'test2.exe': Loaded
>
> 'C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2180_x-ww_a84f1ff9\comctl32.dll',
> No symbols loaded.
> 'test2.exe': Loaded 'C:\WINDOWS\system32\comctl32.dll', No symbols loaded.
> 'test2.exe': Loaded
> 'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Culture.dll', No symbols
> loaded.
> 'test2.exe': Unloaded
> 'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Culture.dll'
> 'test2.exe': Loaded
>
> 'C:\WINDOWS\assembly\NativeImages_v2.0.50727_32\mscorlib\6bf31ec970aa584ea4f93a15d47b4b20\mscorlib.ni.dll',
> No symbols loaded.
> 'test2.exe' (Managed): Loaded
>
> 'C:\WINDOWS\assembly\GAC_32\mscorlib\2.0.0.0__b77a5c561934e089\mscorlib.dll',
> No symbols loaded.
> 'test2.exe': Loaded 'C:\WINDOWS\system32\uxtheme.dll', No symbols loaded.
> 'test2.exe': Loaded 'C:\Program
> Files\Stardock\ObjectDock\DockShellHook.dll', Binary was not built with
> debug information.
> 'test2.exe': Loaded 'C:\Program Files\MessengerPlus!
> 3\MsgPlusLoader.dll', No symbols loaded.
> 'test2.exe': Loaded 'C:\WINDOWS\system32\MSCTF.dll', No symbols loaded.
> 'test2.exe' (Managed): Loaded 'c:\Documents and Settings\julien\My
> Documents\Visual Studio 2005\Projects\test2\debug2\test2.exe', Symbols
> loaded.
> 'test2.exe': Loaded
> 'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\mscorjit.dll', No symbols
> loaded.
> 'test2.exe': Loaded
> 'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\diasymreader.dll', No
> symbols loaded.
> 'test2.exe': Loaded 'C:\WINDOWS\system32\rsaenh.dll', No symbols loaded.
> 'test2.exe' (Managed): Loaded
>
> 'C:\WINDOWS\WinSxS\x86_Microsoft.VC80.DebugCRT_1fc8b3b9a1e18e3b_8.0.50727.42_x-ww_f75eb16c\msvcm80d.dll',
> Symbols loaded.
> 'test2.exe': Loaded
>
> 'C:\WINDOWS\assembly\NativeImages_v2.0.50727_32\System\815b7bac7adfca41882215b165773fd3\System.ni.dll',
> No symbols loaded.
> 'test2.exe' (Managed): Loaded
>
> 'C:\WINDOWS\assembly\GAC_MSIL\System\2.0.0.0__b77a5c561934e089\System.dll',
> No symbols loaded.
> First-chance exception at 0x7c9acc82 in test2.exe: 0xC0000005: Access
> violation reading location 0xb722caf2.
> 'test2.exe': Loaded 'C:\WINDOWS\system32\version.dll', No symbols loaded.
> 'test2.exe': Unloaded 'C:\WINDOWS\system32\version.dll'
> 'test2.exe': Loaded 'C:\WINDOWS\system32\MSCTFIME.IME', No symbols loaded.
> 'test2.exe': Loaded 'C:\WINDOWS\system32\mfc42loc.dll', Binary was not
> built with debug information.
> First-chance exception at 0x10210c27 (msvcr80d.dll) in test2.exe:
> 0xC0000005: Access violation reading location 0xb722cb07.
> A first chance exception of type 'System.AccessViolationException'
> occurred in test2.exe
> A first chance exception of type
> '<CrtImplementationDetails>.ModuleLoadException' occurred in msvcm80d.dll
> First-chance exception at 0x7c81eb33 in test2.exe: Microsoft C++
> exception: [rethrow] at memory location 0x00000000..
> An unhandled exception of type 'System.TypeInitializationException'
> occurred in Unknown Module.
>
> Additional information: The type initializer for '<Module>' threw an
> exception.
>
> The thread 'Win32 Thread' (0x2ac) has exited with code 0 (0x0).
> The thread 'Win32 Thread' (0xab8) has exited with code 0 (0x0).
> The program '[1724] test2.exe: Managed' has exited with code 0 (0x0).
> The program '[1724] test2.exe: Native' has exited with code 0 (0x0).
>
> -------------------------------------------
> Yes I have choose Multi threaded debug dll : /MDd
>
> My compile options :
> /O2 /GL /I "C:\cygwin\home\julien\jsr180\Resiprocate" /D "WIN32" /D
> "NDEBUG" /D "_UNICODE" /D "UNICODE" /FD /EHa /MDd /Yu"stdafx.h"
> /Fp"Debug2\test2.pch" /Fo"Debug2\\" /Fd"Debug2\vc80.pdb" /W3 /nologo /c
> /Zi /clr /TP /errorReport:prompt /FU
> "c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.dll" /FU
> "c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Data.dll" /FU
> "c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Drawing.dll" /FU
> "c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Windows.Forms.dll"
> /FU "c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.XML.dll"
>
> My link command:
> /OUT:"C:\Documents and Settings\julien\My Documents\Visual Studio
> 2005\Projects\test2\Debug2\test2.exe" /INCREMENTAL:NO /NOLOGO
> /LIBPATH:"C:\OpenSSL\lib\VC\static" /LIBPATH:"C:\Documents and
> Settings\julien\My Documents\Visual Studio
> 2005\Projects\test2\test2\libs" /MANIFEST
> /MANIFESTFILE:"Debug2\test2.exe.intermediate.manifest" /DEBUG
> /ASSEMBLYDEBUG /PDB:"c:\Documents and Settings\julien\My
> Documents\Visual Studio 2005\Projects\test2\debug2\test2.pdb"
> /SUBSYSTEM:WINDOWS /LTCG /ENTRY:"main" /MACHINE:X86 /FIXED:No
> /ERRORREPORT:PROMPT iphlpapi.lib ws2_32.lib libeay32MD.lib
> libeay32MDd.lib ssleay32MD.lib ssleay32MDd.lib ares.lib dum.lib
> libdb43sd.lib libpopt.lib pcre.lib rutil.lib resiprocate.lib
>
> I have very poor knowledge about linking library's so I am not sure what
> to do now...
>
> Thank you very much for your help,
> Best regards
>
> Julien
>
> shen jinti a ¨¦crit :
> > hi julien,
> >
> > 2006/6/21, julien <julien at aplix.co.jp <mailto:julien at aplix.co.jp>>:
> >
> >     Hello everyone,
> >     I have the same problem,
> >     I am looking for guidelines to use resiprocate with visual studio,
> >
> >     My problem :
> >     (I am new to resiprocate ^-^)
> >     I managed to do the following :
> >     I successfully compiled the resiprocate.lib and made some test
> >     with the
> >     provided "visual solution",
> >     However I am having trouble importing the " resiprocate.lib" in an
> >     other
> >     project.
> >     I added iphlpapi.lib ws2_32.lib ares.lib dum.lib libdb43sd.lib
> >     libpopt.lib pcre.lib rutil.lib resiprocate.lib and the resip
> >     headers so
> >     that it would compile correctly.
> >
> >     To test, I want to add parts of the testServer.cxx, so that it
> >     starts a
> >     server when I press a button from a custom form.
> >
> >     However the moment I add a define using resiprocate like : #include
> >     "resip/stack/Helper.hxx"
> >     (I added extra include folder and extra library folders to the
> >     project)
> >
> >     Compile is ok,
> >     At link I get this warning :
> >     Linking...
> >     rutil.lib(Data.obj) : warning LNK4075: ignoring '/EDITANDCONTINUE'
> due
> >     to '/INCREMENTAL:NO' specification
> >
> >     and when I start the application I get :
> >     A debug assertion failed
> >     file : dbgheap.c line 1414
> >     Expression _CtrlIsValidHeapPointer(pUserData)
> >
> >     in the logs :
> >     An unhandled exception of type ' System.TypeInitializationException'
> >     occurred in Unknown Module.
> >
> >     I don't know what I am doing wrong, without the include I can run
> the
> >     application correctly
> >     So it's probably just a visual/configuration problem
> >     Please If someone could give us a few steps in the right
> direction...
> >
> > you cae use debug mode in IDE , copy the call stack when unhandled
> > exception .
> > and send to maillist again. ;)
> > btw,are you Specify runtime library for linking ? eg . /MDd in debug
> > configuration
> > good luck.
> > jinti
>
>
> --
> Julien Saito
> ¥¸¥å¥ê¥¢¥ó ýSÌÙ
> julien at aplix.co.jp
>
>
> _______________________________________________
> resiprocate-devel mailing list
> resiprocate-devel at list.sipfoundry.org
> https://list.sipfoundry.org/mailman/listinfo/resiprocate-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.resiprocate.org/pipermail/resiprocate-devel/attachments/20060621/87e995c5/attachment.htm>


More information about the resiprocate-devel mailing list