I used both methods that i said earlier and both worked.
But to avoid having to set a variable inside the visual studio command
prompt and opening the project from there, at the end, i prefer to use the
CMake solution in
https://github.com/preillyme/hiphop-php/blob/master/CMake/VisualStudioToolset.cmake
You just have to put:
if ("${CMAKE_GENERATOR}" STREQUAL "Visual Studio 14 2015 Win64")
set(CMAKE_GENERATOR_TOOLSET
"v140</PlatformToolset><PreferredToolArchitecture>x64</PreferredToolArchitecture><PlatformToolset>v140"
)
endif()
before your *project* command. It will force the visual studio project to
use the x64 architecture. Note that this only works for the generator "Visual
Studio 14 2015 Win64". If you are using a different one you just have to
change the code accordingly.
Regards,
Túlio
Em sábado, 26 de novembro de 2016 14:52:49 UTC-2, Jason McIntosh escreveu:
>
> Hi Túlio,
>
> What exactly did you do in VisualStudio? Did you edit your project file
> outside of the IDE or did you make a change in your IDE or did you edit a
> Windows environment variable?
>
> Jason
>
>
> On Saturday, November 19, 2016 at 7:37:49 AM UTC-6, Tulio Ligneul wrote:
>>
>> Hi,
>>
>> I just would like to let you guys know that i have solved my problem.
>>
>> Previously, the linker was hanging when i tried to build an example and
>> didn't even give any error message. After a installed a more recent version
>> of visual studio community 2015, it started giving an error message saying
>> that it couldn't find deal_II.g.lib, even though the path was correct.
>> After some digging, i found out that VS was using the 32-bit toolset
>> targeting 64-bit.
>>
>> So, to make VS use the 64 toolset, one can set the environment variable
>> PreferredToolArchitecture to x64:
>>
>>
>> http://stackoverflow.com/questions/19820718/how-to-make-visual-studio-use-the-native-amd64-toolchain
>>
>> Or use a small hack-around in CMake:
>>
>>
>> https://github.com/preillyme/hiphop-php/blob/master/CMake/VisualStudioToolset.cmake
>>
>>
>> Regards,
>>
>> Túlio
>>
>>
>>
>>
>> Em quinta-feira, 28 de julho de 2016 14:03:07 UTC-3, Wolfgang Bangerth
>> escreveu:
>>>
>>> On 07/27/2016 08:05 PM, Tulio Ligneul wrote:
>>> > In my system, deal_II.lib is about 400MB and deal_II.g.lib is almost
>>> 2GB.
>>>
>>> How much memory/RAM do you have in your system? I would not be surprised
>>> if
>>> you needed 10GB to link a 2GB library. If you don't have that much, the
>>> operating system will start to swap out data and then it can take
>>> forever.
>>>
>>>
>>> > Maybe the issue is somehow related to these reports:
>>> >
>>> >
>>> https://connect.microsoft.com/VisualStudio/feedback/details/995447/linker-is-hanging-while-linking-some-project-in-debug-x64-configuration
>>>
>>> > <
>>> https://urldefense.proofpoint.com/v2/url?u=https-3A__connect.microsoft.com_VisualStudio_feedback_details_995447_linker-2Dis-2Dhanging-2Dwhile-2Dlinking-2Dsome-2Dproject-2Din-2Ddebug-2Dx64-2Dconfiguration&d=CwMFaQ&c=ODFT-G5SujMiGrKuoJJjVg&r=bn1clvQAiDQrfAC4yKbN0PlSr7RWRs-U3WJ0zRBB2qM&m=c_xwp0Rh13-GKNF7fVcUZoqlcZj2VZXblnm-2ZUnrhw&s=reRA7jaZJcHsEqlwnTZVrPH_wspoTOncSAPUu52tDiM&e=>
>>>
>>>
>>> >
>>> >
>>> https://www.gittprogram.com/question/1740272_x64-linker-hanging.html
>>> > <
>>> https://urldefense.proofpoint.com/v2/url?u=https-3A__www.gittprogram.com_question_1740272-5Fx64-2Dlinker-2Dhanging.html&d=CwMFaQ&c=ODFT-G5SujMiGrKuoJJjVg&r=bn1clvQAiDQrfAC4yKbN0PlSr7RWRs-U3WJ0zRBB2qM&m=c_xwp0Rh13-GKNF7fVcUZoqlcZj2VZXblnm-2ZUnrhw&s=qm7zUzMXCYYVlnMjutGub8L_miInfoGNbU39xKQQIXc&e=>
>>>
>>>
>>> >
>>> >
>>> http://stackoverflow.com/questions/23494142/ms-c-2012-linker-hangs-but-only-in-debug-mode-x64
>>>
>>> > <
>>> https://urldefense.proofpoint.com/v2/url?u=http-3A__stackoverflow.com_questions_23494142_ms-2Dc-2D2012-2Dlinker-2Dhangs-2Dbut-2Donly-2Din-2Ddebug-2Dmode-2Dx64&d=CwMFaQ&c=ODFT-G5SujMiGrKuoJJjVg&r=bn1clvQAiDQrfAC4yKbN0PlSr7RWRs-U3WJ0zRBB2qM&m=c_xwp0Rh13-GKNF7fVcUZoqlcZj2VZXblnm-2ZUnrhw&s=ht7u_cKJxrXj5gSPwhkpJq9p8ZVyUHqVV7k71iMZULM&e=>
>>>
>>>
>>>
>>> Hard to tell whether these are related.
>>>
>>>
>>> > I think i'll wait for the patch allowing to build deal.II as a dynamic
>>> > library. I usually develop in Ubuntu but i also need my program to
>>> run on
>>> > Windows. For now, compiling only in Release mode is good enough.
>>>
>>> OK, good to know that you have an alternative way to work.
>>>
>>> Best
>>> W.
>>>
>>>
>>> --
>>> ------------------------------------------------------------------------
>>> Wolfgang Bangerth email: [email protected]
>>> www:
>>> http://www.math.tamu.edu/~bangerth/
>>>
>>>
--
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see
https://groups.google.com/d/forum/dealii?hl=en
---
You received this message because you are subscribed to the Google Groups
"deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.