0

I am following a SQL tutorial about connecting the database to my C++ program so so far when I just include sql, sqlext, afxwin. I get tons of errors saying DWORD,BOOL,VOID,HWND and stuff is undefined. I know Microsoft is reworking their C++ compiler but like did that effect it at all? or could it simply be a linking error. (I am not really sure how to link a file soo I figured I did it correctly when I could #include

(I have MFC set to static library, because that is what the tutorial said to do)

Here is the tutorial: http://cs.dvc.edu/HowTo_SQL.html

enter image description here

rjzii
  • 14,236
  • 12
  • 79
  • 119
KingRaider
  • 19
  • 2
  • 9
  • Do you include [Windows data types](https://msdn.microsoft.com/en-us/library/windows/desktop/aa383751%28v=vs.85%29.aspx)' headers? – GSerg Oct 02 '15 at 10:27
  • 3
    Try `#include ` – Hatted Rooster Oct 02 '15 at 10:27
  • I forgot to mention that Windows.h is already included (MFC is set to static library) – KingRaider Oct 02 '15 at 10:28
  • Possible duplicate of [windows.h and MFC](http://stackoverflow.com/questions/5026799/windows-h-and-mfc) – GSerg Oct 02 '15 at 10:31
  • Are you sure it's included in your header file as well? – Hatted Rooster Oct 02 '15 at 10:31
  • 1
    I'm pretty sure you need to include `afxwin.h` before the other headers @KingRaider. – GSerg Oct 02 '15 at 10:34
  • The reputation requirement on images is to discourage newcomers from posting an image of code or errors instead of searchable, copyable text. – chris Oct 02 '15 at 10:37
  • The HTML for that tutorial was generated by Netscape 4.73 – released 15 years ago – and mentions the "vc98 folder", which is even older. I wouldn't put much trust in it today. – molbdnilo Oct 02 '15 at 10:40
  • afxwin does have to go before the rest... ops, I guess it would matter a lot at compile time, but how did you know that? @GSerg – KingRaider Oct 02 '15 at 10:44
  • I didn't know that for sure, but this kind of thing happens all the time when you include headers in the wrong order and it happens to matter. – GSerg Oct 02 '15 at 10:50

0 Answers0