Microsoft Visual C++ – Compiling for 64-bit

Background As I tried to run our little ODBC application noticed that we have not created the targeted ODBC Data Source. Error Error Image Error Text Remediation Created the datasource and as I thought more, opted to consider 64-bit platforms, as well Target - x64 Objective Let us compile our application and target 64-bit bitness. … Continue reading Microsoft Visual C++ – Compiling for 64-bit

Microsoft – Visual C++ :- Compilation – Warning – warning C4172: returning address of local variable or temporary

Background Ran into a compiler warning while compiling a simple C application. Error Error Text Error Image Research StackOverflow warning: function returns address of local variable [enabled by default] [duplicate] Link https://stackoverflow.com/questions/17312336/warning-function-returns-address-of-local-variable-enabled-by-default  ( Link ) Code Here is the cited code :- Image Text Question This yields: ...and i can't figure out what is wrong … Continue reading Microsoft – Visual C++ :- Compilation – Warning – warning C4172: returning address of local variable or temporary

C – Get Ini File name from application name

Background I think back to my time down south. Straight out of College first job was C on an IBM OS/2 box; writing Insurance software for a company down in Australia. Get the Ini File name based on the executable file name filename.h filename.c Sharing Sharing here filename.h Link filename.c Link Dedicated Dedicating to my … Continue reading C – Get Ini File name from application name

Visual Studio .Net – C++ – ODBC / Database Connection

  Background Using a very nice and well documented code from Easysoft as a sample, wanted to see how to connect and disconnect from an ODBC datasource. Code Outline Function :- ParseCommandLineArguments Get Command Line Arguments int argc char* argv[] Function :- extractODBCError SQLGetDiagRec Function :- Main Function :- SQLAllocHandle SQL_HANDLE_ENV Function :- SQLSetEnvAttr ODBC/Version … Continue reading Visual Studio .Net – C++ – ODBC / Database Connection

Visual Studio .Net – C++ – Compile Error – “error LNK2019: unresolved external symbol _SQLAllocHandle@12”

Background Error linking a very simple ODBC Application written in C. Error Error Image Error Text TroubleShooting Review Compilation Step Command Code Remediation Outline Include the following libraries ODBC32.lib   Code Crediting Crediting Sybase SYBASE - Infocenter SQL Anywhere 12.0.1 > SQL Anywhere Server - Programming > ODBC support> Building ODBC applications Linking ODBC applications … Continue reading Visual Studio .Net – C++ – Compile Error – “error LNK2019: unresolved external symbol _SQLAllocHandle@12”

Visual Studio .Net – Workload – C++

Background Let us get our Visual Studio .Net environment configured for C & C++ development.   Installation Outline Programs & Features Launch Control Panel Choose "Programs & Features" applet Select targeted "Visual Studio" version In our case "Visual Studio Community 2017" Review workloads Ensure "Desktop Development with C++" is selected Process Click the modify button … Continue reading Visual Studio .Net – Workload – C++

Visual Studio .Net – HelloWorld in C

Background There is an application written in the C Language that I need to look more into. It has dragged on for months and it has been hanging over my head. HelloWorld Let us start off with a simple HelloWorld application in C. HelloWorld - Generic Code Output Output - Image Output - Text HelloWorld … Continue reading Visual Studio .Net – HelloWorld in C