# List.h

This topic is 4357 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

for some reason, i'm getting just about 50 errors in List.h... thing is, i'm not including that anywhere nor do i HAVE a list.h file or anything... y would it be included and y would it have so many errors: D:\Program Files\Visual Studio .Net 2003\Vc7\PlatformSDK\Include\List.h(37): error C2146: syntax error : missing ';' before identifier 'Length' D:\Program Files\Visual Studio .Net 2003\Vc7\PlatformSDK\Include\List.h(37): error C2501: '_LIST::DWORD' : missing storage-class or type specifiers D:\Program Files\Visual Studio .Net 2003\Vc7\PlatformSDK\Include\List.h(37): error C2501: '_LIST::Length' : missing storage-class or type specifiers D:\Program Files\Visual Studio .Net 2003\Vc7\PlatformSDK\Include\List.h(53): error C2146: syntax error : missing ';' before identifier 'GetPrevLink' D:\Program Files\Visual Studio .Net 2003\Vc7\PlatformSDK\Include\List.h(53): error C2433: 'WINAPI' : 'inline' not permitted on data declarations

##### Share on other sites
Probably because you are missing a ; after a class definition or some other bit of code in one of your own header files. What files do you include, in what order, and from where? (Specifically I'm wondering where you include windows.h and what you include before it).

##### Share on other sites
alright.. i got that taken care of. now i'm getting these:

Drawing error LNK2005: "private: __thiscall type_info::type_info(class type_info const &)" (??0type_info@@AAE@ABV0@@Z) already defined in LIBCMTD.lib(typinfo.obj)
Drawing error LNK2005: "private: class type_info & __thiscall type_info::operator=(class type_info const &)" (??4type_info@@AAEAAV0@ABV0@@Z) already defined in LIBCMTD.lib(typinfo.obj)
Drawing error LNK2005: _exit already defined in LIBCMTD.lib(crt0dat.obj)
Drawing error LNK2005: _strncpy already defined in LIBCMTD.lib(strncpy.obj)
Drawing error LNK2005: _fclose already defined in LIBCMTD.lib(fclose.obj)
Drawing error LNK2005: __isctype already defined in LIBCMTD.lib(isctype.obj)
Drawing warning LNK4098: defaultlib 'msvcrt.lib' conflicts with use of other libs; use /NODEFAULTLIB:library
Drawing error LNK2001: unresolved external symbol "unsigned long __stdcall timeGetTime(void)" (?timeGetTime@@$$J10YGKXZ) Drawing error LNK2001: unresolved external symbol "struct _AUX_RGBImageRec * __stdcall auxDIBImageLoadA(char const *)" (?auxDIBImageLoadA@@$$J14YGPAU_AUX_RGBImageRec@@PBD@Z)
Drawing error LNK2019: unresolved external symbol _SDL_main referenced in function _main

##### Share on other sites
Google LNK2001, LNK2005, LNK2019, LNK4098. There are entires for each of them in MSDN that detail common reasons and fixes.

##### Share on other sites
I tried looking all that up, but nothing seems to really apply, i don't know what's wrong...

##### Share on other sites
when all else fails, post code that sends the errors

##### Share on other sites
I'd guess you are linking to one version of the c runtime, and some library you are using is linked to another version.

Quick answer: look in project settings/c++/code generation and change it to the correct runtime.

LIBCMTD suggests SDL wants you to use the multithreaded debug dll version. It expects the multithreaded dll (non debug) in release mode.

Also, it looks like you need to link glaux and a windows lib (maybe gdi32).

##### Share on other sites
Here's how you figure out what's wrong:

First, let's look at your error messages:
1. Drawing error LNK2005: "private: __thiscall type_info::type_info(class type_info const &)" (??0type_info@@AAE@ABV0@@Z) already defined in LIBCMTD.lib(typinfo.obj)2. Drawing error LNK2005: "private: class type_info & __thiscall type_info::operator=(class type_info const &)" (??4type_info@@AAEAAV0@ABV0@@Z) already defined in LIBCMTD.lib(typinfo.obj)3. Drawing error LNK2005: _exit already defined in LIBCMTD.lib(crt0dat.obj)4. Drawing error LNK2005: _strncpy already defined in LIBCMTD.lib(strncpy.obj)5. Drawing error LNK2005: _fclose already defined in LIBCMTD.lib(fclose.obj)6. Drawing error LNK2005: __isctype already defined in LIBCMTD.lib(isctype.obj)7. Drawing warning LNK4098: defaultlib 'msvcrt.lib' conflicts with use of other libs; use /NODEFAULTLIB:library8. Drawing error LNK2001: unresolved external symbol "unsigned long __stdcall timeGetTime(void)" (?timeGetTime@@$$J10YGKXZ)9. Drawing error LNK2001: unresolved external symbol "struct _AUX_RGBImageRec * __stdcall auxDIBImageLoadA(char const *)" (?auxDIBImageLoadA@@$$J14YGPAU_AUX_RGBImageRec@@PBD@Z)10. Drawing error LNK2019: unresolved external symbol _SDL_main referenced in function _main

Now let's see, #1 and #2 look weird, so look for ones you can easily reocginize at first.

Hmmm, #3 - #6 look Very Familure. If you want to continue using SDL, you will have to remember all the steps you have to do to use it. If you don't remember, look here though the tutorials to see what you forgot to do with this SDL project.

Now #7 says warning, so let's forget about that for now. Now on #8, it says "unresolved external symbol" which you should know that means you are using a function that has not been defined yet. If you didn't know that, learn it now! [wink] So you have some function decorated as (?timeGetTime@@J10YGKXZ) that cannot be found. Is that your function or not yours? If it's not yours, then type in the function name in google, "timeGetTime" and find what library you have to link with to use that function. Look for MSDN sites first then other sites that contain that info. Do the same thing for the next error, the "auxDIBImageLoadA".

After that I will stress once again, if you want to use SDL, you HAVE to learn how to use it correctly. Your error of: "Drawing error LNK2019: unresolved external symbol _SDL_main referenced in function _main" is one of the most common SDL errors. Do a google search for "unresolved external symbol _SDL_main referenced in function _main" to see why you are getting that - that is after you have read over the tutorials I refered over to you earlier on SDL again for getting started.

Now after you fix all of that, you should be able to solve the first two errors, that is, if they don't fix themselves [smile], and if not, use the same procedures I've directed you though to try and find how to get it fixed. Just understand that if you don't learn how to be able to solve problems like these yourself, you will continue to have them though the rest of your programming experiences. Good luck!

##### Share on other sites
could i just do:
#pragma comment(lib, "windows.lib")
#pragma comment(lib, "glaux.lib")

?

edit: oh, reposted too late lol i'll check all that out, thanks! :)

##### Share on other sites
Quote:
 Original post by EvilKnuckles666could i just do:#pragma comment(lib, "glaux.lib")?

To link in a library, yes - BUT only if you are sure all of the libraries you are linking in this way are compiled and use the same Runtime Library. (Note there's a reason I left out a link in your quote - try and find that library file)

##### Share on other sites
ok, i got rid of all the other errors... all i have left are the first 2 weird ones, and the sdl ones. i don't know what's wrong with the sdl ones. i'm doing everything right. linking the 2 libs (sdl.dll and sdlmain.dll), including the header (sdl.h), and using /MtD... anything else i'm missing?

##### Share on other sites
Quote:
 Original post by EvilKnuckles666and using /MtD... anything else i'm missing?

Yes, check over what you are supposed to be using for the run time library.

##### Share on other sites
oh woops hah

now i just have:

Drawing error LNK2019: unresolved external symbol _SDL_main referenced in function _main

?

##### Share on other sites
Quote:
 Original post by EvilKnuckles666?

##### Share on other sites
wow, for future refence, what causes that error is you need the 2 params in main()

main(int argc, char* argv[])

:)

##### Share on other sites

This topic is 4357 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.