Search This Blog

Showing posts with label C/CPP. Show all posts
Showing posts with label C/CPP. Show all posts

Saturday, July 17, 2010

Integration and Working with Different Technology (VC++)

Integration and Working with Different Technology (VC++):

Last couple of week I got opportunity to work with the VC++ device oriented code. Very beauty about this device code are mostly core part of the device access is written in C program and Converted into the .dll (Dynamic link Library) file and only design view written in VC++ ,.Net programming language.

As we not have any clue about .Net programming, so we decide to go the VC++ programming language.

So our team has decide to take help from Microsoft team to setup workspace(In VC++ term Framework).

We got the smaple SDK and Sample code from the Vendors. Even we are not in a position to take help from vendor to setup the Development environment.

Microsoft team trying to Setup the Development Environment:

1. Installed the VB 6.0 in Laptop and trying to open the projectname.vcpro file but it does not open the entire project .

2. So team has started to created a new workspace and arranging the file as Header,Source,Resource then we tried to compile the apps it started throwing 53 compile “errors like cannot convert parameter 1 from 'CString' to 'const wchar_t *'

3. Next test we have installed the Entire .Net framework(3.1)(Visual studio 8) with all utility tools. Then again we tried and Its not worked.

4. I have waited couple of days the .Net team is will give some solution to that problem (I haven’t understand how they checking this code is compatible with VB 6& Visual Studio 2008.) than our team started working on some other device testing case.

5. While testing the new device they installed Service pack1(I don’t know what the Hell service pack for Development Environment) update for visual studio 8 .

6. One fine day we opened the projectname.vcpro its open with workspace and Compiled the same its working fine.

My question is why .Net developer not aware about the need of Service pack1 for this project.

How they are working with project without knowing the .Net frame work architecture.

Due to this we lost our 1 week productivity.

Any way still I have not understand what is going background of VC++ .

Where is the compiler present, how the run time operation is taken care.


Friday, July 16, 2010

Integration and Working with Different Technology:

Last couple of months I am working with different technology. We always start the learning process from the IDE of the new technology except C and C++.

I am well versed with Java technology, so always thing all the new requirement in the point of Class & Objects. So I can able to handle the any object programming language(last I worked are VC++,QT-Nokia).

But when it’s come to the structured programming language (I have idea about C Programming language up to pointers), we have to face lot of trouble (not trouble its challenge for New Generation Programmer) while compiling and Runtime. If you have studied about the compiler design of C than you can trouble shoot the issue within a couple of minutes.

While Doing code for Device oriented operation I have struggle lot.

New Challenges raise when I was working with C Program are:

1. Top down approach Compiler Design- If I have to use a function within Main of C program ,function definition should be above the Main function.

Eg: Wrong Way:

Main(){ function1()} function1(){println(“Wrong Way Cause Compile time Error.”);}

Correct Way:

function1(){println(“Wrong Way Cause Compile time Error.”);}

Main(){ function1()}

2. Statement Parsing: In C program we all know parsing of the Statement start from Right to Left parser

Statements: printf(“I am calling a Method::”+methodA()); if any errors are caused in methodA we wont get the print statement in Console.

3. Memory Allocation for The array: If any illegal access of the array value will quit the Program with the error message “Segmentation fault”. Not like Java Says array index out of bound exception.

4. Compiling the same code with Different Compiler: If you compile a code in windows(Create a file) with Turbo C compiler to run and Same code in linux again we have to use the gcc compiler.

5. Including Library: Add the Library file in different OS again is the pain full work but we can learn how the system will work.

6. Header and Definition(In C++ very different from Java): Always Separate file to keep the Variable and Method visibility in Header.Definition in .cpp file what the hell is.

7. What about File Handling:: No file Object only positive Integer will return if a file is opened successfully.

My conclusion (Idea for New generation Programmer)is while learning and working with new programming language at lease have bird eye view on compiler design and best programming way document. Refer only official blogs .

What about VC++ I will explain in next article because its Microsoft product with lot of Framework and Service pack challenges.