This question is regarding getting version directly from assembly. I have followed instructions from this post
My script looks as follow.
#define MyAppName "Keyboard Trader"
#define SrcApp "Keyboard Trader.exe"
#define FileVerStr GetFileVersion(SrcApp)
#define StripBuild(str VerStr) Copy(VerStr, 1, RPos(".", VerStr)-1)
#define AppVerStr StripBuild(FileVerStr)
But while compiling script it throws following Error
Compile started: Tuesday, Oct 11 2011 at 01:15 AM
---
Compiling script with Inno Setup 5.4.2 (a)
---
[ISPP] Preprocessing.
---------------------
Compile Error!
Line: 12
**Error: [ISPP] Actual parameter VerStr is not of the declared type.**
What I am missing here?
GetFileVersion() is returning a blank string as it can't find the the SrcApp path.
Try specifying a fully qualified path or using:
#define SrcApp AddBackslash(SourcePath) + "Keyboard Trader.exe"
Related
I have installed Mplab version 8.9, I have downloaded a firmware package from this link
But, when I hit build all it shows me the following output and build fails:
----------------------------------------------------------------------
Debug build of project `D:\microchip\WFF Generic HID Demo 3\WFF_GenericHID_Demo_3.mcp' started.
Language tool versions: mplink.exe v9.80, mcc18.exe v9.80, mplib.exe v9.80
Preprocessor symbol `__DEBUG' is defined.
Thu May 29 15:44:49 2014
----------------------------------------------------------------------
Make: The target "D:\microchip\WFF Generic HID Demo 3\main.o" is out of date.
Executing: "C:\Program Files (x86)\Microchip\xc8\v1.31\bin\mcc18.exe" -p=18F4550 /i"..\Microchip Solutions v2011-07-14\Microchip\Include" "main.c" -fo="main.o" -D__DEBUG -Ou- -Ot- -Ob- -Op- -Or- -Od- -Opa-
Make: The target "D:\microchip\WFF Generic HID Demo 3\usb_descriptors.o" is out of date.
Executing: "C:\Program Files (x86)\Microchip\xc8\v1.31\bin\mcc18.exe" -p=18F4550 /i"..\Microchip Solutions v2011-07-14\Microchip\Include" "usb_descriptors.c" -fo="usb_descriptors.o" -D__DEBUG -Ou- -Ot- -Ob- -Op- -Or- -Od- -Opa-
usb_descriptors.c:
125: rom struct{BYTE report[28];}hid_rpt01={
(984) type redeclared ^
^ (1098) conflicting declarations for variable "hid_rpt01" (usb_descriptors.c:125)
(908) exit status = 1
(908) exit status = 1
Halting build on first failure as requested.
----------------------------------------------------------------------
Debug build of project `D:\microchip\WFF Generic HID Demo 3\WFF_GenericHID_Demo_3.mcp' failed.
Language tool versions: mplink.exe v9.80, mcc18.exe v9.80, mplib.exe v9.80
Preprocessor symbol `__DEBUG' is defined.
Thu May 29 15:44:51 2014
----------------------------------------------------------------------
BUILD FAILED
I tried to find the problem in this link also, but i could not find its root cause.
I started to try this because i wanted to make my own shields and pcb for my projects instead of arduino and the like.
Please help me with this problem.
I am in a HUGE depression now! I spend 2 days trying to use boost.python . PLEASE guide me! I will explain what I did.
I have Winows 7 64 bit.
The Python is 64 bit 2.7.3 installed at C:\Python27_amd64.
Now, I take boost_1_54_0.zip and unzip in F: directory.
The I use cmd.
bootstrap
this creates project-config.jam. I edit it and insert
using msvc : 9.0 ;
using python : 2.7 : C:\Python27_amd64\python : C:\Python27_amd64\include : C:\Python27_amd64\libs ;
Now i do
.\b2
This process runs for 20 something minutes and I am told that boost has successfully been build.
After that I install boost binaries from http://sourceforge.net/projects/boost/files/boost-binaries/
The binaries get installed in C:\local\boost_1_54_0.
Now I want to create a General project.
Now, I use the code given for embedding python in C++ here
#include <boost/python.hpp>
#include <boost/detail/lightweight_test.hpp>
#include <iostream>
namespace py = boost::python;
using namespace std;
int main()
{
// Initialize the interpreter
Py_Initialize();
py::object main_module = py::import("__main__");
py::object main_namespace = main_module.attr("__dict__");
py::exec("print 'Hello, world'", main_namespace);
py::exec("print 'Hello, world'[3:5]", main_namespace);
py::exec("print '.'.join(['1','2','3'])", main_namespace);
}
I setup the header files and library in VC++ directories to F:\boost_1_54_0\boost_1_54_0 and F:\boost_1_54_0\boost_1_54_0\stage\lib respectively.
I also setup project-->properties-->configuration properties-->C/C++-->General-->Additional Include directories to C:\Python27_amd64\include
Likewise, I also setup project-->properties-->configuration properties--> Linker--> General to C:\Python27_amd64\libs;"C:\local\boost_1_54_0\lib64-msvc-9.0" .
Now when I compile using x64 debugger. It gives me an error
Unhandled exception at 0x00000000 in test8.exe: 0xC0000005: Access violation at location 0x0000000000000000.
I am struck since last 2 days...but thats the closest I have been since then. please help me!
So you mean a runtime error, right?
I think you should first ensure, that there is no exception thrown by boost::python itself.
First try to set the try block around you python calls with a catch(...)
If exception is caught it is most probably the boost::python::error_already_set exception.
So, you then should decode it like here
Sorry for asking such a beginner question but I'm really new to openCV and VC++2010. I searched the net for an answer but I did not get an appropriate one.
Building the first project "First Program-Display a Picture" of the OReilly-LearningOpenCV book, I encountered these errors:
1-error C2664: 'cvLoadImage' : cannot convert parameter 1 from '_TCHAR *' to 'const char *'
2-IntelliSense: argument of type "_TCHAR *" is incompatible with parameter of type "const char *"
here's the code:
#include "stdafx.h"
#include "opencv\highgui.h"
int _tmain(int argc, _TCHAR* argv[])
{ IplImage* img = cvLoadImage( argv[1] );
cvNamedWindow( "Example1", CV_WINDOW_AUTOSIZE );
cvShowImage( "Example1", img );
cvWaitKey(0);
cvReleaseImage( &img );
cvDestroyWindow( "Example1" );
system("pause");
return 0;
}
and here's the message that I get from Microsoft Visual Studio 2010:
1>------ Build started: Project: FirstProgram_DisplayAPicture3, Configuration: Debug x64 ------
1>Build started 7/6/2013 11:13:00 AM.
1>InitializeBuildStatus:
1> Touching "x64\Debug\FirstProgram_DisplayAPicture3.unsuccessfulbuild".
1>ClCompile:
1> All outputs are up-to-date.
1> FirstProgram_DisplayAPicture3.cpp
1>FirstProgram_DisplayAPicture3.cpp(9): error C2664: 'cvLoadImage' : cannot convert parameter 1 from '_TCHAR *' to 'const char *'
1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
1>
1>Build FAILED.
1>
1>Time Elapsed 00:00:00.68
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Additional information that may be required:
I have made a win32 Console Application and in the second page of the wizard I have chosen precompiled header setting.
I have changed the platform of the project to x64 because I'm using win7x64 as the OS.
I have linked openCV library to my project properly.
I have just introduced highgui.lib as the additional dependencies
Any help would be appreciated.
What can I do to solve the two errors?
Edited section:
Note that these errors occur in line 6, I mean the line IplImage* img = cvLoadImage( argv[1] );
My edited section based on Roger Rowland's suggestion:
Based on what Roger Rowland said, I changed the Character Set property of the project to Not Set. The two errors mentioned above got solved but these errors rose up.
error LNK1120: 1 unresolved externals
error LNK2019: unresolved external symbol cvReleaseImage referenced in function main
How can I solve the problem?
Your project is configured for Unicode which means that the _TCHAR macro evaluates to wchar_t, which is a 16 bit UTF-16 data type on Windows. But the library you are calling accepts 8 bit char data.
So, you will need to make both sides of the interface match. Lots of ways to do that. The obvious options are:
Change your project to target ANSI (change the character set to multi byte in the VS project configuration).
Convert the input argument from UTF-16 to ANSI before calling the library.
It seems to me to be needlessly complex to use _TCHAR these days. That was useful when we needed to support Win9x (no Unicode support) and WinNT (supports Unicode) from a single code base. But I expect that nowadays you are targeting NT based systems and so you are safe to assume support for Unicode. In which case you can use wchar_t, wstring etc.
On the other hand, perhaps this is just a simple program for your personal use. In which case, since your library wants 8 bit characters, maybe it's simplest for you to target ANSI.
But either way I rather suspect that _TCHAR is just going to confuse you. I'd abandon that if I were you.
One final point is that you mention that you target x64 since your system is 64 bit. Do be aware that 64 bit systems can run 32 bit code perfectly well. If you want your program to be capable of running on a 32 bit system, and you don't have a pressing need to run under 64 bit, then it may be easier to target x86.
Your edit to the question asks a separate question, which I'll attempt to answer in spite of my reservations.
The unresolved external symbol error indicates that the linker could not resolve that particular symbol. In order for the linker to resolve it, it needs to be passed the .lib file that defines that symbol. You should double check that you have included all required .lib files in your additional dependencies. From what I can glean, there are multiple .lib files for OpenCV and you are probably missing the one which defines cvReleaseImage.
In my case I was including a header file twice.
I modified my library to be like:
#ifndef MY_LIB
#define MY_LIB
// code
#endif
I want to use boost in my Xcode project.(Xcode version 4.3.2)
I had build the boost from the MacPorts, and made the environment variables set.
But when I build the prj, there was the error:
Unknown type name 'namespace'
and the error code below:
// This file is automatically generated. Do not edit.
// ['../../libs/compatibility/generate_cpp_c_headers.py']
// Wed Jul 23 12:11:19 2003 ('GMTST', 'GMTST')
#ifndef __CSTDDEF_HEADER
#define __CSTDDEF_HEADER
#include <stddef.h>
namespace std {
using ::ptrdiff_t;
using ::size_t;
}
#endif // CSTDDEF_HEADER
the auto generated code is C++, not Objective-C.
Objective-C compiler rejects the invalid keyword 'namespace'.
To make it work change you project settings as follows:
- go to you Project Settings and choose the Target
- select Build Settings -> Apple LLVM compiler X.X - Language -> Compile Sources As and set it to Objective-C++ which allows mixture of Objective-C and C++.
Im trying to use the Windows API in Haxe to create a Windows application. I have already done this using ndlls and Haxe/Neko.
I tried doing it with the cpp target where I embed C++ code into the Haxe file using the new macro features in Haxe 2.09. But, as soon as I include windows.h it gives an error
./src/Main.cpp(79) : error C2039: 'RegisterClassA' : is not a member of 'hx'
./src/Main.cpp(81) : error C2660: 'RegisterClassA' : function does not take 9 arguments
Called from ? line 1
Called from BuildTool.hx line 1246
Called from BuildTool.hx line 554
Called from BuildTool.hx line 591
Called from BuildTool.hx line 710
Called from BuildTool.hx line 785
Uncaught exception - Error in building thread
Error : Build failed
Build halted with errors (haxe.exe).
Here is my code -
import cpp.Lib;
#:headerCode("#include <windows.h>")// if i comment this line or replace windows.h with another standard header file like iostream, the error goes
class Main
{
static function main()
{
//no code here
}
}
In fact, if I replace windows.h with any header file from the Windows or DirectX SDK, I get the same error
Im using Haxe 2.09 and FlashDevelop. I use Windows 7. I am also using the latest version of hxcpp (version 2.09).
Looks like <windows.h> is #defining RegisterClass to RegisterClassA (part of the auto-magic Unicode support).
Because this is done with a text-prepropcessor macro, any code that has a symbol named RegisterClass (as seems to be the case with BuildTool) has it automatically swapped out for RegisterClassA, which obviously causes problems if somebody goes looking for the function under its proper name.
Try this:
#:headerCode("#include <windows.h>")
#:headerCode("#undef RegisterClass")
You may need to do something similar for other clashes. See also this question.