The result "" of evaluating the value "$(CudaBuildTasksPath)" of the "AssemblyFile" attribute in element <UsingTask> is not valid. C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\BuildCustomizations\CUDA 4.0.targets
1. Close Solution on the Visual Studio
2. Find project file.
vcxproj file:
look for
<ImportGroup Label="ExtensionSettings" />
or
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
replace with
<ImportGroup Label="ExtensionSettings">
<Import Project="$(VCTargetsPath)\BuildCustomizations\CUDA 4.0.props" />
</ImportGroup>
3. Done.
Env.
Visual Studio 2010
CUDA 4.0
Windows 7
Thursday, 1 September 2011
Tuesday, 22 March 2011
OpenCV Error Report
In Visual studio 2011
If you didn't close the all cv Windows before your application closing, you may get error.
You can find out this error message in output window
Added code, before closing.
Then, you cannot see the error window.
Have a good job.
If you didn't close the all cv Windows before your application closing, you may get error.
Windows has triggered a breakpoint in BlaBla.exe.and
This may be due to a corruption of the heap, which indicates a bug in BlaBla.exe or any of the DLLs it has loaded.
This may also be due to the user pressing F12 while BlaBla has focus.
The output window may have more diagnostic information.
You can find out this error message in output window
HEAP[BlaBla.exe]: HEAP: Free Heap block 17afa0 modified at 17b000 after it was freedIf you have this problem, you can solve by adding simple code.
Added code, before closing.
cvDestroyAllWindows();
Then, you cannot see the error window.
Have a good job.
Thursday, 10 February 2011
0xC00000FD: Stack overflow
0xC00000FD: Stack overflow
C++ 혹은 C에서 로컬 변수로 여러 가지 변수를 선언할 때, 스택에서 할당가능한 메모리를 초과한 경우에 발생한다.
로컬 변수에 존재하는 배열이나, 기타 메모리를 할당하는 변수들을 포인터로 변경하여 선언해야 함.
Ex)
int a[200*300];
-->
int* a = new int [200*300];
주로 클래스에서 다량의 배열 변수를 사용하는 경우에 발생한다.
가급적이면 메모리 포인터를 이용하여 힙에 메모리를 할당하는 것이 바람직하다.
C++ 혹은 C에서 로컬 변수로 여러 가지 변수를 선언할 때, 스택에서 할당가능한 메모리를 초과한 경우에 발생한다.
로컬 변수에 존재하는 배열이나, 기타 메모리를 할당하는 변수들을 포인터로 변경하여 선언해야 함.
Ex)
int a[200*300];
-->
int* a = new int [200*300];
주로 클래스에서 다량의 배열 변수를 사용하는 경우에 발생한다.
가급적이면 메모리 포인터를 이용하여 힙에 메모리를 할당하는 것이 바람직하다.
Sunday, 9 January 2011
Tomcat java.net.UnknownHostException Error
java.net.UnknownHostException: localhost: localhost
at java.net.InetAddress.getAllByName0(InetAddress.java:1145)
at java.net.InetAddress.getAllByName(InetAddress.java:1072)
at java.net.InetAddress.getAllByName(InetAddress.java:1008)
at java.net.InetAddress.getByName(InetAddress.java:958)
at org.apache.catalina.core.StandardServer.await(StandardServer.java:373)
at org.apache.catalina.startup.Catalina.await(Catalina.java:662)
at org.apache.catalina.startup.Catalina.start(Catalina.java:614)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:592)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
When tomcat shows up the error, the host file should be changed.
127.0.0.1 localhost
The host file is in C:\Windows\System32\drivers\etc
the file name is host
Please check this file.
This is only for windows OS.
at java.net.InetAddress.getAllByName0(InetAddress.java:1145)
at java.net.InetAddress.getAllByName(InetAddress.java:1072)
at java.net.InetAddress.getAllByName(InetAddress.java:1008)
at java.net.InetAddress.getByName(InetAddress.java:958)
at org.apache.catalina.core.StandardServer.await(StandardServer.java:373)
at org.apache.catalina.startup.Catalina.await(Catalina.java:662)
at org.apache.catalina.startup.Catalina.start(Catalina.java:614)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:592)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
When tomcat shows up the error, the host file should be changed.
127.0.0.1 localhost
The host file is in C:\Windows\System32\drivers\etc
the file name is host
Please check this file.
This is only for windows OS.
Tuesday, 30 November 2010
Wiimote Library For C#
Wiimote Library For C#
Wiimote library DownLoad - Click Here
From Codeplex : http://wiimotelib.codeplex.com/
Wiimote library DownLoad - Click Here
From Codeplex : http://wiimotelib.codeplex.com/
Sunday, 7 November 2010
Opening Console Window (콘솔창 열기)
In "stdafx.h"
#ifdef _DEBUG
#pragma comment(linker, "/entry:WinMainCRTStartup /subsystem:console")
#endif
And build, and execute.
#ifdef _DEBUG
#pragma comment(linker, "/entry:WinMainCRTStartup /subsystem:console")
#endif
And build, and execute.
누구나 깔끔한 코드를 원하지만.....
자기가 필요로 할때는.... 깔끔한 프로그램 소스를 원하지만....
정작 자신이 코딩할 때는 더럽게 짠다.....
프로그램을 잘 짠다는 것은, 예전에는 잘 구동되는 프로그램을 말했지만...
요즘 프로그램을 잘 짠다는 것은...
남이 보기에도, 자신이 보기에도, 후에 다시 구현하기에도 쉬운 코드를 말한다....
인터넷에서 코드를 보다보면....
참 더럽게 짠 코드들이 참 많다.... 심지어 마이크로 소프트 sdk를 찾아봐도... 깨끗한 코드를 찾아보긴 어렵다...
후.....
언제쯤........?
정작 자신이 코딩할 때는 더럽게 짠다.....
프로그램을 잘 짠다는 것은, 예전에는 잘 구동되는 프로그램을 말했지만...
요즘 프로그램을 잘 짠다는 것은...
남이 보기에도, 자신이 보기에도, 후에 다시 구현하기에도 쉬운 코드를 말한다....
인터넷에서 코드를 보다보면....
참 더럽게 짠 코드들이 참 많다.... 심지어 마이크로 소프트 sdk를 찾아봐도... 깨끗한 코드를 찾아보긴 어렵다...
후.....
언제쯤........?
x86 vs x64
x86 과 x64의 차이점
응용 프로그램을 코딩하다보면 많이 등장하는 것이 이 x86과 x64이다.
시스템 프로그래밍을 하지 않는다면, Visual Studio 혹은 OS 단에서 대충 잘돌리기 때문에, 위 두 개의 차이점에 대해서 그다지 생각할 필요가 없다.
하지만, 윈도우 내부적인 연산이라던가, 시스템 메시지등을 가져오는 코딩을 한다면 x86과 x64에 대해서 심각하게 고려를 해야한다.
한 가지 예를 들자면, x86으로 DLL을 구성한다면, Windows 7 64bit에서는 후킹을 할 수 없다. 후킹 인젝션하는 Dll이 64bit OS에 인젝션 되지 않기 때문이다. (정확히 말하면, 인젝션은 되나, 일부 기능이 작동하지 않아서, 인젝션 되지 않는 것과 같은 느낌을 들게 한다.)
Windows 7 64bit에 대한 후킹 얘기는 다음으로 미루고, 오늘은 x86과 x64의 차이점에 대해서 간단하게....
x86, x64는 원래 하드웨어에서 나온 말이다. x86용 OS, x64용 OS 등과 같이 쓰이듯이 하드웨어에 맞는 소프트웨어 등 기타를 구성하기 위해서 쓰였다고 생각하면 된다.
좀더 쉽게 생각하면, 286, 386, 486 등과 같은 고전 컴퓨터에서 사용하던 하드웨어 방식이 x86이다. x에 2,3,4 등이 들어간다고 생각하면 된다. 따라서 고전 컴퓨터가 쓰일 당시에는 32bit의 주소방식으로도 얼마든지 프로그램 구성이 가능했고, CPU와 메모리 사이에서 발생하는 통신시에 주소를 32bit만으로도 얼마든지 가능했다. (x86시에는 32bit 주소체계를 이용하였음)
문제는 메모리가 커지다보니, 32bit 주소 체계만으로는 2기가 이상의 메모리(2에 32 = 약 2GB)에 접근이 불가능해졌다.
그래서, 대용량의 메모리를 사용하려다보니 64bit 주소 체계가 필요하게 되었고, 그에 따라서 응용 프로그램에서 파생되는 기타등등의 문제들이 발생하게 되었다.
기본적으론 x86에서 구동되는 프로그램은 x64에서 구동될 가능성도 있고, 구동되지 않을 가능성도 있다. 메모리연산 구조의 차이에 따라서, 구동된다면, 감사고, 아니면 오류다. OS 단에서 x86의 프로그램을 x64로 변환을 시도해주기는 하지만, 그다지 안정적이지도 않고, 수시로 다운이 나버리는 사태가 발생한다.
어찌됐건, x86과 x64사이에서의 호환문제는 사실 해결하기 힘들다. 새로 코딩한다던가, 재빌드를 한다던가 등의 작업을 해줘야함.
어쨋건, x84는 32bit 운영체제에서 구동되는 하드웨어 혹은 그 환경을 말하고, x64는 64bit 운영체제에서 구동되는 하드웨어 혹은 그 환경을 말한다. 별차이는 없지만... 시스템 프로그래밍할 때는 이 두가지 차이 때문에 큰 어려움을 겪을 때가 많다.
추가로 몇가지 덧붙이자면,
x86으로 생성된 프로그램은 x64와 호환되지 않는다. 특히 C++ 코딩에서는 심각한 문제가 발생한다.
x86으로 Dll을 생성하고 x64에서 Dll을 불러오게 되는 경우, add referece를 통해서 로딩하게 되면, badImage Exception 뭐 이딴게 발생한다. 강제적으로 add referece를 하지 않고, Dll 로딩을 하게 된다면, 뭐 구동은 되겠지만, 어느 시점에 이분이 사망하실지 모른다.
특히, C#과 C++의 Dll 모듈 연동시에 위 사항은 크리티컬하다. 나름 꼼수를 써봤지만... 그다지 추천하지는 않는다. 한가지 플랫폼만을 위한 개발을 하는게... 안정적이다. 괜히 이것저것해서 프로그램을 다운시키지나 말았으면 한다.
응용 프로그램을 코딩하다보면 많이 등장하는 것이 이 x86과 x64이다.
시스템 프로그래밍을 하지 않는다면, Visual Studio 혹은 OS 단에서 대충 잘돌리기 때문에, 위 두 개의 차이점에 대해서 그다지 생각할 필요가 없다.
하지만, 윈도우 내부적인 연산이라던가, 시스템 메시지등을 가져오는 코딩을 한다면 x86과 x64에 대해서 심각하게 고려를 해야한다.
한 가지 예를 들자면, x86으로 DLL을 구성한다면, Windows 7 64bit에서는 후킹을 할 수 없다. 후킹 인젝션하는 Dll이 64bit OS에 인젝션 되지 않기 때문이다. (정확히 말하면, 인젝션은 되나, 일부 기능이 작동하지 않아서, 인젝션 되지 않는 것과 같은 느낌을 들게 한다.)
Windows 7 64bit에 대한 후킹 얘기는 다음으로 미루고, 오늘은 x86과 x64의 차이점에 대해서 간단하게....
x86, x64는 원래 하드웨어에서 나온 말이다. x86용 OS, x64용 OS 등과 같이 쓰이듯이 하드웨어에 맞는 소프트웨어 등 기타를 구성하기 위해서 쓰였다고 생각하면 된다.
좀더 쉽게 생각하면, 286, 386, 486 등과 같은 고전 컴퓨터에서 사용하던 하드웨어 방식이 x86이다. x에 2,3,4 등이 들어간다고 생각하면 된다. 따라서 고전 컴퓨터가 쓰일 당시에는 32bit의 주소방식으로도 얼마든지 프로그램 구성이 가능했고, CPU와 메모리 사이에서 발생하는 통신시에 주소를 32bit만으로도 얼마든지 가능했다. (x86시에는 32bit 주소체계를 이용하였음)
문제는 메모리가 커지다보니, 32bit 주소 체계만으로는 2기가 이상의 메모리(2에 32 = 약 2GB)에 접근이 불가능해졌다.
그래서, 대용량의 메모리를 사용하려다보니 64bit 주소 체계가 필요하게 되었고, 그에 따라서 응용 프로그램에서 파생되는 기타등등의 문제들이 발생하게 되었다.
기본적으론 x86에서 구동되는 프로그램은 x64에서 구동될 가능성도 있고, 구동되지 않을 가능성도 있다. 메모리연산 구조의 차이에 따라서, 구동된다면, 감사고, 아니면 오류다. OS 단에서 x86의 프로그램을 x64로 변환을 시도해주기는 하지만, 그다지 안정적이지도 않고, 수시로 다운이 나버리는 사태가 발생한다.
어찌됐건, x86과 x64사이에서의 호환문제는 사실 해결하기 힘들다. 새로 코딩한다던가, 재빌드를 한다던가 등의 작업을 해줘야함.
어쨋건, x84는 32bit 운영체제에서 구동되는 하드웨어 혹은 그 환경을 말하고, x64는 64bit 운영체제에서 구동되는 하드웨어 혹은 그 환경을 말한다. 별차이는 없지만... 시스템 프로그래밍할 때는 이 두가지 차이 때문에 큰 어려움을 겪을 때가 많다.
추가로 몇가지 덧붙이자면,
x86으로 생성된 프로그램은 x64와 호환되지 않는다. 특히 C++ 코딩에서는 심각한 문제가 발생한다.
x86으로 Dll을 생성하고 x64에서 Dll을 불러오게 되는 경우, add referece를 통해서 로딩하게 되면, badImage Exception 뭐 이딴게 발생한다. 강제적으로 add referece를 하지 않고, Dll 로딩을 하게 된다면, 뭐 구동은 되겠지만, 어느 시점에 이분이 사망하실지 모른다.
특히, C#과 C++의 Dll 모듈 연동시에 위 사항은 크리티컬하다. 나름 꼼수를 써봤지만... 그다지 추천하지는 않는다. 한가지 플랫폼만을 위한 개발을 하는게... 안정적이다. 괜히 이것저것해서 프로그램을 다운시키지나 말았으면 한다.
Friday, 5 November 2010
System guid is not an attribute class Error Message
System guid is not an attribute class Error Message
To solve, include "using System.Runtime.InteropServices;" for c#
To solve, include "using System.Runtime.InteropServices;" for c#
Thursday, 21 October 2010
Handling error in Excel embeding with MFC in Office 2010, Window 7, Visual Studio 2010
#import "C:\Program Files\Common Files\Microsoft Shared\OFFICE14\mso.dll" rename("RGB", "MSRGB")
#import "C:\Program Files (x86)\Common Files\microsoft shared\VBA\VBA6\VBE6EXT.OLB" raw_interfaces_only, rename("Reference", "ignorethis"), rename("VBE", "testVBE")
#import "C:\Program Files\Microsoft Office\OFFICE14\excel.exe" exclude("IFont", "IPicture") rename("RGB", "ignorethis"), rename("DialogBox", "ignorethis"), rename("VBE", "testVBE"), rename("ReplaceText", "EReplaceText"), rename("CopyFile","ECopyFile"), rename("FindText", "EFindText"), rename("NoPrompt", "ENoPrompt")
x86 is for 64 bit OS. If you are not using 64 bit OS, you don't need it
#import "C:\Program Files (x86)\Common Files\microsoft shared\VBA\VBA6\VBE6EXT.OLB" raw_interfaces_only, rename("Reference", "ignorethis"), rename("VBE", "testVBE")
#import "C:\Program Files\Microsoft Office\OFFICE14\excel.exe" exclude("IFont", "IPicture") rename("RGB", "ignorethis"), rename("DialogBox", "ignorethis"), rename("VBE", "testVBE"), rename("ReplaceText", "EReplaceText"), rename("CopyFile","ECopyFile"), rename("FindText", "EFindText"), rename("NoPrompt", "ENoPrompt")
x86 is for 64 bit OS. If you are not using 64 bit OS, you don't need it
Subscribe to:
Posts (Atom)