Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9091841
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T22:42:20+00:00 2026-06-16T22:42:20+00:00

I am working on winexe project currently. winexe compiles windows C code on linux

  • 0

I am working on winexe project currently. winexe compiles windows C code on linux using -mno-cygwin as CFLAGS .

following is Makefile under directory winexesvc :-

CFLAGS=-mno-cygwin -Os
LDFLAGS=-mno-cygwin -s -Os

CC_WIN32 := $(shell bash -c 'which {i386,i586}-{mingw32,mingw32msvc}-gcc')
CC_WIN64 := $(shell bash -c 'which {x86_64,amd64}-{mingw32,mingw32msvc}-gcc')

all: winexesvc32_exe.c winexesvc64_exe.c

winexesvc32.exe: winexesvc32.o service32.o
    $(CC_WIN32) $(LDFLAGS) -o $@ $^

winexesvc64.exe: winexesvc64.o service64.o
    $(CC_WIN64) $(LDFLAGS) -o $@ $^

%32.o: %.c
    $(CC_WIN32) -c $(CPPFLAGS) $(CFLAGS) -o $@ $^

%64.o: %.c
    $(CC_WIN64) -c $(CPPFLAGS) $(CFLAGS) -o $@ $^

winexesvc32_exe.c: winexesvc32.exe bin2c.exe
    ./bin2c.exe winexesvc32_exe winexesvc32.exe > $@

winexesvc64_exe.c: winexesvc64.exe bin2c.exe
    ./bin2c.exe winexesvc64_exe winexesvc64.exe > $@

bin2c.exe: bin2c.c
    gcc -s -o $@ $^

clean:
    -@rm *.exe *.o *_exe.c

The entire code compiles and run successfully when no modification is done.

But,whenever I replace winexsvc.c file or winexesvc64_exe.c file or winexesvc32_exe.c
(I need to modify these 3 files). It shows following error when I replace winexesvc.c with modified code. The modified code dosen’t call any other file or any function outside the file.

So, the problem is when I do some modifications in above mentioned 3 files, I get above mentioned errors.
Any Idea why this is happening ?

P.S :- I have read other post regarding error of -mno-cygwin option in gcc.
but those are not relevant to my problem.
additional information :-
[I have got this from Makefile of winexesvc folder under winexe.]

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T22:42:21+00:00Added an answer on June 16, 2026 at 10:42 pm

    Solved :-
    I used i586-mingw32msvc-gcc command along with suitable flags to compile every file by hand then linking it accordingly.

    Got , the required results.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Working on a project using Entity Framework (4.3.1.0). I'm trying to figure out how
Working with embedded linux cross compiling the code on an Ubuntu box to run
Working through Pro ASP.NET MVC book and I got the following code snippet that
working on an old translation sample code for windows phone 7. Recently, I have
Working in Eclipse on a Dynamic Web Project (using Tomcat (v5.5) as the app
Working on a project that was built using ssh2_connect to download files from a
Working on a small game using an HTML5 canvas, and javascript. And it's working
Working on the problems on Project Euler to try to learn Clojure. I'm on
working on my code to retrieve lat,long by clicking and it works fine. wondering
Working on a new project in Laravel 4 (a.k.a Illuminate) I'm trying to create

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.