Sign in to follow this  

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.

If you intended to correct an error in the post then please contact us.

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 this post


Link to post
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 this post


Link to post
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 this post


Link to post
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 this post


Link to post
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:library

8. 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 this post


Link to post
Share on other sites
Quote:
Original post by EvilKnuckles666
could 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 this post


Link to post
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 this post


Link to post
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.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this