I've been able to create/compile the simple_extension.dll (32bit) only on PC's with VS2010 C++ Express Edition. I'm following WHesse's article on native extensions section Building on Windows. My PC on the other hand has Windows 2008 Server R2 64bit, VS2010 Ultimate, and Dart 64bit (SDK version 1.5.0-dev.4.17).
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
in http://dart.googlecode.com/svn/trunk/dart/samples/sample_extension/sample_extension.cc are not found.
Just guessing but I don't think the article's build steps are intended for full version VS2010 C++ projects or maybe 64bit?
Does anyone have a VS2010 C++ (full version) solution file working for sample_extension project?
Update: Output from running example_build.dart
Observatory listening on http://127.0.0.1:1283
Building project "C:\Users\OSSDevYorgi\DartPlayground\ccompile-master\example\../example/sample_extension.yaml"
sample_extension_dllmain_win.cc
C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\windows.h(151) : fatal error C1083: Cannot open include file: 'excpt.h': No such file or directory
sample_extension.cc
sample_extension.cc(1) : fatal error C1083: Cannot open include file: 'string.h': No such file or directory
Generating Code...
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
Copyright (C) Microsoft Corporation. All rights reserved.
sample_extension_dllmain_win.cc
C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\windows.h(151) : fatal error C1083: Cannot open include file: 'excpt.h': No such file or directory
sample_extension.cc
sample_extension.cc(1) : fatal error C1083: Cannot open include file: 'string.h': No such file or directory
Generating Code...
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
Copyright (C) Microsoft Corporation. All rights reserved.
Building complete with some errors
Related
When I try to run Maxine here's what shows up.
Microsoft Windows [Version 10.0.19042.662]
(c) 2020 Microsoft Corporation. All rights reserved.
C:\Users\mouss\Desktop\MAXINE-AR-SDK-0.8.2.0\samples\GazeRedirect>run.bat
C:\Users\mouss\Desktop\MAXINE-AR-SDK-0.8.2.0\samples\GazeRedirect>SETLOCAL
C:\Users\mouss\Desktop\MAXINE-AR-SDK-0.8.2.0\samples\GazeRedirect>SET PATH=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.0\bin;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.0\libnvvp;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files\NVIDIA Corporation\Nsight Compute 2022.4.0\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Users\mouss\AppData\Local\Microsoft\WindowsApps;;C:\Users\mouss\AppData\Local\Programs\Microsoft VS Code\bin;..\..\samples\external\opencv\bin;..\..\bin;
C:\Users\mouss\Desktop\MAXINE-AR-SDK-0.8.2.0\samples\GazeRedirect>SET NVAR_MODEL_DIR=..\..\bin\models
C:\Users\mouss\Desktop\MAXINE-AR-SDK-0.8.2.0\samples\GazeRedirect>GazeRedirect.exe --split_screen_view=false
Cannot create a cuda stream: CUDA driver version is insufficient for CUDA runtime version
ERROR: Initializing Gaze Engine failed
[ WARN:0] terminating async callback
C:\Users\mouss\Desktop\MAXINE-AR-SDK-0.8.2.0\samples\GazeRedirect>
I tried reinstalling maxine and other drivers.
Terminal is given as:
C:\Windows\System32\config\systemprofile\AppData\Local\Jenkins\.jenkins\workspace\Pipeline1>cmake . .
-- Building for: Visual Studio 16 2019
-- Selecting Windows SDK version 10.0.18362.0 to target Windows 10.0.18363.
CMake Error at CMakeLists.txt:2 (project):
Failed to run MSBuild command:
C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/MSBuild/Current/Bin/MSBuild.exe
to get the value of VCTargetsPath:
Microsoft (R) Build Engine version 16.8.2+25e4d540b for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.
MSBUILD : error MSB1009: Project file does not exist.
Switch: VCTargetsPath.vcxproj
Exit code: 1
-- Configuring incomplete, errors occurred!
See also "C:/Windows/System32/config/systemprofile/AppData/Local/Jenkins/.jenkins/workspace/Pipeline1/CMakeFiles/CMakeOutput.log".
I have declared MSBuild path in system variables and I have VisualStudio 16 2019 version.
I'm using Delphi Rio, I would like to distribute a font by embedding it into the application executable. But I've got errors, as shown below, when compiling the application.
I just added a font using Project->Resources and Images dialog, without doing anything else at all.
Please guide how to fix the error.
Project1Resource.rc:
1 FONT "Kanit-Black.ttf"
Project1.dpr:
program Project1;
{$R *.dres}
uses
Vcl.Forms,
Unit1 in 'Unit1.pas' {Form1};
{$R *.res}
begin
Application.Initialize;
Application.MainFormOnTaskbar := True;
Application.CreateForm(TForm1, Form1);
Application.Run;
end.
Compiler Output:
Build started 07/18/2020 01:14:16 AM.
__________________________________________________
Project "C:\Users\John\Desktop\foo\Project1.dproj" (Build target(s)):
Target BuildVersionResource:
c:\program files (x86)\embarcadero\studio\20.0\bin\cgrc.exe -c65001 Project1.vrc -foProject1.res
CodeGear Resource Compiler/Binder
Version 1.2.2 Copyright (c) 2008-2012 Embarcadero Technologies Inc.
Microsoft (R) Windows (R) Resource Compiler Version 6.0.5724.0
Copyright (C) Microsoft Corporation. All rights reserved.
Deleting file "Project1.vrc".
Deleting file "Project1.$manifest".
Target BuildProjectResourceFile:
c:\program files (x86)\embarcadero\studio\20.0\bin\cgrc.exe -c65001 Project1Resource.rc -foProject1.dres
CodeGear Resource Compiler/Binder
Version 1.2.2 Copyright (c) 2008-2012 Embarcadero Technologies Inc.
Microsoft (R) Windows (R) Resource Compiler Version 6.0.5724.0
Copyright (C) Microsoft Corporation. All rights reserved.
RC : fatal error RW1023: I/O error seeking in file
c:\program files (x86)\embarcadero\studio\20.0\bin\CodeGear.Common.Targets(1004,5): error MSB6006: "brcc32" exited with code 1.
Done building target "BuildProjectResourceFile" in project "Project1.dproj" -- FAILED.
Done building project "Project1.dproj" -- FAILED.
Build FAILED.
c:\program files (x86)\embarcadero\studio\20.0\bin\CodeGear.Common.Targets(1004,5): error MSB6006: "brcc32" exited with code 1.
0 Warning(s)
1 Error(s)
Time Elapsed 00:00:00.18
I am trying to build OpenCV for WinRT by following the instruction here
Opened Visual Studio 2013 developer command prompt, navigated to
cd path/opencv/platforms/winrt
then run the command
setup_winrt.bat "WP,WS" "8.0,8.1" "x86,ARM" -b
But which ended up with the following error,
INFO> Directory: E:\Software\OpenCV\opencv_winrt\opencv-master\bin\WP\8.0\x
6
INFO> Platform: WindowsPhone
INFO> Version: 8.0
INFO> Architecture: x86
INFO> Generator: Visual Studio 12 2013
INFO> Install Directory: E:\Software\OpenCV\opencv_winrt\opencv-master\bin\
nstall\WP\8.0\x86
Directory: E:\Software\OpenCV\opencv_winrt\opencv-master\bin\WP\8.0
Mode LastWriteTime Length Name
---- ------------- ------ ----
d---- 17-Feb-16 11:36 PM x86
INFO> Generating project:
INFO> cmake -G Visual Studio 12 2013 -DCMAKE_SYSTEM_NAME:String=WindowsPhone -D
MAKE_SYSTEM_VERSION:String=8.0 -DCMAKE_VS_EFFECTIVE_PLATFORMS:String=x86 -DCMAK
_INSTALL_PREFIX:PATH=E:\Software\OpenCV\opencv_winrt\opencv-master\bin\install\
P\8.0\x86 E:\Software\OpenCV\opencv_winrt\opencv-master
CMake Error at CMakeLists.txt:88 (project):
A Windows Phone component with CMake requires both the Windows Desktop SDK
as well as the Windows Phone '8.0' SDK. Please make sure that you have
both installed
-- Configuring incomplete, errors occurred!
See also "E:/Software/OpenCV/opencv_winrt/opencv-master/bin/WP/8.0/x86/CMakeFil
s/CMakeOutput.log".
INFO> -----------------------------------------------
INFO> Building and installing project:
INFO> Executing: msbuild OpenCV.sln /p:Configuration='Debug' /m
Microsoft (R) Build Engine version 12.0.21005.1
[Microsoft .NET Framework, version 4.0.30319.34014]
Copyright (C) Microsoft Corporation. All rights reserved.
MSBUILD : error MSB1009: Project file does not exist.
Switch: OpenCV.sln
INFO> Error: Failure executing command: msbuild OpenCV.sln /p:Configuration='De
ug' /m
I have confirmed the Windows SDK installed or not by looking at
C:\Program Files (x86)\Microsoft SDKs\Windows
and I can see following directories there,
v7.0A, v7.1A, v8.0, v8.0A, v8.1, v8.1A
What could be the issue here?
So it turns out lua for windows install has some earlier 2.1 version of luasql on it, and I need to be able to use luasql 2.2 (particularly mysql). I've spent all day trying to install this thing with luarocks but keep hitting a wall. This is the 3rd wall I've hit but the first one that I just have no clue where to even begin.
I run: luarocks install luasql-mysql MYSQL_DIR="E:/Programs/MySQL/MySQL Server 5.5"
It goes through and outputs (removing a lot of the output where it's just repeating the same thing but different file):
Extracting luasql-2.2.0\src\jdbc
Extracting luasql-2.2.0\src\jdbc\Makefile
... (lots of these here)
Extracting luasql-2.2.0\vc6\sqlite.def
Everything is Ok
Folders: 17
Files: 84
Size: 358091
Compressed: 440320
cl /MD /O2 -c -Fosrc/luasql.obj -IF:/Code/Lua/5.1/include src/luasql.c -IE:/Prog
rams/MySQL/MySQL Server 5.5/include
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
Copyright (C) Microsoft Corporation. All rights reserved.
luasql.c
cl /MD /O2 -c -Fosrc/ls_mysql.obj -IF:/Code/Lua/5.1/include src/ls_mysql.c -IE:/
Programs/MySQL/MySQL Server 5.5/include
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
Copyright (C) Microsoft Corporation. All rights reserved.
ls_mysql.c
e:\programs\mysql\mysql server 5.5\include\mysql_com.h(291) : error C2061: synta
x error : identifier 'SOCKET'
e:\programs\mysql\mysql server 5.5\include\mysql_com.h(337) : error C2059: synta
x error : '}'
... (lots of these here, same errors just different lines)
E:/Programs/MySQL/MySQL Server 5.5/include\mysql.h(374) : error C2143: syntax er
ror : missing '{' before '*'
E:/Programs/MySQL/MySQL Server 5.5/include\mysql.h(374) : fatal error C1003: err
or count exceeds 100; stopping compilation
Error: Build error: Failed compiling object src/ls_mysql.obj
Any idea where to start? I've had to a) install standalone mysql (was previously using one that came with WAMP since I was already using that before), and b) install visual studio 2010 (c# and c++ versions so far), and c) use visual studio command prompt to run the luarocks stuff, if I use regular command problem it breaks way before this.
I'm hoping this is an easy issue to fix for someone familiar with compiling C which is what this seems to be doing.
Add the following to ls_mysql.c after line 17:
#include <windows.h>
So that windows.h is included after winsock.h and before mysql.h.
References:
http://forums.mysql.com/read.php?45,37472,37472
C++ Redefinition Header Files (winsock2.h)