Codeblocks ошибка при компиляции

Topic: C::B Unable to start (0xc000007b) on win64/MinGW64 GCC 4.5.0  (Read 38020 times)

Just as the title says, I built the wxMSW 2.8.10 and 2.9.0 and C::B on both of them successfully (with minor hacks in C::B srcs, mainly for the 64-bit pointers),
but then I got a «0xc000007b» error while tried running codeblocks.exe, like this.

I found sth. on the M$ Technet and knews that it means «The application or DLL is not a valid Windows image».

And one of my friends, Thynson, an professional GCC player, says that «There’s something wrong with the ld in GNU binutils, attach ‘—enable-auto-image-base’ flag on the ld may do», I’ve tried, but it didn’t works.

He said that «you may try to del all the resources and recompile it». I created a tiny dummy project and built like this, IT WORKS.

So I guess that the Original Correct Image Base was ruined by the «.rsrc» segment (but I can do nothing to verify it, my PEiD can’t recognize the PE32+ format), so maybe we can solve this problem by re-permutation the segments (of course some automated tools Eg. ld || dlltools is better)?

BTW, the C::B SVN 6272 x86 by MinGW GCC 4.5.0(built by Thynson) works fine on my machine. I created a bundle and pasted it on the web, you can have a try if you want.
http://a.md/cb

Wating for reply online… Thx.


Logged


Did you make sure that your manifest file contains the line

processorArchitecture="amd64"

instead of the usual 32-bit

processorArchitecture="x86"

If you specify the wrong processor architecture, windows will load the wrong version of comctl32.dll (if I remember correctly) and you’ll get exactly the error you reported. You can check with dependency walker what dll’s are loaded by your application.

Hope that helps…


Logged



Logged

(most of the time I ignore long posts)
[strangers don’t send me private messages, I’ll ignore them; post a topic in the forum, but first read the rules!]


Actually I am not sure but just tell him to try ‘—enable-auto-image-base’. Now the problem is clear, the CodeBlocks use a manifest for x86 other than x64. I have replaced the manifest file ‘wx/include/wx/msw/wx.manifest’ with amd64.manifest. And we have began the process of build. Waiting for our good news, plz. :D

« Last Edit: May 28, 2010, 04:17:46 pm by thynson »


Logged


Well, a good news and a bad news.

The lastest C::B (SVN 6284) was build SUCCESSFULLY

BUT the startup.script doesn’t work correctly.

It gave me a «Push(): could not create INSTANCE copy (check registration name)».
Following the both startup.script and this error message, I found:
1. this problem occurs when running the script «GetScriptingManager().RegisterScriptMenu()»
2. there’s sth. wrong in sqplus. but when I got into, I encontered a macro.

