Compiler Question
Peace be with you all,
I have been doing some win32 dev using the Visual Studio .NET
environment, but the goal of my project is to be completely independent
of any std c or c++ libs. My only target is the win32 api itself. I
have my own file classes so I do not need FILE (I'm an old C
programmer, so I abhor using cout, but I like C++ for the class
encapsulation and occassional inheritance).
The problem is that the MS C/C++ compiler automatically links to a
version of libc.lib, depending upon what kind of threading/debug model
you want. I only want to link to the core 3 libs: kernel32.lib,
user32.lib and gdi32.lib; or, rather, I want a completely clean
environment where I can completely choose the output of my linker
(which, in a win environment means which dlls are linked to at
compile-time).
Now, I'd love to use gcc, but it seems that there's a lot of cruft that
goes along with it (mingw or cygwin) that is the (apparent) result of
overlaying an entire Unix system on top of windows, instead of just
letting the compiler target the env directly (tough, I know). And,
frankly, it seems like cygwin's organization is chaotic at best.
BTW, there is a compiler option for MS's cl.exe (/NODEFAULTLIB) that
suppresses linking to the std libs, but then I get a bunch of
unresolved references that are the result of the compiler's generated
code.
Any suggestions?
Peace & Blessings,
bmac
0 Comments:
Post a Comment
<< Home