I have sầu a client/VPS app which I have been developing on a single PC. Now it needs two serial ports, so I borrowed a PC from a frikết thúc.

You watching:

When I build my ứng dụng và try khổng lồ run or debug it (whether in the Delphi IDE or from Windows File manager), it errors "The application was unable lớn start correctly (0xc000007b)".

Googling doesn"t bring up much, but seems khổng lồ indicate that this is nothing Delphi specific và happens with other apps. It seems khổng lồ be caused by calling inkhổng lồ a 32 bit DLL from a 64 bit tiện ích or vice versa.

both PCs are Windows 7, 64 bitboth have sầu Delphi Xe2 starter edition which can only handle 32 bitsThe phầm mềm runs fine on my PC, but not on my friend"sOther Delphi apps run just fine on both PCs

Can anyone give me a hint as to lớn how to lớn track this down?

windows delphi 64-bit
edited Dec 8 "16 at 11:05
Mawg says reinstate Monica
asked May 8 "12 at 3:08

Mawg says reinstate MonicaMawg says reinstate Monica
35.3k9292 gold badges284284 silver badges513513 bronze badges
| Show 2 more comments

19 Answers 19

Active Oldest Votes
To start, I would suggest khổng lồ kiểm tra whether there is a problem between your application and its dependencies using dependency walker

answered May 8 "12 at 5:38

5,76422 gold badges20trăng tròn silver badges3232 bronze badges
| Show 4 more comments
A load time dependency could not be resolved. The easiest way khổng lồ debug this is khổng lồ use Dependency Walker. Use the Profile option lớn get diagnostics output of the load process. This will identify the point of failure và should guide you khổng lồ a solution.

The most common cause of this error is trying to lớn load a 64 bit DLL into a 32 bit process, or vice versa.

edited May 8 "12 at 8:06
answered May 8 "12 at 7:09

David HeffernanDavid Heffernan
575k4040 gold badges981981 silver badges13971397 bronze badges
Add a phản hồi |
It is a missing dll.Possibly, your dll that works with com ports have sầu an unresolved dll dependence. You can use dependency walker and windows debugger. Chechồng all of the mfc library, for example. Also, you can use nrCommlib - it is great components to work with com ports.

answered May 8 "12 at 11:58

12122 bronze badges
Add a comment |
I tried all the things specified here & found yet another answer. I had lớn compile my application with 32-bit DLLs. I had built the libraries both in 32-bit và 64-bit but had my PATH set to 64-bit libraries. After I recompiled my application (with a number of changes in my code as well) I got this dreaded error và struggled for two days. Finally, after trying a number of other things, I changed my PATH lớn have sầu the 32-bit DLLs before the 64-bit DLLs (they have the same names). And it worked. I am just adding it here for completeness.

answered Jul 29 "14 at 17:23

7,63622 gold badges2323 silver badges3636 bronze badges
Add a comment |
It has been mentioned in earlier answers that using dependency walker is the way to go, in my case (my application keeps failing with the error code), dependency walker showed a few dll that are NOT relevant!

Finally figured out that I can run profiling by going khổng lồ "profile" thực đơn & it will run the application và stop at the exact dll that"s cause the problem! I found out a 32bit dll was picked because of path và fixed it.


answered Jul 25 "16 at 20:10
1,00711 gold badge1414 silver badges3131 bronze badges
Add a bình luận |
I experienced the same problem developing a client-VPS tiện ích using Microsoft Visual Studio 2012.

If you used Visual Studio khổng lồ develop the phầm mềm, you must make sure the new (i.e. the computer that the software was not developed on) has the appropriate Microsoft Visual C++ Redistributable Package. By appropriate, you need the right year và bit version (i.e. x86 for 32 bit và x64 for 64 bit) of the Visual C++ Redistributable Package.

See more: Hướng Dẫn Cách Restore Iphone Có Bị Mất Dữ Liệu Không Và, Restore Lại Máy Có Bị Mất Giữ Liệu Không Ah

The Visual C++ Redistributable Packages install run-time components that are required to run C++ applications built using Visual Studio.

Here is a links to lớn the Visual C++ Redistributable for Visual Studio 2015 .

You can check what versions are installed by going to Control Panel -> Programs -> Programs và Features.

Here"s how I got this error & fixed it:

1) I developed a 32 bit application using Visual Studio 2012 on my computer. Let"s call my computer ComputerA.

2) I installed the .exe pháo and the related files on a different computer we"ll Gọi ComputerB.

3) On ComputerB, I ran the .exe cộ and got the error message.

4) On ComputerB, I looked at the Programs & Features và didn"t see Visual C++ 2012 Redistributable (x64).

5) On ComputerB, I googled for Visual C++ 2012 Redistributable and selected and installed the x64 version.

See more: Hãy Trình Bày Diễn Biến Cuộc Kháng Chiến Chống Tống Thời Tiền Lê Hoàn Chỉ Huy?

6) On ComputerB, I ran the .exe pháo on ComputerB and did not receive the error message.

Chuyên mục: Tổng hợp