Ошибка lnk1104 не удается открыть файл msmpi lib

answered Aug 6, 2012 at 13:23

Fei's user avatar

FeiFei

1211 silver badge5 bronze badges

0

Solved ((fatal error LNK1181: cannot open input file ‘msmpi.lib’))
This Error is due to:

1.Erasure Some «Abaqus 6.14» File When we instal «Visual Studio 2010».

2.During installation «Visual Studio 2010» Prerequisite Windows software don’t Work Corectly.

Solution:

  1. Unistal All «Visual Studio 2010″,»Intel Parallel Studio XE 2013» and «Abaqus 6.14» file & Registry. (Use IObit Uninstaller)

  2. Unistal All Prerequisite Windows software for «Visual Studio 2010» to be instal Again by «Visual Studio Ultimate 2010».
    (Prerequisite software = Microsoft Visual C++ Runtime, Microsoft Silverlight & All other Visual Studio 2010 Old file)

  3. First Instal «Visual Studio Ultimate 2010» & «Intel Parallel Studio XE 2013» After Instal «Abaqus 6.14»

  4. To verify in Command prompt type: abaqus verify -user_std

  5. you get a PASS in the subroutine.
    («Visual Studio 2015» With «Intel Parallel Studio XE 2016» work in «Abaqus 6.14» and get a PASS in the subroutine too)

Good luck

Arash Rahgozar,
Graduat student in School of Civil Eng., College of Eng., University of Tehran

answered Jun 17, 2016 at 7:41

user6478170's user avatar

Fenlou

1 / 1 / 2

Регистрация: 11.03.2014

Сообщений: 483

1

19.10.2016, 18:37. Показов 8107. Ответов 5

Метки нет (Все метки)


Студворк — интернет-сервис помощи студентам

Здравствуйте, хочу реализовать простейшую программу вывода текста «HelloWorld», используя технологию параллельного программирования. В свойствах конфигурации указал путь каталога включения и каталог библиотек, а также компоновщик mpi.lib. Но при компилировании ошибка:

C++
1
Ошибка    1   error LNK1104: не удается открыть файл "mpi.lib"    c:UsersQWERTYdocumentsvisual studio 2010ProjectsHelloWorldHelloWorldLINK

вот код:

C++
1
2
3
4
5
6
7
8
9
10
11
12
13
#include <stdio.h>
#include <mpi.h>
 
int main (int argc, char* argv[])
{
    int rank=0, size=0;
    MPI_Init (&argc, &argv);
    MPI_Comm_rank (MPI_COMM_WORLD, &rank);
    MPI_Comm_size (MPI_COMM_WORLD, &size);
    printf( "Hello world from process %d of %dn", rank, size );
    MPI_Finalize();
    return 0;
}



0



3434 / 2813 / 1249

Регистрация: 29.01.2016

Сообщений: 9,426

19.10.2016, 19:12

2

Цитата
Сообщение от Fenlou
Посмотреть сообщение

В свойствах конфигурации указал путь каталога включения и каталог библиотек, а также компоновщик mpi.lib.

Компоновщику (Дополнительные каталоги библиотек) указал, где либа лежит?



1



1 / 1 / 2

Регистрация: 11.03.2014

Сообщений: 483

19.10.2016, 19:59

 [ТС]

3

Цитата
Сообщение от nd2
Посмотреть сообщение

Компоновщику (Дополнительные каталоги библиотек) указал, где либа лежит?

Нет, сейчас указал, все равно ошибка
вот путь к mpi.lib
C:Program FilesMicrosoft HPC Pack 2008 SDKInclude

Добавлено через 1 минуту
или C:Program FilesMicrosoft HPC Pack 2008 SDKLibi386



0



3434 / 2813 / 1249

Регистрация: 29.01.2016

Сообщений: 9,426

19.10.2016, 20:15

4

Цитата
Сообщение от Fenlou
Посмотреть сообщение

вот путь к mpi.lib
C:Program FilesMicrosoft HPC Pack 2008 SDKInclude

