[Liblas-devel] readLas linking problem

Black, Michael (IS) Michael.Black2 at ngc.com
Mon Dec 21 08:08:09 EST 2009


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.
 
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)).  
It's in Project/Properties/Linker/Manifest File/Generate Manifest
 
Clicking OK on that gives "Unhandled exception at 0x7d64c5be in LASReader.exe: 0XC0000142: DLL Initializaiton Failed"
 
 
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).
 
 
 
 
 
Michael D. Black
Senior Scientist
Northrop Grumman Mission Systems
 

________________________________

From: liblas-devel-bounces at lists.osgeo.org on behalf of Mateusz Loskot
Sent: Sat 12/19/2009 6:18 AM
To: cristovao_jdc at sapo.pt
Cc: liblas-devel at lists.osgeo.org
Subject: Re: [Liblas-devel] readLas linking problem



cristovao_jdc at sapo.pt pisze:
> Hi Mateusz, thanks for your help,
>
> I am using Microsoft Visual C++ 2008 Express Edition. I have already
>  done all of these steps:
>
> -add liblas.lib as a additional library dependence;

OK

> -add msvcr80.dll and msvcrp80.dll to the Visual C++ bin folder

What do you do it for?
It should not be necessary at all!

> Then I builded it, with the Visual C++ compiler(with no errors). But,
>  after that, when i tried to run it, i had a "Runtime Error R6034" -
> "An application has made an attempt to load de C runtime library
> incorrectly"

Do not manipulate any of C/C++ run-time libraries.
Do not copy msvcr*dll anywhere.
Rebuild, try to run again.
If still not working, get free program called Dependency Walker
(depends.exe, google will show you where it is available)
and open your test program exe with depends.exe program and check
if it reports any missing runtime libraries (DLL modules).

> I searched about this on the internet, and i found a connection with
> the "manifests", but i can't solve the problem.

There is no need to touch manifest and copy C/C++ runtime libraries
anywhere. If you build libLAS binary using NMAKE and makefile.vc files
or Visual C++ projects, everything should be set correctly.


p.s. Please, post your replies to liblas-devel mailing list too
so others have chance to track the discussion.

Best regards,
--
Mateusz Loskot
http://mateusz.loskot.net <http://mateusz.loskot.net/> 
_______________________________________________
Liblas-devel mailing list
Liblas-devel at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/liblas-devel


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/liblas-devel/attachments/20091221/b5a8158e/attachment.html


More information about the Liblas-devel mailing list