Posts Tagged “c++/VS”

Although JAVA_HOME is pointing to the JDK, the problem with the ant task javac is that the javac command in tools.jar in %JDK%/lib is not found. Either copy tools.jar or do some registry change.
http://forums.sun.com/thread.jspa?threadID=556816

CPP Compiletask in Ant involves following settings (XML Code):








Visual Studio Environment Variables
Problems involving environment variables with the command line Visual Studio Compiler cl.exe can be found here. These must be set:

vs2005 c:\program files\microsoft visual studio 8\
psdk c:\program files\microsoft platform sdk\

First, go to vs2005 install path c:\program files\microsoft visual studio 8\vc, run vcvarsall.bat to set environment variable; then c:\program files\microsoft platform sdk\, run setenv command: eg: setenv /SRV32 /DEBUG. I use it to make the program work properly.

Using C:\Programme\Microsoft Visual Studio 8\VC\vcvarsall.bat adds the following to the PATH Var
c:\Programme\Microsoft Visual Studio 8\Common7\IDE
c:\Programme\Microsoft Visual Studio 8\VC\BIN
c:\Programme\Microsoft Visual Studio 8\Common7\Tools
c:\Programme\Microsoft Visual Studio 8\Common7\Tools\bin
c:\Programme\Microsoft Visual Studio 8\VC\PlatformSDK\bin
c:\Programme\Microsoft Visual Studio 8\SDK\v2.0\bin
c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727
c:\Programme\Microsoft Visual Studio 8\VC\VCPackages

Comments 1 Comment »

Didi a friend and colleague at the futurelab gave me his collection of valueable OpenGL and GLSL Shader links.

GLSL reference:

http://www.opengl.org/documentation/glsl/

http://wiki.delphigl.com/index.php/Tutorial_glsl

http://developer.3dlabs.com/documents/index.htm

basic tutorials:
http://www.lighthouse3d.com/opengl/glsl/ – sehr gut
http://www.clockworkcoders.com/oglsl/tutorials.html – sehr gut
http://www.typhoonlabs.com/ – kompletter kurs, sehr gut

http://nehe.gamedev.net/data/articles/article.asp?article=21

http://www.3dshaders.com/home/ – home of the orange book (samples, links, examples)

shader authoring IDEs:
http://ati.amd.com/developer/rendermonkey/ – längere einarbeitungszeit (viele features), aber sehr professionell, funktioniert sehr sehr gut
http://www.typhoonlabs.com/ – funktioniert, sehr easy, spartanisch und unhandliches interface
http://lumina.sourceforge.net/ – gerade erst gefunden und probiert. funktioniert zwar aber wirkt eher spartanisch
http://developer.nvidia.com/object/fx_composer_home.html – directx tool, opengl support noch nicht ausreichend vorhanden, aber trotzdem interessant

natürlich findest du auch einen haufen an infos (advanced techniques, demos, articles)
auf den ati und nvidia developer seiten bzw in büchern …

Comments No Comments »

cUrl and LibCurl are binaries and libraries for doing url requests in C++ featuring http, ftp, SSL etc. However to work with a dll version of zlib compression library is necessary. But when the dll is not compiled with the same compiler as libcurl (mine is Visual Studio 2005) you will receive an runtime error like “Ordnungszahl 55 nicht gefunden”.

So instead of working with current version curl-7.16. I use 7.13.1 that does not come up with this error. This version is available in section Win32 – MSVC.

Problem wir WRITE_FUNCTION callback not reading all data
For keeping HTTPResponse results in Memory a callbackfunction is used.
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_data);

The response is received in several independent calls to write_data callback function. Always make sure to return size*nmemb else the function is just called once which may result is missing response data.

size_t write_data(void *buffer, size_t size, size_t nmemb, void *userp)
{
size_t realsize = size * nmemb;
char tmpBuffer[CURL_MAX_WRITE_SIZE];
strcpy_s(tmpBuffer, (char*)buffer);
return realsize;
}