У тебя либы в папке Include?

Цитата
Сообщение от Fenlou
Посмотреть сообщение

или C:Program FilesMicrosoft HPC Pack 2008 SDKLibi386

Что значит «или»?

Добавлено через 40 секунд

Цитата
Сообщение от Fenlou
Посмотреть сообщение

Нет, сейчас указал,

И что указал? И там есть mpi.lib ?



1



1 / 1 / 2

Регистрация: 11.03.2014

Сообщений: 483

19.10.2016, 20:18

 [ТС]

5

Цитата
Сообщение от nd2
Посмотреть сообщение

И что указал? И там есть mpi.lib ?

нашел ошибку пишется так «msmpi.lib», но появилась другая
Ошибка 1 error LNK1123: сбой при преобразовании в COFF: файл недопустим или поврежден C:UsersqwertyDocumentsVisual Studio 2010ProjectsHelloWorldHelloWorldLINK



0



Решено ((фатальная ошибка LNK1181: невозможно открыть входной файл ‘msmpi.lib’))
Эта ошибка вызвана:

1.Erasure Некоторые файлы «Abaqus 6.14» Когда мы устанавливаем «Visual Studio 2010».

2.Установка установки «Visual Studio 2010». Необходимое условие. Программное обеспечение Windows не работает корректно.

Решение:

  • Unistal Все «Visual Studio 2010», «Intel Parallel Studio XE 2013» и «Abaqus 6.14» и реестр. (Используйте IObit Uninstaller)

  • Unistal All Prerequisite Программное обеспечение Windows для «Visual Studio 2010» для установки снова с помощью «Visual Studio Ultimate 2010».
    (Предварительное программное обеспечение = Microsoft Visual С++ Runtime, Microsoft Silverlight и все остальные старые файлы Visual Studio 2010)

  • Первый Instal «Visual Studio Ultimate 2010» и «Intel Parallel Studio XE 2013» после Instal «Abaqus 6.14»

  • Чтобы проверить в командной строке введите: abaqus verify -user_std

  • вы получите PASS в подпрограмме.
    ( «Visual Studio 2015» с «Intel Parallel Studio XE 2016» работают в «Abaqus 6.14» и также получают PASS в подпрограмме)

Удачи.

Араш Рагозар,
Студент-выпускник в Школе гражданского английского, Колледж английского языка, Тегеранский университет

Согласно техническому заданию, необходимо реализовать часть приложения на C++. Задействовал нужные WinAPI, запустил проект в режиме отладки, нашел несколько ошибок, которые исправил. Теперь пытаюсь заново откомпилировать, собрать и запустить проект, а в
ответ получаю: «Ошибка    1    error LNK1104: не удается открыть файл «C:UsersMaximysDocumentsVisual Studio 2010ProjectsWin32DebugWin32.exe»    C:UsersMaximysDocumentsVisual Studio 2010ProjectsWin32Win32LINK  
 Win32″. Читаю спецификацию и причины данной ошибки на MSDN(тут):

1)недостаточно памяти на диске — точно не то, т.к. на диске C еще около 50-70Гбайт;

2)файл не существует — тоже не то, файл Win32.exe лежит в нужной папке Debug;

3)При указании библиотек в диалоговом окне страниц свойств проекта имена библиотек следует разделять пробелами (а не запятыми) — сам ни одну библиотеку не подключал, так что снова не то;

4-5 пункт являются полным бредом по отношению к моей машине

6)Недостаточные файловые разрешения — снова не то — являюсь Администратором компьютера;

10)Файл мог быть открыт другой программой, и компоновщик не может вести запись в этот файл — открываем Диспетчер задач и смотрим, вдруг все формы проекта закрыли, а процесс не умер(у меня иногда такое с WPF-приложениями случается), хотя такого быть и не
должно, но нет — процессов с таким именем нет;

11)и т.д.

