views:

94

answers:

5

Source code that compiles fine on other peoples environments won't correctly work in my environment. When I do a rebuild the compile occurs but when visual studio goes to move the exe from /obj/debug/{solution} to /debug/{solution} it cannot find the exe in the /obj/debug/{solution}. To make this even more crazy even after I reinstall visual studio it doesn't work. On other people environments it works find. Please note that this is a windows mobile 6, compact framework 3.5 project, Visual C++ project.

Thanks in advanced.

EDIT: Visual Studio 2008 is being used.

EDIT2: After looking at the logs again come to find out it says it is compiling but it isn't really compiling. Interesting enough it doesn't throw any errors until it tries to link the code. When it goes to link the object files, they aren't there and it fails.

A: 

In the solution properties page, check whether the path you are expecting the exe to be is same as the one specified in Linker -> Output file.

Another obvious mistake could be, check what build configuration you are building. You might be doing a release build and expecting a debug executable file :) I have done this a few times.

anand.arumug
Please note that the exact same line of source builds correctly in another PC. Same everything, just a different computer. Also, Visual Studio is set for Debug build. It tries to build it, and you can see in the output that it is building the Debug version. Visual studio throws an error saying something like "Error copying /obj/debug/{solution} to /debug/{solution}, /obj/debug/{solution} doesn't exist". If I look in either directories Visual Studio is correct there is nothing there. But I look in the log and it is compiling it and outputting the EXE. It's crazy.
GrandPrix
A: 

If you create a new "hello world" WM project, does it work?

If so, you can compare the solution files to check for differences that can cause this.

Shaihi
The solution file that isn't working on this workstation works on all other workstations.
GrandPrix
Still, since this is machine specific and my suggestion is very easy to test, I would recommend you doing it and see whether there are differences.
Shaihi
A: 

Perhaps you do not have write permission to the output folder? If you are running on Vista/7, is your Visual Studio running as elevated?

Daniel Rose
The workstation is using Windows XP. It had permissions to write.
GrandPrix
A: 

If the exact same solution works on other machines, then it's an environment problem and no amount of looking at the project, linker, etc is going to resolve this. What is different about the environments? Are the same service packs and QFE's applied for not just Studio, but also the OS? Is there a difference in processors (64/32-bit)? Are your permissions the same? Do you have the same SDKs installed?

I'd agree with Shahi that just trying to build a "hello world" app against the same SDK and see if it will compile is valuable info.

ctacke
A: 

Maybe VS creates the exe, and before it tries to move it to the final destination your virus scanner grabs it and removes it, or moves it to a save location.

Stefan