[RESOLVED] about GCC compiler
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4

Thread: [RESOLVED] about GCC compiler

  1. #1
    Join Date
    Apr 2009
    Posts
    625

    [RESOLVED] about GCC compiler

    these topic isn't about code, but the basics how use GCC compiler.
    if i need change the icon, in EXE, we must create a resource file, right?
    after that how can i add it to exe?

    the g++.exe compiles C++ code(main()), but what exe compiles win32 program code(wmain())?


    Moderator: sorry but i can't find the right sub-forum

  2. #2
    Join Date
    Nov 2003
    Posts
    1,793

    Re: about GCC compiler

    The resource compiler from MinGW is call WindRes.exe. It can compile resource scripts into .o object files, which can then be linked to your application.

    gg

  3. #3
    Join Date
    Apr 2009
    Posts
    625

    Re: about GCC compiler

    Quote Originally Posted by Codeplug View Post
    The resource compiler from MinGW is call WindRes.exe. It can compile resource scripts into .o object files, which can then be linked to your application.

    gg
    so the linker can do: resource.o + dll's + sourcefiles.o = exe right?

  4. #4
    Join Date
    Apr 2009
    Posts
    625

    Re: about GCC compiler

    - 1st the windres.exe don't accept empty spaces, even inside of quotes.

    - then we create the resource object:

    windres.exe -i resource.res -o resource.o

    (remember i - input and o - output)

    - compile the source file to object
    (for multiple files, repeat the same process)
    (gcc.exe compile C source code)

    g++.exe -c source.cpp -o source.o

    - now lets join all files to exe:

    g++.exe source.o source2.o source3.o resource.o -o execurable.exe -static

    (if you get errors, see the folder name, don't use empty spaces. and even if you continue with errors, try change the files order. but i use the way)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center