|
simoncoul wrote: How can I fix this?
By reading here.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
librarie project
<br />
namespace Cryptography<br />
{<br />
<br />
class __declspec(dllexport) CRC32 <br />
{<br />
public:<br />
CRC32(void);<br />
[..].br />
}<br />
}<br />
test program project
<br />
using namespace Cryptography; <br />
CRC32 *pcrc=new CRC32();<br />
when I try to use my CRC32 class I get this error
error C2512: 'Cryptography::CRC32' : no appropriate default constructor available
whats up ??
|
|
|
|
|
Since noone else has replied...
Your code as shown compiles for me (if I add the missing semicolon
and comment out the "[..]") with no errors/warnings.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
I don't seee anything that would prevent it from running either...
I don't know whats wrong...
|
|
|
|
|
CiNN wrote: I don't seee anything that would prevent it from running either...
Running or compiling?
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
both since I can't compile I can't run
|
|
|
|
|
Hmm since I copied the code and compiled it, I can only assume your'e not
showing us something
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
my last post has the source code which still don't compile with me
http://www.rarhost.com/download-pvyb7b.html
|
|
|
|
|
Just a guess, but are you sure that when you compile your test program that the code
<br />
class __declspec(dllexport) CRC32
becomes
<br />
class __declspec(import) CRC32
Chris Meech
I am Canadian. [heard in a local bar]
|
|
|
|
|
I guess it does I just replaced the EXPORTS macro Visual Studio made for my code to be explicit on the forum.
btw I'm using visual studio 2008 beta 2
|
|
|
|
|
here is le test project
source
for visual studio 2008 b2
|
|
|
|
|
Hey there, I was wondering if someone would be willing to show me how to capture a frame from a webcam and turn it into a texture in OpenGL.. I'd like to do this realtime so the webcam is displaying in my OpenGL project. If anyone has some tips that would be great.
|
|
|
|
|
This really is two completely different parts to your question...
1/ grabbing a picture from a webcam,
and,
2/ Now I have a bitmap, how do I turn that into a texture and use it in OpenGL.
You'll have luck researching each of these parts, but I doubt anyone will give you the whole thing on a platter.
My guess is that the camera will provide a TWAIN interface for grabbings pics, but I don;t have any direct experience?
Iain.
|
|
|
|
|
Iain Clarke wrote: but I doubt anyone will give you the whole thing on a platter.
and some are not allowed to serve platters.... bum wrist.
_________________________
Asu no koto o ieba, tenjo de nezumi ga warau.
Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)
|
|
|
|
|
I have created a window and done some drawing in the WM_PAINT message (drawing a border at the window's edge). However, when I resize the window, the window isnt updated from the WM_SIZE message. Is this normal and I have to explicitly have to tell the app to redraw the window when it is sized, or is there a window style or something that I have to set for the window to be updated when it is sized?
If I resize the window, minimize it then restore it, then the window has been repainted with the border at its edge, so I know it is something to do with the WM_SIZE message.
Thanks for your help,
--PerspX
"Nowadays, security guys break the Mac every single day. Every single day, they come out with a total exploit, your machine can be taken over totally. I dare anybody to do that once a month on the Windows machine." - Bill Gates
|
|
|
|
|
Can you show the code you use in response to WM_PAINT?
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
You could try getting your resize notification from the WM_WINDOWPOSCHANGED message instead.
|
|
|
|
|
What are you doing in response to the WM_SIZE message?
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Make sure that your OnSize handler is calling the default implementation also.
ie
void CMyWnd::OnSize (....)
{
CWnd::OnSize (....); (or CDialog:: etc - whatever the parent class is
}
Iain.
|
|
|
|
|
Are you using a class library or the APIs directly? If the latter, check that your window class has the CS_HREDRAW and CS_VREDRAW styles.
|
|
|
|
|
I am currently using the VC++ debugger to debug both managed and unmanaged code by attaching to a process, setting breakpoints, and running the program in such a way that it should stop at the breakpoints.
I have checked all of my DLLs and they all have debugging symbols loaded (some of them are .NET DLLs). This can be seen in the Modules window. The breakpoints window also shows all of my breakpoints as a solid red, and not "?". For some reason though, my program refuses to stop at these points even though I'm 100% sure that they pass by them.
Any suggestions?
|
|
|
|
|
When attaching to the process, have you set the debugger to attach to both native and managed code?
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
|
hmm...beats me. Will it stop on a breakpoint in the EXE module? If so, can you step into a DLL from there?
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
I guess I could've tried that, but I decided to do a rebuild, and see if it was some kind of environment issue. The same DLLs are actually placed in multiple locations (copied over, but not sure what kind of script manages it), and you get references from one location to another, so starting from scratch may be the best way.
Thanks for helping.
I'll post an update later to see if I figure anything out.
|
|
|
|