Т.е. никаких объективных причин для возникновения данной ошибки нет! Ладно, решил посмотреть что по этому поводу говорят на русскоязычных форумах — там вообще о таких ошибках не слышали; смотрю англоязычные — у одного человека еще год назад появилась такая
же проблема, он обратился на форум(адрес не вспомню), где ему дали сто двадцать два совета(народ тыкал пальцем в небо), которые так и не помогли(обычно англичане  пишут(пер. с анг.):»Спасибо тебе, помогло»(даже откройте англоязычный MSDN), а тут нет ни
слова).

Сам нашел всего одну, но коренную методику борьбы с данной проблемы — «Reboot»(Перезагрузка), но каждые 10-15 минут перезагружаться — Вы меня простите, тут никакого времени не хватит.

Как побороть данную ошибку и с чем она может быть в действительности связана?

P.S.У файла «Win32.exe» атрибут «Только для чтения» не установлен, если что

  • Изменено

    5 марта 2012 г. 10:56

I’ve created a new C++ project in Visual Studio 2008. No code has been written yet; Only project settings have been changed.

When I compile the project, I receive the following fatal error:

fatal error LNK1104: cannot open file ‘C:Program.obj’

asked Sep 25, 2008 at 14:29

Josh Sklare's user avatar

Josh SklareJosh Sklare

4,0043 gold badges23 silver badges17 bronze badges

This particular issue is caused by specifying a dependency to a lib file that had spaces in its path. The path needs to be surrounded by quotes for the project to compile correctly.

On the Configuration Properties -> Linker -> Input tab of the project’s properties, there is an Additional Dependencies property. This issue was fixed by adding the quotes. For example, changing this property from:

C:Program Filessofware
sdkliblibrary.lib

To:

«C:Program Filessofware
sdkliblibrary.lib»

where I added the quotes.

Amin Ya's user avatar

Amin Ya

1,4521 gold badge19 silver badges29 bronze badges

answered Sep 25, 2008 at 14:33

Josh Sklare's user avatar

Josh SklareJosh Sklare

4,0043 gold badges23 silver badges17 bronze badges

11

This can happen if the file is still running as well.

:-1: error: LNK1104: cannot open file ‘debug****.exe’

answered Aug 13, 2014 at 16:10

Carol's user avatar

CarolCarol

1,84326 silver badges29 bronze badges

5

The problem went away for me after closing and re-opening Visual Studio. Not sure why the problem happened, but that might be worth a shot.

This was on VS 2013 Ultimate, Windows 8.1.

answered Feb 4, 2015 at 17:07

Daniel Neel's user avatar

Daniel NeelDaniel Neel

1,18713 silver badges28 bronze badges

3

Check also that you don’t have this turned on: Configuration Properties -> C/C++ -> Preprocessor -> Preprocess to a File.

answered Dec 26, 2015 at 19:11

Assaf Levy's user avatar

Assaf LevyAssaf Levy

1,3121 gold badge12 silver badges20 bronze badges

2

My problem was a missing .lib extension, I was just linking against mylib and VS decided to look for mylib.obj.

answered Dec 22, 2015 at 9:51

Patrizio Bertoni's user avatar

I had the same problem.It caused by a «,» in the name of a folder of additional library path.It solved by changing the additional library path.

answered Sep 26, 2013 at 5:20

harsini's user avatar

harsiniharsini

3262 silver badges13 bronze badges

Solution 1 (for my case): restart windows Explorer process (yes, the windows file manager).

Solution 2:

  1. Close Visual Studio. Windows Logoff
  2. Logon, reopen Visual Studio
  3. Build as usual. It now builds and can access the problematic file.

I presume sometimes the file system or whoever is controlling it gets lost with its permissions. Before restarting the windows session, tried to kill zombie msbuild32.exe processes, restart visual studio, check none even showing the problem file on. No build configuration issues. It happens now and then. Some internal thing in Windows does not fix up, needs a restart.

answered Dec 30, 2016 at 9:27

Lissandro's user avatar

1

In my case it was a matter of a mis-directed reference. Project referenced the output of another project but the latter did not output the file where the former was looking for.

answered Aug 13, 2014 at 19:54

Newtopian's user avatar

