Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

program works inside Borland-C++ Builder3 but doesn't separately

Status
Not open for further replies.

SashaBuilder3

Programmer
Jan 13, 2002
129
0
0
CA
Hi everybody!

I've written a simple console application in Borland-C++Builder-3. It works fine from inside the Borland environment, but when I try to run it separately it gives me a weird result...

Any clue?

Thanks,

Alexandre
 
Have you included all the necessary files? Look at faq101-187, faq101-188, and faq101-189.

James P. Cottingham
-----------------------------------------
[sup]To determine how long it will take to write and debug a program, take your best estimate, multiply that by two, add one, and convert to the next higher units.[/sup]
 
Hi 2ffat,


Thanks for the tips.

I tried to run the tdump, it indicated two files: KERNEL32.dll and USER32.dll.

Now what? -- I added the files to the project (not sure this was what I needed), re-made the project but this didn't help. I also made sure the 'Use dynamic RTL' in the Linker pane in the project options is unchecked. Still doesn't work.

Any ideas?

Thanks

Alexandre

 
Which OS(s) are you using? What are the odd results?



James P. Cottingham
-----------------------------------------
[sup]To determine how long it will take to write and debug a program, take your best estimate, multiply that by two, add one, and convert to the next higher units.[/sup]
 
It's Windows 2000.

Well, the program is supposed to search a certain string in the files in a certain folder. It's similar to the standard Windows search facility. So if the string is found the name of the file gets written in the result text file.

When I run the program from within Borland the result file is written OK, when separately -- nothing comes in there (of course I run it for the same test folder and I know which file names should appear there).

This puzzles me...

Alexandre
 
Odd. I had a similar problem with a program that was looking for a certain directory. Turned out that after I compiled the program, the starting directory wasn't the same as when I was debugging the program. Once I explicitly set the directories it started working.

At this point, I'm "grasping at straws." Is it possible to modify your program to put the filenames it is searching into a file. That is, as it searches for files, the filenames and directories are put into another file. That way, you can see what files it is looking for. You could print them to the screen in TMemoBox instead of a file.

If that works, go to the next step which is to list the contents of the files so you can see what it is searching for.

James P. Cottingham
-----------------------------------------
[sup]To determine how long it will take to write and debug a program, take your best estimate, multiply that by two, add one, and convert to the next higher units.[/sup]
 
Hi 2ffat,

You are right, I need to ouput a detailed log file to see what's going on.

Thanks anyway!

Alex
 
When you find out, let me know. I've never seen this and I would be interested in knowing what happened.



James P. Cottingham
-----------------------------------------
[sup]To determine how long it will take to write and debug a program, take your best estimate, multiply that by two, add one, and convert to the next higher units.[/sup]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top