|
The #defines are in the header that gets used in the exe code for pulling in the functions in the static library... so it should be exactly the same. I've used this static library before and never had this issue before, which is even more odd.
The static library is a very plain/small library with only two small functions. There's no MFC, ATL, or anything like that in the static lib.
|
|
|
|
|
Albert Holguin wrote: The #defines are in the header that gets used in the exe code for pulling in the functions in the static library
That is not correct, both the include file and the #define s within it are processed by the compiler, there is no reference to them in the exe or lib file. The actual #define directives are seen and converted to their 'real' values by the preprocessor. If you have different versions of the same directives within your project then you can end up with the situation you are seeing. Alternatively you could have a different set of values in the pre-compiled header file which conflict with the ones you are seeing in your .h file. Without seeing a bit more of your source it's difficult to speculate further as to why this is happening.
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
|
I was referring to where the defines are located within the projects. The source isn't that expansive and like I said, if I just move the functions into the header and make them inline so they aren't a separate compilation, it works fine, so there's nothing wrong with the source.
|
|
|
|
|
Albert Holguin wrote: there's nothing wrong with the source.
There obviously is something wrong with the source otherwise this problem would not exist. However without more details it's not easy to guess what.
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
|
I think we need to see a bit more of your code. Take a look at the actual values that are generated within the library build for the MY_STRUCT tmp; .
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
|
Do you have the defines in the header you have the funciton deffinition in, and that is included into the exe you are building?
==============================
Nothing to say.
|
|
|
|
|
|
If the same header is used to complie the lib as the exe then the defines must be the same.
==============================
Nothing to say.
|
|
|
|
|
Well... Yes.... Of course.
|
|
|
|
|
Yeah, so what you have is plain weird.
I am thinkin it may be a compiler screw up. Rare, but they can happen. Can you try a different compiler?
==============================
Nothing to say.
|
|
|
|
|
See note below to Josh btw... got it working, think the bogus numbers just came from breaking in the non-debug assembly... not sure why studio let's you break in a non-debug assembly if it's going to provide bogus data anyway... but at least everything is working.
|
|
|
|
|
Albert Holguin wrote:
Am I missing/forgetting something??
Yep you're forgetting that the preprocessor is evil.
use...
static const uin16_t VAL_ONE = 0x14fc
|
|
|
|
|
...I found a few mistakes on the linker inclusions coupled with the fact that I was breaking in the static library with the release version of the library, so think that was probably causing me to see bogus debug numbers (and the inclusion mistakes were causing the malfunctions).
|
|
|
|
|
I have MFC SDI project and CListView inside. I would like to have overlay images in my list control. In image list I have some images set with SetOverlayImage, and I use CListCtrl::SetItemState with LVIS_OVERLAYMASK and INDEXTOOVERLAYMASK. Overlay images are still not shown, just the main image. This is cleansed code:
extern CListView* pLV;
CListCtrl* pLC = pLV->GetListCtrl();
imageList.Add((HICON)LoadImage(GetModuleHandle(NULL), MAKEINTRESOURCE(IDI_MAIN_IMAGE), IMAGE_ICON, 32, 32, 0));
imageList.Add((HICON)LoadImage(GetModuleHandle(NULL), MAKEINTRESOURCE(IDI_OVERLAY_IMAGE), IMAGE_ICON, 32, 32, 0));
imageList.SetOverlayImage(1, 1);
pLC->SetImageList(&imageList, LVSIL_NORMAL);
pLC->InsertItem(0, _T("Testing"), 0);
pLC->SetItemState(0, INDEXTOOVERLAYMASK(1), LVIS_OVERLAYMASK);
What am I doing wrong?
|
|
|
|
|
I have a unicode text file and tried to read it backwards using wifstream .But its not working.Any one help me and can i read this using wifstream backwards.
thanks in advance
|
|
|
|
|
What did you try to do to ready the file backwards?
What is the exact problem that you're facing?
Try and debug the program to see what and where the problem occurs.
|
|
|
|
|
If the file is small enough to fit in memory read it into a buffer backwards.
==============================
Nothing to say.
|
|
|
|
|
Sumesh Somanathan wrote: But its not working.
When you go to the doctor or take your car to the mechanic, do you simply say "I don't feel well" or "It's not working" and leave it at that? If so, consider yourself lucky to be in the company of mind readers.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous
modified 28-Oct-11 10:34am.
|
|
|
|
|
If he goes to the doctor and says that..... I want more doctors from that part of the world!!
|
|
|
|
|
|
I have created an ownerdraw menu in MFC Dilaog in VC++ 2010.But i have added Command is added to this menu item.But the function associated with this command is not firing.When i disable the Ownerdraw the command get fired.
Please help me .
Thanks in Advance
|
|
|
|
|
Please use your debugger to isolate the failing code and then post that extract so people can see what is actually happening.
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
|
Can't really see how the drawing would affect an event from being triggered (or messages from reaching intended window target)... post relevant code.
|
|
|
|
|
|
Hello All,
I wanted to create an application which do something, say popup message box after every 10 min. I wanted to create MFC application.And wanted to show running application icon in task bar (near clock). What should I do. Can you please suggest similar and how can I achieve same with C#?
Regards.
|
|
|
|