Test and Measurement Forum

C experience, maybe helpful to others

Post general discussions on using our drivers to write your own software here

C experience, maybe helpful to others

Postby arthurian » Sun May 04, 2003 9:53 pm

I post this story of how I eventual got the C code to run in case it may help others.

Not having a C builder, I used a C++ which ought to run C whereas a C builder might not run C++. But it was not so. Troubles began when Microsoft C++ version 4.2 reported a fatal link error LNK1106 that implied it could not write to a disk location: 0x3d47981a. However, the computer disk checked out okay. Then when I tired the code on another computer I got the same link problem. This implied it was not hardware but something about how the Microsoft C++ was set up. In the drivers examples, known issues for Microsoft C versions 2-6, a cryptic clue was given:

This application uses non-standard linkage conventions (different to Windows 95/NT, Visual Basic etc). Please read carefully the instructions in the help file about creating LIB files.

Not being a solver of cryptic crossword puzzles this helped me not. Days of struggle followed till enough was enough. But what to do? Going out to buy the latest net C++ from Microsoft may bring no benefit as it does not appear to be supported and worse I would need another lap top as my 166 pentium, with 48 Meg ram and a 2 gig disk was way under spec. This was too much.

Re-reading the help I noted there were no known issues with Borland C. Better a command line builder could be had for free. But nearly 9 megabytes over a 56k modem was a lot to ask. So off to the library, download, zip to 7 floppies and home. All went well till disk 6 reported errors and the whole thing failed. So to download and after 40 minutes it was here. It loaded and after a struggle, helped by the Borland web page, I got the command line builder to work. The C code compiled, linked then crashed in a heap, with minimal useful explanation of why. Once I used to struggle with command line programs but I could not face it. Despondency set in.

Hope rose when I remembered adverts for Europes biggest computer fair, near Manchester and being in that part of the world I went, paying 4 quid to get in. Perhaps an old version of Visual Basic could be had. After a great walk around I found it could not. So the whole journey had been for nought. Dejected I began to leave when I noticed a Borland C builder, version 6, CD. The code needing to be validated by an access code got over the net, that had a 60 day trial validity.

So try this. But it would not fit in to the 450 megabyes on my disk. So followed the nuisance of copying things to CD. Outside the day was in harmony with my mood: pouring rain from heavy cloud. Eventually I got the version 6 builder installed.

Now sad and dejected I awaited more trouble. But Lo! At the first go, the code compliled linked and ran. I sat mouth wide open.
arthurian
 

Postby matthew » Wed May 07, 2003 9:25 am

Hi Arthurian,

Glad to hear you got this sorted out, the code will work under many compilers, but you do have to be familiar with setting up the compiler (you need to know your work environment).

Best regards
Matt Everett

Pico Software Engineer
User avatar
matthew
Guru
Guru
 
Posts: 109
Joined: Wed Sep 25, 2002 9:35 am
Location: Cambridgeshire, UK


Return to General Software Discussions

Who is online

Users browsing this forum: No registered users and 1 guest