From: Khalid A. B. <kh...@ya...> - 2009-02-06 12:31:15
|
>> Hello. >> >> A VC project requires an external main (as in extern int main) and makes the following pragma definition: >> >> >> #pragma comment(linker,"/ENTRY:wmainCRTStartup") >> >> Is it possible to do (build) that in MinGW? And how? Any pointers/examples appreciated. > You can build that, but you won't be able to set that linker option > via source code; you'll have to edit the makefile to add a command > line option with the same effect as the MSVC extension the code relies > upon. > > If invoking GNU LD directly: > > ld [options] -e wmainCRTStartup [objects] [libs] > > If invoking GNU LD through GCC: > > gcc [options] -Wl,-e,wmainCRTStartup [objects] [libs] > > (The "-e" option is prefix by "Wl (uppercase double-u, lowercase el)". > And yes, commas in place of spaces.) > > Besides, this will skip any initialization routines specific to MinGW, > though this will probably make no difference, considering the program > isn't MingW-aware. > > Hope this helps. > > -- > CS Thank you CS. Truly appreciate the help. Is there is a list of such (or other) GCC (and LD) options that one can refer to? Or is the manual the only authority on this matter? Regards |