#define DECLARE_INSTANCE_TYPE_NAME_(TYPE,NAME) namespace SqPlus { \
  inline const SQChar * GetTypeName(const TYPE & n) { return sqT(#NAME); } \
  inline void Push(HSQUIRRELVM v,TYPE * value) { \
...

I can’t determine the TYPE rapidly, so I go to you for help.
Are there any readymade solutions, or I have to work out with it?

Thx.


Logged


Have you read the thread I’ve shown you? There Biplap has a patch for the scripting, have you tried it?


Logged

(most of the time I ignore long posts)
[strangers don’t send me private messages, I’ll ignore them; post a topic in the forum, but first read the rules!]


The patch is not enough. The patch is just for svn 5XXX(sorry I forgot). After applying it, there is still many bad cast from pointer to interger. And particulary much of them was found in the SQplus library.


Logged


The patch is not enough. The patch is just for svn 5XXX(sorry I forgot). After applying it, there is still many bad cast from pointer to interger. And particulary much of them was found in the SQplus library.

Well that patch is enough to compile code::blocks successfully. I had also uploaded compiled binary for others to try out. I believe you didn’t even give it a try.

I have also pointed out remaining issues (mostly runtime issues) in the same thread. Anyway I’m attaching a new patch made against trunk. Do note that — you need WPG-System64 1.99-1 to compile and run it. If you use Mingw-w64 compilers you’ll be able to compile; however the resulting binary won’t run.

[attachment deleted by admin]


Logged

Be a part of the solution, not a part of the problem.


Be calmed, plz. I tried. I’m using MinGW-W64 GCC 4.5.0 to compile Code::Blocks x64. The patch from you tyeken8 and me have applied. But there are still some compile errors. To prove this, here is our patch.
Debating about this is meaningless. But the most important is not that the CodeBlocks x64 version couldn’t be built, but how it ran failed. Actually we’ve successfully built it and  have ran it, through it doesn’t run properly, as Tydus descript above. We have found it’s a call failed in SQplus.

[attachment deleted by admin]

« Last Edit: May 29, 2010, 06:11:05 pm by thynson »


Logged


Be calmed, plz. I tried. I’m using MinGW-W64 GCC 4.5.0 to compile Code::Blocks x64. The patch from you tyeken8 and me have applied. But there are still some compile errors. To prove this, here is our patch.
Debating about this is meaningless. But the most important is not that the CodeBlocks x64 version couldn’t be built, but how it ran failed. Actually we’ve successfully built it and  have ran it, through it doesn’t run properly, as Tydus descript above. We have found it’s a call failed in SQplus.

Thanks for the patch! I recently rewrote a portion of SqPlus patch to avoid the use of data type

INT

and

BOOL

. Reason is to avoid conflict with pre-defined types. I also see you have added necessary code in

crashhandler.cpp

file. I’ll apply it to my local repo.

Coming back to your runtime issue, I had uploaded a compiled binary at the following post.

http://forums.codeblocks.org/index.php/topic,11567.msg80360.html#msg80360

The problem you are highlighting is not present in my build. You can give it a try.

However if you use my build I’d suggest you disable Code-Completion plugin and you may need to kill it from Task Manager after you exit. I’ll upload a new build based on latest svn code tomorrow.


Logged

Be a part of the solution, not a part of the problem.


 :DThat’s good. I will have a try.


Logged


Be calmed, plz. I tried. I’m using MinGW-W64 GCC 4.5.0 to compile Code::Blocks x64. The patch from you tyeken8 and me have applied. But there are still some compile errors. To prove this, here is our patch.
Debating about this is meaningless. But the most important is not that the CodeBlocks x64 version couldn’t be built, but how it ran failed. Actually we’ve successfully built it and  have ran it, through it doesn’t run properly, as Tydus descript above. We have found it’s a call failed in SQplus.

Well, the patch can only result in a successfully build in GCC, there’re too many implicit bad casts from pointer to long(int), they don’t cause compile errors, but they will cause some runtime errors while handling memorys larger than 4GB.


Logged


Well, the patch can only result in a successfully build in GCC, there’re too many implicit bad casts from pointer to long(int), they don’t cause compile errors, but they will cause some runtime errors while handling memorys larger than 4GB.

I found many of them belong to wx itself. Hope they fix it in next release.


Logged

Be a part of the solution, not a part of the problem.


Do note that — you need WPG-System64 1.99-1 to compile and run it.

FYI: WPG-System64 is an MSys setup not just a MinGW GCC in case anyone other than me wandered about the size 300MB zipped.

Tim S.


Logged

C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.

When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org


I have uploaded a new test build. You can download it from the following url.

http://www.box.net/shared/tl6o3tejxv

It’s compiled based on the patch, to trunk, I uploaded few posts earlier. There are several known issues with this build. You may read about them from the original 64 bit thread.


Logged

Be a part of the solution, not a part of the problem.


Я уже некоторое время использую Code::Blocks, и он отлично работал. Недавно я переустановил Windows 10, и мне пришлось загрузить все свои программы. Я загрузил Google Chrome, игры и т. Д. Когда я пошел загружать Code::blocks, все работало как обычно, но когда я открыл проект, над которым работал (до переустановки), и щелкнул build and run, я получил эту ошибку:

Программа не может запуститься, потому что на вашем компьютере отсутствует libgcc_s_dw2-1.dll. Попробуйте переустановить программу, чтобы решить эту проблему.

Я решил сделать то, что написано в ошибке, и переустановить Code::Blocks. Но после того, как я это сделал, у меня осталась та же проблема. Я даже переустановил его еще раз, прежде чем искать другое решение. Я прочитал здесь сообщение о Stackoverflow, и в ответе говорилось, что нужно скопировать отсутствующий файл dll в папку bin компилятора. Все еще та же проблема. На YouTube было видео какого-то парня, который скачал MinGW и скопировал его в c:\Program Files\CodeBlocks. Я сделал это, но это не помогло. Теперь я решил загрузить недостающий файл и вручную поместить его в корзину MinGW. Когда я сделал это и нажал «Создать и запустить в C::B», я получил другую ошибку! Он сказал это:

Приложение не смогло запуститься правильно (0xc000007b). Щелкните ОК, чтобы закрыть приложение.

Я искал 0xc000007b в Google, и там был список вещей, которые нужно сделать, чтобы исправить это, и я попытался сделать некоторые из них, но ни одно из них не сработало.

Кто-нибудь знает, как исправить эту ошибку? Я также задавал этот вопрос на форуме Code::blocks, поэтому у меня больше шансов получить ответ. Было бы очень хорошо, если бы кто-нибудь знал решение

Я установил Code :: Blocks 13.12, а затем изменил компилятор на mingw-w64

это настройка по умолчанию

до

после изменения

после

Я скомпилировал очень простую программу hellow world, она не использует никакой библиотеки, поэтому она не должна смешивать 32-битную и 64-битную библиотеку

#include <iostream>

using namespace std;

int main()
{
cout << "Hello world!" << endl;
system("pause");
return 0;
}

Но я получил ошибку 0xc00007b, когда я дважды щелкнул по exe (Windows 8.1)

Если я запускаю его в code :: blocks, это не проблема

Если дважды щелкнуть по нему в Windows7, это тоже не проблема

Если я использую TDM-GCC-64 для компиляции программы, она может без проблем работать в Windows 7, 8.1 и Code :: Blocks.

Как настроить Code :: Blocks для решения этой проблемы?

1

Решение

Задача ещё не решена.

Другие решения

Ошибка 0xc000007b WindowsЕсли при запуске программы или игры компьютер с Windows 10, 8 или Windows 7 пишет «Ошибка при запуске приложения (0xc000007b). Для выхода из приложения нажмите кнопку ОК», то в этой статье вы найдете информацию о том, как убрать эту ошибку с тем, чтобы программы запускались как раньше и сообщение об ошибке не появлялось.

Почему появляется ошибка 0xc000007b в Windows 7 и Windows 8

Ошибка с кодом 0xc000007 при запуске программ говорит о том, что существует проблема с системными файлами Вашей операционной системы, в нашем случае. Более конкретно — данный код ошибки означает INVALID_IMAGE_FORMAT.

Самая частая причина появления ошибки при запуске приложения 0xc000007b — проблемы с драйверами NVidia, хотя и другие видеокарты тоже подвержены этому. Вообще, причины могут быть самые разные — прерванная установка обновлений или самой ОС, неправильное выключение компьютера или удаление программ напрямую из папки, без использования специальной утилиты для этого (Программы и компоненты). Кроме этого, это может быть следствием работы вирусов или какого-либо еще вредоносного программного обеспечения.

И, наконец, еще одна возможная причина — проблемы с самим приложением, что очень часто встречается, если ошибка проявляет себя в скаченной из Интернета игре.

Как исправить ошибку 0xc000007b

Первое действие, которое я бы рекомендовал, прежде чем приступать к любым другим — обновить драйвера для вашей видеокарты, особенно если это NVidia. Зайдите на официальный сайт производителя вашего компьютера или ноутбука или просто на сайт nvidia.com и найдите драйвера для вашей видеокарты. Загрузите их, установите и перезагрузите компьютер. Очень вероятно, что ошибка исчезнет.

Скачать драйвера Nvidia

Скачать драйвера на официальном сайте NVidia

Второе. Если вышеописанное не помогло, переустановите DirectX с официального сайта Microsoft — это тоже может позволить исправить ошибку при инициализации приложения 0xc000007b.

Microsoft DirectX

DirectX на официальном сайте Microsoft

Если ошибка появляется только при запуске одной программы и, при этом, она не является легальной версией, я бы рекомендовал использовать другой источник получения этой программы. Легальный, по возможности.

Третье. Еще одна возможная причина появления данной ошибки — поврежденные или отсутствующие Net Framework или Microsoft Visual C++ Redistributable. Если что-то не так с этими библиотеками, может появляться как и описанная здесь ошибка, так и многие другие. Скачать эти библиотеки можно бесплатн с официального сайта Microsoft — просто введите названия, указанные выше в любую поисковую систему и убедитесь, что переходите на официальный сайт.

Библиотеки Visual C++

Четвертое. Попробуйте запустить командную строку от имени администратора и ввести следующую команду:

sfc /scannow

В течение 5-10 минут эта системная утилита Windows проверит наличие ошибок в файлах операционной системы и попробует их исправить. Есть вероятность того, что проблема будет решена.

Предпоследнее. Следующий возможный вариант действий — произвести откат системы до более раннего состояния, когда ошибка еще не проявляла себя. Если сообщение о 0xc000007b стало появляться после того, как вы установили обновления Windows или драйверов, то зайдите в панель управления Windows, выберите пункт «Восстановление», запустите восстановление, после чего отметьте галочкой «Показать другие точки восстановления» и запустите процесс, приведя компьютер к тому состоянию, когда ошибка себя еще не проявляла.

Восстановление системы Windows

Восстановление системы Windows

Последнее. С учетом того, что у многих наших пользователей на компьютере установлены так называемые «сборки» Windows, то причина может крыться в ней самой. Переустановите Windows на другую, лучше оригинальную, версию.

Дополнительно: в комментариях сообщили, что сторонний пакет библиотек All In One Runtimes также может помочь в решении проблемы (если кто-то попробует, прошу отписаться о результате), о том, где его скачать подробно в статье: Как скачать распространяемые компоненты Visual C++

Надеюсь, данная инструкция поможет Вам убрать ошибку 0xc000007b при инициализации приложения.

Я поместил изображение для загрузки в разные подходящие каталоги и проверил. Моя система 64-битная, window8.1 и кодовый блок 17.12. Что может быть причиной и решением для этого?

1 ответ

Это была проблема не из-за каких-либо проблем с кодом, но я использовал 32-битный codeblck и файл SDL_image.dll 64-битной системы. Это было основной причиной, а также некоторые другие файлы .dll, относящиеся к SDL_image.h, отсутствовали, что не было причиной появления этого приглашения, но повлияло немного другим образом.


0

Nabeel Perwaiz
21 Янв 2018 в 15:21

Понравилась статья? Поделить с друзьями:

Интересное по теме:

  • Codeblocks выдает ошибку при запуске
  • Codsp exe выскакивает ошибка как устранить
  • Codeblocks undefined reference to ошибка
  • Codesys ошибка шины
  • Code leaf apex legends ошибка

  • 0 0 голоса
    Рейтинг статьи
    Подписаться
    Уведомить о
    guest

    0 комментариев
    Старые
    Новые Популярные
    Межтекстовые Отзывы
    Посмотреть все комментарии