See Thread

Comments No Comments »

This page explains why

#include <winsock2 .h>
#include <ws2tcpip .h>

need to be included before

#include <windows .h>

Comments No Comments »

There is a fine example based on winsock2 to ping network addresses within a self written application

http://tangentsoft.net/wskfaq/examples/rawping.html

Comments No Comments »

XML parsing
http://www.grinninglizard.com/tinyxmldocs/

OOP based Thread Framework , without monitoring but locks
http://www.codeproject.com/threads/threadlibrary.asp
A second Thread Framework
http://www.codeproject.com/threads/Joshthreadpool.asp

Debugging used in Futurelab
http://www.codeproject.com/debug/log.asp
- Futurelab XMLManager
- Futurelab UDPManager

Plugin Library – allows loading of dll plugins in host application
http://www.unitedbytes.de/go.php?site=spl

RakNet – Multi purpose Game Engine including voIP and broadcast /multicast functionality
http://www.rakkarsoft.com/

Comments No Comments »

The buzzword here is Com Interoperability that should enable managed components to talk with older Visual Basic applications. A general overview can be found here

http://www.codeproject.com/dotnet/cominterop.asp

The concrete problem focuses to use a .NET based C# dll in a VB6 application.

http://www.activevb.de/rubriken/vbdotnettipps/tipp0007.html

If problems with moving to other computers arise, try this one
http://www.blong.com/Conferences/BorConUK2002/Interop2/COMNetInterop.htm#RegAsm

Comments No Comments »

Several errors screwed me up for quite some time while trying to compile a midi library and starting the test samples

error C2065: ‘xxx’ : undeclared identifier
Someone forgot to specify the namespace for the used classes.

error LNK2019: unresolved external symbol _WinMain@16 referenced in function _WinMainCRTStartup
Never use a Windows Subsystem when you are trying to compile a Console application. The Visual Studio setting can be found in Linker>System>Subsystem
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=14021&SiteID=1

Comments No Comments »

Wtf is the difference between Win32 API – MFC and .NET

WIN32 API
The Windows API is the name given by Microsoft to the core set of application programming interfaces available in the Microsoft Windows operating systems. It is designed for usage by C/C++ programs and is the most direct way to interact with a Windows system for software applications. Lower level access to a Windows system, mostly required for device drivers, is provided by the Windows Driver Model in current versions of Windows.

MFC(Microsoft Foundation Classes)
is a Microsoft library that wraps portions of the Windows API in C++ classes, forming an application framework. Classes are defined for many of the handle-managed Windows objects and also for predefined windows and common controls.
It was designed with two goals
* Object Oriented Encapsulation of Win32 API
* Application Frame work for Windows Applications

Microsoft.NET
The .NET Framework created by Microsoft is a software development platform focused on rapid application development (RAD), platform independence and network transparency. .NET is Microsoft’s strategic initiative for server and desktop development for the next decade. According to Microsoft, .NET includes many technologies that are designed to facilitate rapid development of Internet and intranet applications.

.NET has brought new functionalities and tools to the application programming interface (API). These innovations allow programmers to develop applications for both Windows and the web as well as components and services (web services). .NET provides a new reflective, object-oriented API. .NET is designed to be sufficiently generic that many different high-level languages can be compiled.

The .NET framework is a competing product to Sun’s Java and J2EE technology and it shares many concepts with it.

Comments No Comments »

Makeing a .dll with VS 2003 and Winamp 5.0 Sdk is really not that easy as it seems. Some dll Linker error screws me up.
gen_tray error LNK2019: unresolved external symbol _main referenced in function _mainCRTStartup

Using mixed (managed and unmanaged code) dll support is the problem. For further info:

And for the solution always remind: its not your fault. Its that stupid program you work on and if you want you could end its existence with on single click. However this it the final solution (use release instead of debug mode )

Comments No Comments »