NewtopianNewtopian

7,5034 gold badges48 silver badges71 bronze badges

I had the same problem, but solution for my case is not listed in answers.
My antivirus program (AVG) determined file MyProg.exe as a virus and put it into the ‘virus storehouse’. You need to check this storehouse and if file is there — then just restore it. It helped me out.

answered Jun 7, 2016 at 6:16

Nazarii Plebanskii's user avatar

1

I had the same error, just with a Nuget package i had installed (one that is not header only) and then tried to uninstall.
What was wrong for me was that i was still including a header for the package i just uninstalled in one of my .cpp files (pretty silly, yes).
I even removed the additional library directories link to it in Project -> Properties -> Linker -> General, but of course to no avail since i was still trying to reference the non-existent header.

Definitely a confusing error message in this case, since the header name was <boost/filesystem.hpp> but the error gave me "cannot open file 'llibboost_filesystem-vc140-mt-gd-1_59.lib'" and no line numbers or anything.

answered Jan 19, 2016 at 11:22

Matthias's user avatar

MatthiasMatthias

2,9802 gold badges22 silver badges38 bronze badges

in my case it was the path lenght (incl. file name).

..............SWXBinaryVS2008OutputWin32Debugboost_unit_test_framework-vc90-mt-gd-1_57.lib;

as for the release the path was (this has worked correctly):

..............SWXBinaryVS2008OutputWin32Releaseboost_unit_test_framework-vc90-mt-1_57.lib;

==> one char shorter.

  1. i have also verified this by renaming the lib file (using shorter name) and changing this in the

Linker -> input -> additoinal dependencies

  1. i have also verified this by adding absolut path instead of relative path as all those «..» has extended the path string, too. this has also worked.

so the problem for me was the total size of the path + filename string was too long!

answered Dec 8, 2020 at 9:09

Alfred Meier's user avatar

1

I had a similar problem. I solved it with the following command to kill the running task:

taskkill /f /im [nameOfExe]

/f: Forces the task to close.
/im: The next parameter is a image name aka executable name e.g. Program.exe.

answered Sep 13, 2021 at 11:44

Marci's user avatar

MarciMarci

3025 silver badges12 bronze badges

For an assembly project (ProjectName -> Build Dependencies -> Build Customizations -> masm (selected)), setting Generate Preprocessed Source Listing to True caused the problem for me too, clearing the setting fixed it. VS2013 here.

answered Nov 16, 2014 at 0:26

MadeOfAir's user avatar

MadeOfAirMadeOfAir

2,9335 gold badges31 silver badges39 bronze badges

