<HTML dir=ltr><HEAD><TITLE>Re: [Liblas-devel] readLas linking problem</TITLE>
<META content="text/html; charset=unicode" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.6001.18854"></HEAD>
<BODY>
<DIV dir=ltr id=idOWAReplyText52789>
<DIV dir=ltr><FONT color=#000000 size=2 face=Arial>I duplicated his problem. With Visual C++ 2005 Express the default Debug build has the R6034 problem. The release build is fine. This is with linking against liblas.lib in the binary distribution.</FONT></DIV>
<DIV dir=ltr><FONT size=2 face=Arial></FONT> </DIV>
<DIV dir=ltr><FONT size=2 face=Arial>If you turn off the "Manifest" in the build the debug version gets further but comes up with "The application failed to initialize properly (0xc0000142)).
<DIV dir=ltr><FONT size=2 face=Arial>It's in Project/Properties/Linker/Manifest File/Generate Manifest</FONT></DIV></FONT></DIV>
<DIV dir=ltr><FONT size=2 face=Arial></FONT> </DIV>
<DIV dir=ltr><FONT size=2 face=Arial>Clicking OK on that gives "Unhandled exception at 0x7d64c5be in LASReader.exe: 0XC0000142: DLL Initializaiton Failed"</FONT></DIV>
<DIV dir=ltr><FONT size=2 face=Arial></FONT> </DIV>
<DIV dir=ltr><FONT size=2 face=Arial></FONT> </DIV>
<DIV dir=ltr><FONT size=2 face=Arial>P.S. I've been using liblas with Code::Blocks with no problem. First time I've tried Visual C++ with it (or the C++ interface -- I've been using the C interface).</FONT></DIV>
<DIV dir=ltr><FONT size=2 face=Arial></FONT> </DIV>
<DIV dir=ltr><FONT size=2 face=Arial></FONT> </DIV>
<DIV dir=ltr><FONT size=2 face=Arial></FONT> </DIV>
<DIV dir=ltr><FONT size=2 face=Arial></FONT> </DIV>
<DIV dir=ltr><FONT color=#000000 size=2 face=Arial></FONT> </DIV></DIV>
<DIV dir=ltr id=idSignature58813>
<DIV><FONT color=#000000 size=2 face=Arial>Michael D. Black</FONT></DIV>
<DIV><FONT size=2 face=Arial>Senior Scientist</FONT></DIV>
<DIV><FONT size=2 face=Arial>Northrop Grumman Mission Systems</FONT></DIV>
<DIV> </DIV></DIV>
<DIV dir=ltr><BR>
<HR tabIndex=-1>
<FONT size=2 face=Tahoma><B>From:</B> liblas-devel-bounces@lists.osgeo.org on behalf of Mateusz Loskot<BR><B>Sent:</B> Sat 12/19/2009 6:18 AM<BR><B>To:</B> cristovao_jdc@sapo.pt<BR><B>Cc:</B> liblas-devel@lists.osgeo.org<BR><B>Subject:</B> Re: [Liblas-devel] readLas linking problem<BR></FONT><BR></DIV>
<DIV>
<P><FONT size=2>cristovao_jdc@sapo.pt pisze:<BR>> Hi Mateusz, thanks for your help,<BR>><BR>> I am using Microsoft Visual C++ 2008 Express Edition. I have already<BR>> done all of these steps:<BR>><BR>> -add liblas.lib as a additional library dependence;<BR><BR>OK<BR><BR>> -add msvcr80.dll and msvcrp80.dll to the Visual C++ bin folder<BR><BR>What do you do it for?<BR>It should not be necessary at all!<BR><BR>> Then I builded it, with the Visual C++ compiler(with no errors). But,<BR>> after that, when i tried to run it, i had a "Runtime Error R6034" -<BR>> "An application has made an attempt to load de C runtime library<BR>> incorrectly"<BR><BR>Do not manipulate any of C/C++ run-time libraries.<BR>Do not copy msvcr*dll anywhere.<BR>Rebuild, try to run again.<BR>If still not working, get free program called Dependency Walker<BR>(depends.exe, google will show you where it is available)<BR>and open your test program exe with depends.exe program and check<BR>if it reports any missing runtime libraries (DLL modules).<BR><BR>> I searched about this on the internet, and i found a connection with<BR>> the "manifests", but i can't solve the problem.<BR><BR>There is no need to touch manifest and copy C/C++ runtime libraries<BR>anywhere. If you build libLAS binary using NMAKE and makefile.vc files<BR>or Visual C++ projects, everything should be set correctly.<BR><BR><BR>p.s. Please, post your replies to liblas-devel mailing list too<BR>so others have chance to track the discussion.<BR><BR>Best regards,<BR>--<BR>Mateusz Loskot<BR><A href="http://mateusz.loskot.net/">http://mateusz.loskot.net</A><BR>_______________________________________________<BR>Liblas-devel mailing list<BR>Liblas-devel@lists.osgeo.org<BR><A href="http://lists.osgeo.org/mailman/listinfo/liblas-devel">http://lists.osgeo.org/mailman/listinfo/liblas-devel</A><BR></FONT></P></DIV></BODY></HTML>