Solved

C Run-Time Error R6034

Posted on 2007-04-02
11
2,203 Views
Last Modified: 2012-06-27
Hello,

Im trying to make a C++ project that was created and runs perfectly in VS2003 work in VS2005.

Any idea how I can fix this?

Thanks.
0
Comment
Question by:Gsteingr
  • 4
  • 4
  • 2
  • +1
11 Comments
 
LVL 19

Expert Comment

by:mrwad99
ID: 18836394
One of the big differences in 2005 is that you have to use Manifest files.  This error is described and resolved at http://msdn2.microsoft.com/en-us/library/ms235560.aspx.

HTH
0
 
LVL 86

Expert Comment

by:jkr
ID: 18836717
Actually, VS2005 will turn on manifest generation for converted solutions by default. Any chance you are using a 3rd party module where that does not apply?
0
 

Author Comment

by:Gsteingr
ID: 18838044
Hi again just to give you more information.
I have been trying to run this project in /MD and /MT, in the VS2003 it was /MD.
I tried it in /MTand then after many including and exluding it finally worked but the minute the application starts i got that C Run-Time Error R6034 popup window.

So then I ended up doing it in /MD again, now I get these errors (I use another library too, which i compile everytime with the same settings as i change the projects, im also using c)
These are the errors with /MD:

1) 1>DecodeAsterixCat021.lib(Cat021Interface.obj) : error LNK2001: unresolved external symbol __imp__memmove_s

2) 1>DataReader.obj : error LNK2001: unresolved external symbol __imp__memmove_s

3) 1>Plot.obj : error LNK2001: unresolved external symbol __imp__memmove_s

4)  1>adxconfig.obj : error LNK2019: unresolved external symbol __imp__printf referenced in function "public: int __thiscall ADXConfig::readSettings(class QString const &)" (?readSettings@ADXConfig@@QAEHABVQString@@@Z)


looks like i need to include other libraries???
Thank you so much in advance.
0
 
LVL 86

Expert Comment

by:jkr
ID: 18838140
When building with /MD, your code will be linked with msvcrt.lib and this one should contain these functions. Make sure though that your LIB environment variable does not contain paths with older versions of that library.
0
 

Author Comment

by:Gsteingr
ID: 18839654
I was excluding msvcrt.lib and including libcmt.lib when doing /MD...
so now i removed those exclude and include in /MD and build again
Now I get 0 errors and:
MSVCRT.lib(cinitexe.obj) : warning LNK4098: defaultlib 'libcmt.lib' conflicts with use of other libs; use /NODEFAULTLIB:library
1>Embedding manifest...


But when the application window starts then:
'adx.exe': Loaded 'C:\WINDOWS\system32\xpsp2res.dll', Binary was not built with debug information.
HEAP[adx.exe]: Invalid Address specified to RtlFreeHeap( 00BA0000, 0178BC60 )
Windows has triggered a breakpoint in adx.exe.
This may be due to a corruption of the heap, and indicates a bug in adx.exe or any of the DLLs it has loaded.

Any Idea? thank you all.
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 86

Accepted Solution

by:
jkr earned 500 total points
ID: 18839680
>>warning LNK4098: defaultlib 'libcmt.lib'

Remove that lib from your settings, it is not needed with /MD anyway.

>>HEAP[adx.exe]: Invalid Address specified to RtlFreeHeap( 00BA0000,
>>0178BC60 )

Make sure to revuild all modules in your project using the same CRT settings (that is /MD)
0
 

Author Comment

by:Gsteingr
ID: 18840150
hi jkr, i did the same things you said above...

but i still get the same problem.
0
 
LVL 86

Expert Comment

by:jkr
ID: 18840737
When debugging that, what call is ftrying to free memory and where and how was that memory allocated?
0
 
LVL 39

Expert Comment

by:itsmeandnobodyelse
ID: 18841790
Put the libcmt into the 'ignore libraries'. You need to get rid of the standard runtime libraries in the main project and all other dll projects. VS 2005 uses a runtime library which is *not* compatible with the lib you used, e. g. for the memmove_s function which is proprietary to VS. The heap error most likely occurs cause you try to delete memory that was allocated by a different heap management in another dll. All apps and dlls need to have the same (multi-threaded) model in C++ code generation. Delete precompiled header files (explicitly).

Regards, Alex
0
 
LVL 39

Expert Comment

by:itsmeandnobodyelse
ID: 18841801
As a last resort, you might move your project directories to a different location and create *all* projects from scratch using the old names and locations. Make sure that include and library paths of VS 2003 were *not* be used when building the VS 2005 projects.

0
 

Author Comment

by:Gsteingr
ID: 18842015
oh i rebuilt the other dlls again, they might have been old builds, the Qt was an old build i forgot about. then it worked. thanx all :)
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Article by: SunnyDark
This article's goal is to present you with an easy to use XML wrapper for C++ and also present some interesting techniques that you might use with MS C++. The reason I built this class is to ease the pain of using XML files with C++, since there is…
Preface I don't like visual development tools that are supposed to write a program for me. Even if it is Xcode and I can use Interface Builder. Yes, it is a perfect tool and has helped me a lot, mainly, in the beginning, when my programs were small…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now