I run into the same problem with linker complaining about the main executable missing. This happened during our solution port to the new Visual Studio 2013. The solution is a varied mix of managed and un-managed projects/code. The problem (and fix) ended up being a missing app.config file in the solution folder. Took a day to figure this one out :(, as output log was not very helpful.

answered Dec 4, 2014 at 21:58

Nicko Po's user avatar

Nicko PoNicko Po

7275 silver badges21 bronze badges

I checked all my settings according to this list: http://msdn.microsoft.com/en-us/library/ts7eyw4s.aspx#feedback . It is helpful to me and for my situation, I find out that Link Dependency of projects’ properties has double-quote, which should not be there.

answered Dec 19, 2014 at 16:07

David's user avatar

DavidDavid

1,64617 silver badges22 bronze badges

I’m answering because I don’t see this particular solution listed by anyone else.

Apparently my antivirus (Ad-Aware) was flagging a DLL one of my projects depends on, and deleting it. Even after excluding the directory where the DLL lives, the same behaviour continued until I restarted my computer.

answered Nov 23, 2015 at 1:13

easuter's user avatar

easutereasuter

1,16714 silver badges20 bronze badges

In my case, I had replaced math library files from a previous Game Engine Graphics course with GLM. The problem was that I didn’t add them to the project within Visual Studio’s Solution Explorer (even though they were in the project repository).

answered Feb 4, 2017 at 23:51

Artorias2718's user avatar

I had this issue in conjunction with the LNK2038 error, followed this post to segregate the RELEASE and the DEBUG DLLs. In this process I had cleaned up the whole folder where these dependencies were residing.

Luckily I had a backup of all these files, and got the file for which this error was throwing back into the DEBUG folder to resolve the issue. The error code was misleading in some way as I had to spend a lot of time to come to this tip from one of the answers from this post again.

Hope this answer, helps someone in need.

Community's user avatar

answered Feb 7, 2017 at 4:56

N00b Pr0grammer's user avatar

N00b Pr0grammerN00b Pr0grammer

4,4555 gold badges31 silver badges46 bronze badges

I solved it by adding an existing project to my solution, which I forgot to add in the first time.

answered May 31, 2017 at 18:20

Markus Weber's user avatar

Markus WeberMarkus Weber

1,04911 silver badges24 bronze badges

I had the same error:

fatal error LNK1104: cannot open file 'GTest.lib;'

This was caused by the ; at the end. If you have multiple libraries, they should be separated by empty space (spacebar), no comma or semi-colons!

So don’t use ; or any anything else when listing libraries in Project properties >> Configuration Properties >> Linker >> Input

answered Oct 25, 2017 at 18:31

zar's user avatar

zarzar

11.2k13 gold badges93 silver badges176 bronze badges

I tried above solution but didnt work for me.
So i rename the exe and rebuild the solution.
It works for me.

answered Nov 20, 2019 at 6:20

user3500315's user avatar

I had this exact error when building a VC++ DLL in Visual Studio 2019:

LNK1104: cannot open file ‘C:Program.obj’

Turned out under project Properties > Linker > Input > Module Definition File, I had specified a def file that had an unmatched double-quote at the end of the filename. Deleting the unmatched double quote resolved the issue.

answered Dec 12, 2019 at 22:14

MikeOnline's user avatar

MikeOnlineMikeOnline

95411 silver badges18 bronze badges

Killed msbuild32.exe and built again. It worked for me.

answered Jul 16, 2020 at 11:09

Imad's user avatar

ImadImad

7,09211 gold badges54 silver badges110 bronze badges

My issue was caused by other application using the .dll file I was trying to debug.

Closing the application that was using the .dll solved it for me.

answered Sep 13, 2020 at 1:32

NAGA's user avatar

NAGANAGA

133 bronze badges

Possible solutions:

  1. Check if path contain any white spaces, Go to Properties > Linker > Input > additional path and include «path with white space»

  2. If program are still running, close everything and restart.

  3. Check if .obj file is not created. This happens when you directly build a project while Properties > C++ > Preprocessor > Generate preprocessor file is on. Turn it off and build the project then you can onn Properties > C++ > Preprocessor > Generate preprocessor file.

answered May 30, 2021 at 19:09

Faizanur Rahman's user avatar

I hit the same problem with «Visual Studio 2013».

LNK1104: cannot open file 'debug****.exe

It resolved after closing and re-starting Visual studio.

answered Nov 14, 2018 at 5:25

user3860869's user avatar

user3860869user3860869

1211 gold badge1 silver badge6 bronze badges

I was having the same problem , I have just copied the code to new project and started the build .
Some other error started coming.
error C4996: ‘fopen’: This function or variable may be unsafe. Consider using fopen_s instead

To solve this problem again, I have added my one property in the Project project as below.
Project -> Properties -> Configuration property -> c/c++ .
In this category there is field name Preprocessor Definitions
I have added _CRT_SECURE_NO_WARNINGS this to solve the problem
Hope it will help …

Thank You

answered Sep 14, 2017 at 10:19

Sunil's user avatar

SunilSunil

31 bronze badge

2

Понравилась статья? Поделить с друзьями:
  • Ошибка lnk1104 не удается открыть файл kernel32 lib
  • Ошибка lnk1104 не удается открыть файл glut32 lib
  • Ошибка l20 в стиральной машине
  • Ошибка lnk1104 не удается открыть файл exe
  • Ошибка l1c63x64 sys windows 10