![]() |
|
#1
|
||||
|
||||
Problem in running an application outside IDEFriends,
I have built a C application using MS VC++. When i run the program directly from the IDE, it runs. But when i double click the exe file, MS Send error report dialog box comes, and says that the application has performed an illegal operation! Can anyone tell me what is happening here? I have linked my file to some external libraries. Is that the problem involved here? I have no idea. Thanks... Paramesh. __________________
Don't walk in front of me, I may not follow. Don't walk behind me, I may not lead. Just walk beside me and be my friend. |
|
#2
|
||||
|
||||
Re: Problem in running an application outside IDEQuote:
Very likely. I encounter the same problem when running an application without the required dll's. Kobi. __________________
It's actually a one time thing (it just happens alot). |
|
#3
|
||||
|
||||
Re: Problem in running an application outside IDEQuote:
The dlls are present in the computer isnt it? Well. How do i solve this problem? Thanks Kobi... __________________
Don't walk in front of me, I may not follow. Don't walk behind me, I may not lead. Just walk beside me and be my friend. |
|
#4
|
|||
|
|||
Re: Problem in running an application outside IDELook for the path that your IDE sets for searching the dynamically linked libraries. On *nix, its set using environment variable called, LD_LIBRARY_PATH. When a program runs (outside the IDE, in your case), the dynamically linked libraries are searched under the given path speficed by the LD_LIBRARY_PATH or some related variable under windows. If the libraries or DLLs are not found under these paths or if the variable is not set in your current execution space, program fails.
|
|
#5
|
||||
|
||||
Re: Problem in running an application outside IDEQuote:
Simply create a library for the included files that are needed for your application. Lets say your application resides under c:\Paramesh So, put all the dll's under c:\Paramesh\RunTime Now, from within your code, include the dll's from the library \RunTime So now, your application will look one folder "Deeper" for the dll's, from it's currently being used. Kobi. __________________
It's actually a one time thing (it just happens alot). |
|
#6
|
||||
|
||||
Re: Problem in running an application outside IDEI use MS VC++ in windows. (
)I am linking to only static libraries, I tried it in the same operating system. I finally traced out where the error was, and i found that it was because of the memory allocation. If i allocate only less memory, it works.. But if i try to allocate more, the error message comes up. For example, if i have the memory allocated for 2 floats, it works.. But if i try to allocate 10 floats, it didnt work! Well. What may be the problem now? The files are linked correctly because it worked for less memory. But for more memory, it didnt work. So, it is not a linker problem i think. Thanks for your help friends.... __________________
Don't walk in front of me, I may not follow. Don't walk behind me, I may not lead. Just walk beside me and be my friend. |
|
#7
|
||||
|
||||
Re: Problem in running an application outside IDEHi, Paramesh.
This problem is very interesting. Could you please give some source code - unless it is very long. For instance, I would like to know if the floats you allocate are created in the memory space of the executable or in that of the libraries. Thanks, Lucian __________________
Please read these Guidelines before posting on the forum "A person who never made a mistake never tried anything new." Einstein |
|
#8
|
||||
|
||||
Re: Problem in running an application outside IDEThanks Lucian!
The source code is too long to be posted here... I'll post a part of my source code: CPP / C++ / C Code:
The next time, it doesnt.. Thank you.. Paramesh. __________________
Don't walk in front of me, I may not follow. Don't walk behind me, I may not lead. Just walk beside me and be my friend. |
|
#9
|
||||
|
||||
Re: Problem in running an application outside IDESo, what value does M ussually have? I tried this program several times without any problem (but without any outside dependencies, either):
CPP / C++ / C Code:
__________________
Please read these Guidelines before posting on the forum "A person who never made a mistake never tried anything new." Einstein |
|
#10
|
|||
|
|||
Re: Problem in running an application outside IDEQuote:
A more relevant question might be: What value does M have when your program tries to allocate storage: CPP / C++ / C Code:
Put this kind of output statement in your actual program, not just the test loop. See if the program thinks M is what you think it should be. It may just happen that M is not initialized the way that you think it is. For example, uninitialized variables may have different values in programs run from the IDE than they do when run from a command line. Regards, Dave |
Recent GIDBlog
Toyota - 2008 November Promotion by Nihal
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| The Specified CGI Application Misbehaved by not running a complete set of HTTP Header | SSS | Computer Software Forum - Windows | 2 | 17-Oct-2006 00:01 |
| a significant problem after installing Xp | mohammad | Computer Software Forum - Windows | 10 | 09-Aug-2005 08:03 |
| commands out of sync problem (c++ builder) | Largowww | MS Visual C++ / MFC Forum | 0 | 28-May-2005 04:40 |
| Help! Some basal questions about MFC | xutingnjupt | MS Visual C++ / MFC Forum | 1 | 05-Dec-2004 04:38 |
| Another FX 5600 problem (but with details that might shed light on this) | BobDaDuck | Computer Hardware Forum | 2 | 16-Apr-2004 08:53 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The