what exactly is in a .lib file?
Hi!
I've a question about this topic...
If my cpp files have some code like this one:
is there no need to specify this in the projects settings of my static library project? I mean.. in Project->Settings I only have "General" and "Custom Build" tabs, so I assume it's not necessary, but I'm not really sure.
This is my first project compiled as a library, lol :D
Thanks in advanced!!
I've a question about this topic...
If my cpp files have some code like this one:
#ifdef UNICODE wcscpy(m_wFileName, wFileName);#else strcpy(m_wFileName,wFileName);#endif
is there no need to specify this in the projects settings of my static library project? I mean.. in Project->Settings I only have "General" and "Custom Build" tabs, so I assume it's not necessary, but I'm not really sure.
This is my first project compiled as a library, lol :D
Thanks in advanced!!
One thing to keep in mind is when you have a static library, it acts as a normal C++ project when building, so if UNICODE is not defined, it is not linked into the code. So if you try to run your code on a UNICODE platform, then it will fail to work, even though UNICODE is defined. To remedy this, you would need that in the "header file" and your source file must contain both implementations. That or you will need to make two seperate libraries.
As for settings for the project, you *should* have more options than that - it just depends what you have the curent selection on if you are using Visual Studio. If you click on a .cpp file that is part of hte project, you should then gain the Link tab as well, but if not, something may be wrong the the conviguration of your project.
- Drew
As for settings for the project, you *should* have more options than that - it just depends what you have the curent selection on if you are using Visual Studio. If you click on a .cpp file that is part of hte project, you should then gain the Link tab as well, but if not, something may be wrong the the conviguration of your project.
- Drew
Ok.. I see. Now I have two configurations, one to generate the UNICODE library version and another one for the non-UNICODE library version.
Everything seems to works fine compiling both of them.
I've been getting link errors when using the library in my application's project, but now it's already solved... lol :D
Thanks for ur help!
[Edited by - crypting on February 23, 2005 1:49:38 PM]
Everything seems to works fine compiling both of them.
I've been getting link errors when using the library in my application's project, but now it's already solved... lol :D
Thanks for ur help!
[Edited by - crypting on February 23, 2005 1:49:38 PM]
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement