🔒 Locked
Weird executable behavior?
Advertisement
Original Post
I have an application that whenever I run inside of my compiler it works fine. (It's a network app, and in this case it connects to my server just fine) But if I take the built executable (WITHOUT changes to the code) and run it, (by simply double clicking the app, not by pressing the Run button in my compiler) it fails to connect to the server. Nothing else has changed at all. I'm using: Visual Studio C++ 2005 Express Edition Beta (Whidbey) XP Home SP2 3.0GHz P4 /w HT Any insight would be well appreciated!
How would changing the working directory affect the way program connects to my server? I mean, everything else works fine.
I had a problem just like this a while ago, and people thought i was crazy. It wasn't networking related however, so i don't know how much this will help. What ended up being the cause were dynamic arrays that I had not set to 0. When i ran release mode visual studio must have been zeroing them, so when i ran the exe it didn't work because they were not zeroed. If you want to run from VS like the exe then do run without debugging. Apparently release mode still does some things differently than the exe.
@A Guy from CRO: I'm using external files, but I have included them inside the directory where the program is located, and the program recognizes them fine.
@corrington_j: I'll try running it without debugging and see if that works.
Thanks for the replies!
@corrington_j: I'll try running it without debugging and see if that works.
Thanks for the replies!
remember, its not release mode, its under debug menu, and then click start without debugging. When I had my issue it drove me nuts for about 2 weeks trying to figure out what was going on.
well, it wasnt ever crashing, its just that the listen() function would never work, unless it ran from the compiler.
and its only the listen function, everything else works smoothly. any suggestions?
and its only the listen function, everything else works smoothly. any suggestions?
I don't anything about what you are working on, but is it possible the listen function is using some data that wasn't initialized when just running the exe.
I don't know anything about what you are working on, but is it possible the listen function is using some data that wasn't initialized when just running the exe.
[Edited by - corrington_j on February 17, 2005 7:49:07 PM]
[Edited by - corrington_j on February 17, 2005 7:49:07 PM]
Topic Locked
This topic has been locked by a moderator. New replies are not allowed.
Sign in to reply to this topic.
Advertisement