Hello Brian

On Monday, June 16, 2014 3:04:16 PM UTC-7, Cactus wrote:
>
> On 16/06/2014 22:36, Guillermo Ramírez wrote: 
> > Hello, 
> > 
> > I build MPIR under Visual Studio 2013 according to the instructions in 
> > section 2.4 of the MPIR manual Edition 2.7.0 (26 March 2014). The 
> > mpir/build.vc12/mpir-tests/run-tests.py tests were succesful but when I 
> > compiled one of the examples of the libDAI library I got this error: 
> > 
> > Error1error LNK1104: cannot open file 'mpir.lib' 
> > 
> > I build the dll libraries for my core2\x64 system and hence I included 
> > the following paths: 
> > 
> > ~\mpir-2.7.0\dll\x64\Debug under Configuration Properties | C/C++ | 
> > General | Additional Include Directories and 
> > ~\mpir-2.7.0\dll\x64\Debug\mpir.lib under Configuration Properties | 
> > Linker | Input | Additional Dependencies 
> > 
> > I followed the same process for the "lib" libraries (just in case these 
> > ones work) and for that case I used these paths 
> > 
> > ~\mpir-2.7.0\lib\x64\Debug under Configuration Properties | C/C++ | 
> > General | Additional Include Directories and 
> > ~\mpir-2.7.0\lib\x64\Debug\mpir.lib and 
> > ~\mpir-2.7.0\lib\x64\Debug\mpirxx.lib under Configuration Properties | 
> > Linker | Input | Additional Dependencies 
> > 
> > I also made sure to select the Debug option under visual studio. In any 
> > case (dll or lib libraries) I get the same error. Do you have any 
> > suggestions on how to approach this issue? 
>
> Can I ask where your Visual Studio project for the example is located 
> relative to the mpir-2.7.0 directory?  


The mpir-2.7.0 directory is C:\Users\Memo\Desktop\MPIR\mpir-2.7.0-alpha4, 
so the full path for the include files is 
C:\Users\Memo\Desktop\MPIR\mpir-2.7.0-alpha4\mpir-2.7.0\dll\x64\Debug.

The V.S. project is in a different 
directory: C:\Users\Memo\Documents\Visual Studio 2013\Projects\GBP\GBP2
 

> Also, can I assume that you have 
> double checked that mpir.lib actually exists in the directories you have 
> set above? 
>

That's right, the mpir.lib file does exists in the specified directory. 

>
> If so, one possibility is that you are using relative paths rather 
> absolute paths for these locations and your base path (against which the 
> relative paths are set) is not correct.   


I am using the full path, e. g: 
C:\Users\Memo\Desktop\MPIR\mpir-2.7.0-alpha4\mpir-2.7.0\dll\x64\Debug, 
sorry about the confusion (just did not include it in the previous post). 
 

> Unless you have changed it, 
> the base path for a Visual Studio project is the directory in which the 
> project file is located. 
>

No, I did not changed it. I believe it does not matter if I use full paths, 
right? 

>
> What I do in such situations is to use absolute paths rather than 
> relative paths for the library locations to get the build to compile and 
> then work out from these paths what the correct relative paths should 
> be. 


I believe using the full paths is the same, is that right?
 

> An alternative is to add the library to the example project in 
> Visual Studio using the 'Add' right click menu item for the project and 
> then 'Existing Item' to navigate to and add the library. 
>

I did not do this before. Now I did it, but I still get the same error 
message.

Thank you for all your answers Brian.

Guillermo.

-- 
You received this message because you are subscribed to the Google Groups 
"mpir-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mpir-devel+unsubscr...@googlegroups.com.
To post to this group, send email to mpir-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/mpir-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to