Welcome to Tech Support Forum home to more then 136,000 problems solved. Issues have included: Spyware, Malware, Virus Issues, Windows, Microsoft, Linux, Networking, Security, Hardware, and Gaming Getting your problem solved is as easy as:
1. Registering for a free account
2. Asking your question
3. Receiving an answer

Registered members:
* Get free support
* Communicate privately with other members (PM).
* Removal of this message
* See fewer ads.
* And much more..

 



Want to know how to post a question? click here Having problems with spyware and pop-ups? First Steps
Go Back   Tech Support Forum > The IT Pro > Programming
User Name
Password
Site Map Register Donate Rules Blogs Mark Forums Read


Programming A discussion forum for programs and programming used in tech-related businesses.

Reply
 
LinkBack Thread Tools
Old 06-24-2009, 10:14 AM   #1 (permalink)
Registered User
 
Join Date: Sep 2008
Posts: 17
OS: Linux,Max,Windows


Issue with Windows dev setup .Net (2003)

Hi All,
I am newbie on Windows development environment.I am using existing framework which is a .sln file. I launch the project and have added some of my new header files and .cpp files.Now from an existing file I call my function.It is like this

function1() //This was already there in the framework before.
**
function2(); //This is a newly added function for which new .cpp and .h is added in the same project.
}

Compilation or linker error I don;t get.When I try to debug by attaching the process I am not able to hit the function function1() itself.

But when I comment function2() and compile and build the binary which is called from function1() and try to debug I am able to debug correctly.

Environment I am using is .Net (2003).

I guess I am doing something very silly.Any help or suggestion would be of great help.

Thanks in advance
-R
rajukgp is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Important Information
Join the #1 Tech Support Forum Today - It's Totally Free!

TechSupportForum.com is a leading support website for your computer needs. We offer free, friendly and personalized computer support. Why pay to have your computer fixed when you can do it for free.

Join TechSupportforum.com Today - Click Here

Old 06-24-2009, 01:59 PM   #2 (permalink)
Design Team Member
 
jamiemac2005's Avatar
 
Join Date: Jul 2007
Location: Coventry, UK
Posts: 1,853
OS: Vista, various linux distros


Re: Issue with Windows dev setup .Net (2003)

Hey, could you post the entirety of the code. I'm assuming that the framework defines the functions in a header or within a class definition or something similar and the missing defenitions cause the error.

Cheers,
Jamey
__________________

Myspace
jamiemac2005 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Old 06-25-2009, 04:20 AM   #3 (permalink)
Registered User
 
Join Date: Sep 2008
Posts: 17
OS: Linux,Max,Windows


Re: Issue with Windows dev setup .Net (2003)

#include "darwin_header.h" got added in the code

function1() //this was there before
**
function2(); //newly added


}


in darwin_header.h
I have declared the function
function2();



in darwin_header.cpp

#include "darwin_header.h"


function2() //Definition
**
}


When I try to debug I never get the hit in function1().But if I comment I am getting.
Note if it is a simple function like printf() put inside function2() and I include <stdio.h> in top it works but if there are some placed in " " it doesn't work.

Thanks
-R
rajukgp is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Old 06-25-2009, 10:18 AM   #4 (permalink)
Design Team Member
 
jamiemac2005's Avatar
 
Join Date: Jul 2007
Location: Coventry, UK
Posts: 1,853
OS: Vista, various linux distros


Re: Issue with Windows dev setup .Net (2003)

Ah right, i think i get what's going on.

darwin_header.h contains a call to function 2 which is defined in darwinheader.cpp?

Put simply i think this shouldn't work because the function is called before it is defined... You could put a prototype of the function in darwin_header.h so that the function is already there?

If this is useless then i'll test it on my own system.

Cheers,
Jamey
__________________

Myspace
jamiemac2005 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Old 06-25-2009, 12:15 PM   #5 (permalink)
Registered User
 
Join Date: Sep 2008
Posts: 17
OS: Linux,Max,Windows


Re: Issue with Windows dev setup .Net (2003)

There are three files
Existing.cpp -> #include "darwin_header.h"
function1()
{
function2(); //This is newly added
}

darwin_header.h

void function2(); //prototype.

darwin_header.cpp
#include<darwin_header.h>

void function2()
{

}
rajukgp is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Old 06-25-2009, 12:20 PM   #6 (permalink)
Registered User
 
Join Date: Sep 2008
Posts: 17
OS: Linux,Max,Windows


Re: Issue with Windows dev setup .Net (2003)

File: Existing.cpp

#include <darwin_header.h>

void function1()
{
function2() ; //defined in darwin_header.h
}


File: darwin_header.h

declaration
void function2();

File : darwin_header.cpp

#include <darwin_header.h>

void function2()
{
//function definition.
}


Now when I try to debug Existing.cpp, debugger is not able to understand any break point on the function function1().But if I comment function2() then I am able to debug function1().

Thanks in advance for all help.
-R
rajukgp is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Reply


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




All times are GMT -7. The time now is 02:46 AM.



Copyright 2001 - 2009, Tech Support Forum
Home Tips Plus | Outdoor Basecamp | Automotive Support Forum

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85