« Return to Thread: Unable to compile .rc file

Unable to compile .rc file

by TonyBalony :: Rate this Message:

| View in Thread

Currently I am working through "forgers-Win32-tutorials" and trying the
sample codes both in Visual C++ and separately with MinGW

I am not including the code I am using at the moment because I suspect
it may be a matter of how I cam compiling,
so I will add the code later if it seems I can't resolve through how I
compile.

In the part of the tutorial where I just create a plain window I have no
problems and get the same results when either using MinGW or Visual C++

However after creating code for establishing a window the author adds
the ability to make an icon for the .exe file, show icon on top of
window and have a couple simple drop down menus

To do this he introduces using an *.rc file and  *.h file

When I complile in Visual C++ I get the intended results no problem

However I don't get the same results using MinGW:

                         I get the icon for the .exe file ( how it shows
in my windows directories )
                         but no icon for the window generated and no
drop down menus

I don't even get any error messages

both the *.rc file and *.h file are identical copies of those used with
Visual C ++

I went to the MinGW site to find out how to compile the the .rc file....

so what I am doing is the following:

( having   #include my_resource.h in first.cpp )

*******************************
g++  -c  first.cpp

windres -o my_resource.o  my_resource.rc

g++ -o  first  first.o  my_resource.o -mwindows

******************************
I thought that maybe -mwindows would not be enough so I tried things
like adding -lming32

but that didn't make any changes

Is it just a matter of using the right windows library?....I would
assume -mwindows all windows libraries would be looked for and if I was
missing one I would have at least got an error message.

Thank you for any response

P.S. Since at this point I haven't even started using any C++
conventions, I tried the above just using gcc and a first.c file but
with the same results

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
MinGW-users mailing list
MinGW-users@...

This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:mingw-users-request@...?subject=unsubscribe

 « Return to Thread: Unable to compile .rc file