I'm trying to add Embree to an already working solution, following this resource I've added to my CMakeLists.txt file the following:
FIND_PACKAGE(embree 3.0 REQUIRED)
INCLUDE_DIRECTORIES(${EMBREE_INCLUDE_DIRS})
TARGET_LINK_LIBRARIES(application ${EMBREE_LIBRARY})
I've also created a Windows environment variable embree_DIR with my Embree installation folder ("C:\Program Files\Intel\Embree3 x64").
CMake configures the solution fine, but when I build I get a fatal error LNK1104: impossible to open 'embree3.lib'.
Just so you know, I actually have a C:\Program Files\Intel\Embree3 x64\lib\embree3.lib file.
Anyone has any clue why this might be happening?
Set EMBREE_ROOT_DIR e.g.:
set(EMBREE_ROOT_DIR "C:/thirdparty/vs2017/x64/embree-2.17.0")
Link to ${EMBREE_LIBRARIES}
target_link_libraries(YourApp
...
${EMBREE_LIBRARIES}
...
)
Related
I am looking for help on CATIA V5 R30 CAA help. I am getting the below error.
C:\Program Files\Dassault Systemes\B30.\BSFBuildtimeData\PublicInterfaces\CATIAV5Precompiled.h(47): fatal error C1083: Cannot open include file: 'wtypes.h': No such file or directory.
There are two reasons you are getting this error:
CAA RADE is not installed correctly. Try Check integrity from the Software Management. It will give any error if any RADE component is missing.
Missing some dependence missing from your machine. Try to build your CAA workspace using the tck batches. It will show any missing dependencies in step 3, 4 or 5:
cd "Target WS"
call "TCK_INIT.BAT" - ie. "C:\Program Files (x86)\DASSAULT SYSTEMES\B215\intel_a\code\command\TCK_INIT.BAT"
call tck_profile "CATIA Version" - i.e V6R2014_B215
call mkgetpreq -p "DS install path" - i.e "c:\Program Files\Dassault Systemes\B215"
call mkmk -W %TARGET WS% -a
Mostly, you have missing JDK or windows SDK.
the platform should be win10+vs2017, not win7+vs2017
So I downloaded and installed Microsoft Accelerator v2 to use ParallelArrays. I have referenced it in my project but when I try and execute the code from the module in a script file I get:
"The namespace 'ParallelArrays' is not defined
I have followed the instructions on this post:
Microsoft Accelerator library with Visual Studio F#
I've added a reference to the managed version "Microsoft.Accelerator.dll" to my F# project and then added the native "Accelerator.dll" as an item in my solution and set it's 'Copy To Output Directory' to Copy Always.
Still getting the FSI error and inline error in my script file on the '#load ...' line, however the solution builds fine, and no error in the module file.
Any ideas on what I'm missing? I'm sure it's something stupid.
Thanks,
Justin
UPDATE
I tried mydogisbox's advice, which got rid of the error above, but now when I run the code in the .fsx file I get this error instead:
--> Referenced 'F:\Work\GitHub\qf-sharp\qf-sharp\bin\Debug\Microsoft.Accelerator.dll' (file may be locked by F# Interactive process)
[Loading F:\Work\GitHub\qf-sharp\qf-sharp\MonteCarloGPU.fs]
error FS0192: internal error: F:\Work\GitHub\qf-sharp\qf-sharp\Accelerator.dll: bad cli header, rva 0
UPDATE 2
So the bad header error has dissapeared, but now I get this instead:
Microsoft.ParallelArrays.AcceleratorException: Failure to create a DirectX 9 device.
at Microsoft.ParallelArrays.ParallelArrays.ThrowNativeAcceleratorException()
at Microsoft.ParallelArrays.DX9Target..ctor()
at <StartupCode$FSI_0002>.$FSI_0002_MonteCarloGPU.main#() in F:\Work\GitHub\qf- sharp\qf-sharp\MonteCarloGPU.fs:line 14
Stopped due to error
I found this thread on MSDN however the answers proposed as fixes on that thread barely even relate to the question.
http://social.msdn.microsoft.com/Forums/vstudio/en-US/98600646-0345-4f62-a6c5-f03ac9c77179/ms-accelerator?forum=csharpgeneral
My Direct X version is 11, and I imagine that will suffice, however I tried installing DX9 however, it tells me that a newer version is detected therefore cant install.
There are special directives for referencing dlls from fsi. The #load directive loads the .fs file only. You need to use the #r directive to reference the file. You can either use the full path of the file or you can use #I to include the path to the file. More details here. Keep in mind that fsi is completely independent of your project, so all references in your project must be duplicated in fsi for it to access the same types.
I am trying to run a program that does not include any opencv files, but for some reason this error keeps popping up and preventing me from running the program.
LNK1104: cannot open file 'opencv_core246d.lib' C:\Users\Public\Documents\imgSwitchingFiles
Please can somebody shed light on this issue?
It looks like your project options state this library should be linked to your binaries. Did you reuse this project from elsewhere?
If you really don't need OpenCV, simply remove its libraries from the project linking options.
In project properties:
VC++ Directories>Library files>C:\OpenCV2.4.3\build\x86\vc9\lib
&
Linker>Input>Additional Dependencies>
Add the following under edit (each on a new line)
opencv_core243d.lib; opencv_imgproc243d.lib; opencv_highgui243d.lib; opencv_ml243d.lib; opencv_video243d.lib; opencv_features2d243d.lib; opencv_calib3d243d.lib; opencv_objdetect243d.lib; opencv_contrib243d.lib; opencv_legacy243d.lib; opencv_flann243d.lib;
Your file paths may be different i.e. vc10 instead of vc9 or u may have x64 instead of x86.
Also u will have 246 in every .lib instead of 243.
Hi everyone I would like to try the openCV library but I have some problems setting up the environment.
From the property Manager I created a new sheet and set:
VC++ Directories :
- Include Directories: $(OPENCV_DIR)\build\x86\vc10\bin and $(OPENCV2_DIR)\build\include
- Library Directories: $(OPENCV2_DIR)\build\x86\vc10\lib;
C/C++ :
- Additional Includes Directories: $(OPENCV2_DIR)\include;
Linker:
opencv_calib3d244d.lib opencv_contrib244d.lib opencv_core244d.lib
opencv_features2d244d.lib opencv_flann244d.lib opencv_gpu244d.lib
opencv_haartraining_engined.lib opencv_highgui244d.lib
opencv_imgproc244d.lib opencv_legacy244d.lib opencv_ml244d.lib
opencv_nonfree244d.lib opencv_objdetect244d.lib opencv_photo244d.lib
opencv_stitching244d.lib opencv_ts244d.lib opencv_video244d.lib
opencv_videostab244d.lib
-Additional Library Directories: $(OPENCV2_DIR)\libs
I can compile but i can't execute the program because I get an error opencv_core242.dll is missing.
Where's my error? Thanks
"I get an error opencv_core242.dll is missing"
if you linked against the libs in opencv\build\x86\vc10\lib (your compiler/linker settings look ok),
you'll have to append
opencv\build\x86\vc10\bin
to your PATH environment variable, so your exe can find the dlls at runtime.
I have a problem with linking in VC++ 2010. When I compile in the debug mode it's ok, but in the release mode I regular receive the error "LNK1000: Internal error during IMAGE::BuildImage".
What am I doing wrong?
It began work as soon as I have changed "Whole program optimization" option from "Use Link Time Code Generation" to "Profile Guided Optimization-Instrument".
I encountered the same error. The problem in my case was that I was "playing" with the configuration properties (Project Properties -> Configuration Properties -> General)
The 'Configuration Type' of the project was 'Dynamic Library (.dll)', but the 'Target Extension' was .lib instead of .dll.
April 2020 update
Issue with MSBuild and Docker for Windows was fixed in MSBuild 16.5 (source), so if still seeing that - just update MSVS/MSBuild to the latest version
Original answer
Check for working C compiler: C:/BuildTools/VC/Tools/MSVC/14.24.28314/bin/Hostx64/x64/cl.exe -- broken
CMake Error at C:/Program Files/CMake/share/cmake-3.16/Modules/CMakeTestCCompiler.cmake:60 (message):
The C compiler
"C:/BuildTools/VC/Tools/MSVC/14.24.28314/bin/Hostx64/x64/cl.exe"
is not able to compile a simple test program.
......
LINK : fatal error LNK1000: Internal error during IMAGE::BuildImage.FinalPhase
I was getting this error when I was running cmake in Docker for Windows inside mounted Docker volume. Solution is to copy the workspace to local Docker filesystem.
In vs2019 it works for me:
Project->Property pages->Optimization->Link Time Code Generation, change from "Use Link Time Code Generation" to "Profile Guided Optimization-Instrument"